Skip to content

Commit

Permalink
:|
Browse files Browse the repository at this point in the history
  • Loading branch information
mehrdad-dev committed May 17, 2022
1 parent 62c8d72 commit 9d3518a
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions streamlit_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,19 @@ def findObjects(listOfObjects:list, query:str, model, preprocess, device:str, N)


def pipeline(image, query, models):
print('======TESTING======')
print(models)
listOfObjects, detectedObjects = objectDetection(image, models[0])
scores, images = findObjects(listOfObjects, query, models[1], models[2], DEVICE, N)
detectedObjects = np.array(detectedObjects)
# listOfObjects, detectedObjects = objectDetection(image, models[0])
# scores, images = findObjects(listOfObjects, query, models[1], models[2], DEVICE, N)
# detectedObjects = np.array(detectedObjects)

st.title('Detected Objects:')
st.image(detectedObjects, caption='Detected Objects', use_column_width=True)
# st.title('Detected Objects:')
# st.image(detectedObjects, caption='Detected Objects', use_column_width=True)

st.title('Finded Objects:')
for index, img in enumerate(images):
img = np.array(img)
st.image(img, caption="Score: "+str(scores[index]))
# st.title('Finded Objects:')
# for index, img in enumerate(images):
# img = np.array(img)
# st.image(img, caption="Score: "+str(scores[index]))


# ================================================================================================
Expand Down

0 comments on commit 9d3518a

Please sign in to comment.