kamrulhasanrony / Vision-Transformer-based-Food-Classification

Vision Transformer Based Food-101 Classification
5 stars 1 forks source link

Custom Training and testing #1

Open Ehteshamciitwah opened 8 months ago

Ehteshamciitwah commented 8 months ago

Hello, Thank you for sharing the code. I am using your code for the classification of my custom data. The image size of the dataset is just 64x64 and has 8 classes. I just want to know, if can you provide the testing code so one can test the final checkpoint and calculate the confusion matrix. Thank you

kamrul-NSL commented 1 month ago

After completing the training best_checkpoint.bin file will saved as checkpoint. Please check the training script train.py file and it's 214, 215 line. Just use the test data instead of training data and then remove the comment from 214 and 215 line. Then it will load the best_checkpoint file and perform test. You can do it outside the epoch_iterator also by adding these two lines. Thanks.