2023-09-10 23:31:35 -07:00
..
2023-09-09 14:49:03 -07:00
2023-09-09 14:49:03 -07:00
2023-09-09 14:49:03 -07:00
2023-09-10 23:31:35 -07:00
2023-09-10 20:06:21 -07:00
2023-09-10 20:06:21 -07:00

Phase 1

Getting started: PyTorch, Caltech101 dataset, ResNet50 and similarity measures

  • Refer phase1_project23.pdf for problem description
  • For task 3, the best distance measures seem to be:
    • Color moments - Pearson (faces especially)
    • Histogram of oriented gradients (HOG) - Cosine similarity
    • ResNet50 (avgpool, layer3, fc) - unsatisfactory results for all, simply used euclidean

Requirements

Install packages from requirements.txt (might not be complete)

Task 1 - task_1.ipynb

After installing, run all cells in the notebook. There will be a prompt to give input for image ID. Range is 0 to 8677

Task 2 - task_2.ipynb

Dataset processing and storage to database. Ensure MongoDB server is running, modify connection URI as needed if running on Atlas

Task 3 - task_3.ipynb

Execute all cells till before the "Target images" markdown cell. There will be four prompts to give input for:

  • Image ID: integer, 0 to 8677
  • No. of similar images needed, k: positive integer
  • Feature model - one of ["cm", "hog", "avgpool", "layer3", "fc"]
    • Note: only hog is applicable for all images. Others cannot be used for grayscale images
  • Similarity/distance measure - one of ["euclidean", "cosine", "pearson"]