From d72f2ef2edbbd5fc42d977336946b6199bc58848 Mon Sep 17 00:00:00 2001 From: Kaushik Narayan R Date: Sun, 10 Sep 2023 23:24:10 -0700 Subject: [PATCH] updated README, added requirements.txt --- Phase 1/Plots/README.md | 1 + Phase 1/README.md | 22 ++++++++++++++++++++++ Phase 1/requirements.txt | 13 +++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 Phase 1/Plots/README.md create mode 100644 Phase 1/requirements.txt diff --git a/Phase 1/Plots/README.md b/Phase 1/Plots/README.md new file mode 100644 index 0000000..e0a1511 --- /dev/null +++ b/Phase 1/Plots/README.md @@ -0,0 +1 @@ +# Plots generated by task_3.ipynb in show_similar_images() \ No newline at end of file diff --git a/Phase 1/README.md b/Phase 1/README.md index 44f5388..645909a 100644 --- a/Phase 1/README.md +++ b/Phase 1/README.md @@ -7,3 +7,25 @@ Getting started: PyTorch, Caltech101 dataset, ResNet50 and similarity measures - 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"] diff --git a/Phase 1/requirements.txt b/Phase 1/requirements.txt new file mode 100644 index 0000000..b64b9b8 --- /dev/null +++ b/Phase 1/requirements.txt @@ -0,0 +1,13 @@ +numpy +scipy +scikit-learn +scikit-image +opencv-python +matplotlib +torch +torchvision +pymongo[srv] +ipython +notebook +ipykernel +