Skip to content

Conversation

@ezrafield
Copy link

  • demo.ipynb: tạo demo train 100+100 epochs + plot query_one
  • query_one.py: hàm query_one + plot_query_one, em copy lại các hàm trong module anh dùng vì trong trường hợp đưa file streamlit chạy ở nơi khác vẫn chạy được
  • utils.py: sửa chút chỗ load_checkpoint để có thể chạy CPU
  • api.py: chưa hoàn chỉnh, anh sửa giùm :D
  • 014_Image Retrieval.py: file streamlit demo, anh quăng chỗ khác vẫn chạy ổn, chỉ cần chỉnh lại các path string cho phù hợp :D

Copy link
Owner

@ginofft ginofft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Local paths
Redundant functions

st.markdown("<h1 style='text-align: center; color: white;'>Image Retrieval</h1>", unsafe_allow_html=True)

# att = os.listdir("/storage/computervision/longnth/models/image_retrieval/NetVLAD/data/database")
att = os.listdir("/storage/computervision/longnth/models/image_retrieval/NetVLAD/data")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Local path

return module


NetVLADLayer = module_from_file("NetVLADLayer", "/storage/computervision/longnth/models/image_retrieval/NetVLAD/scr/netvlad.py")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

local Paths

#Set up output paths
dbPath = '/storage/computervision/longnth/models/image_retrieval/NetVLAD/data/database'
queryPath = '/storage/computervision/longnth/models/image_retrieval/NetVLAD/data/query'
outPath = '/storage/computervision/longnth/models/image_retrieval/NetVLAD/out'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

local paths

# plot_images([query_img], dpi = 25)
plt.imshow(query_img)
db_imgs = [read_image(db_dir+ "/"+r) for r in db_refs]
plot_images(db_imgs[:10], dpi = 25) No newline at end of file
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cái file này có mấy hàm y hệt bên utils mà, tạo files mới chi vậy ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants