This is my solution for Perfect Half Million Beauty Product Image Recognition Challenge , which obtained the 2nd place (GAN) with MAP@7 0.29135.
- python 2.7
- pytorch 0.4.0
- PIL
- torchvision here
- pretrainedmodels here
- faiss here
- download image data from here if published
and place them in
./data/
,./val/
and./test/
- place
val.csv
andtest.csv
in./
- run
python extract_all_feature.py
extract feature at dir./feature/
-imsize
(default:480) : the size of longer image side used for extracting feature
- run
python retrieval.py
calcurate the MAP@7 between the data features and the val or test feature, the submission file at dir./
-iseval
(default: 1) : whether eval with the MAP@7-impath
(default: './data/') : the file for data-tpath
(default: './val/') : the file for val data, if the data is test data, change to './test/'-tlabel
(default: './val.csv') : the label for val data, if the data is test data, please set-iseval
as 0