QuocThangNguyen / deep-metric-learning-tsinghua-dogs

Dogs classification with Deep Metric Learning
62 stars 10 forks source link

Evaluate model - The system cannot find the path specified #6

Closed HripsimeS closed 2 years ago

HripsimeS commented 2 years ago

@QuocThangNguyen Hello. I tried training and inference, they work fine (just training takes too long). Then I wanted to evaluate a trained model to see confusion matrix, T-SNE and similarity matrix, but I receive errors

FileNotFoundError: [WinError 3] The system cannot find the path specified: 'data/TshinghuaDogs/train' FileNotFoundError: [WinError 3] The system cannot find the path specified: 'data/TshinghuaDogs/val'

I followed the advice how to structure dataset for train and val folders, so I don't know why it can't find directories. Can you please help to figure out what is the issue and let me know if you need additional information from my side!

image

QuocThangNguyen commented 2 years ago

Which command did you run to evaluate @HripsimeS ?

HripsimeS commented 2 years ago

Confusion Matrix python src/scripts/visualize_confusion_matrix.py --test_images_dir data/TshinghuaDogs/val/ --reference_images_dir data/TshinghuaDogs/train -c src/checkpoints/proxynca-resnet50.pth

T-SNE python src/scripts/visualize_tsne.py --images_dir data/TshinghuaDogs/val/ -c src/checkpoints/proxynca-resnet50.pth

Similarity Matrix python src/scripts/visualize_similarity.py --images_dir data/TshinghuaDogs/val/ -c src/checkpoints/proxynca-resnet50.pth

QuocThangNguyen commented 2 years ago

Can you also show the structure of your directory ? Also paste some output of these command

import os

print(os.listdir("data/TshinghuaDogs/train"))
print(os.listdir("data/TshinghuaDogs/val"))

We want to be sure that the paths data/TshinghuaDogs/train and data/TshinghuaDogs/val can be seen in current PYTHONPATH

HripsimeS commented 2 years ago

@QuocThangNguyen indeed you were right print(os.listdir("data/TshinghuaDogs/val") was not really working, but when I put the whole path "C:/Fine-Grained/data/TsinghuaDogs/val/" it worked okay. So thanks a lot, I will close this issue.

QuocThangNguyen commented 2 years ago

Glad that helped