Skip to content

In CVPR 2020 AliProducts Challenge: Large-scale Product Recognition, we got error rate 0.099 and ranked No.6. The model will get higher score if using deeper backbone, larger batch-size or larger resolution.

Notifications You must be signed in to change notification settings

jiaqianjing/AiProducts-Challenge

 
 

Repository files navigation

CVPR 2020 AliProducts Challenge: Large-scale Product Recognition

Main requirements

  • torch == 1.0.1
  • torchvision == 0.2.2_post3
  • Python 3

Environmental settings

This repository is developed using python 3.5.2 on Ubuntu 16.04.5 LTS. The CUDA and CUDNN version is 9.0 and 7.1.3 respectively. For AiProducts experiments, we use four NVIDIA 1080ti GPU cards for training and testing. Other platforms or GPU cards are not fully tested.

Technical report

More technical details please see technical report.pdf.

Pretrain models

We provide the pretrain backbone of resnet50 or resnet101 trained on ImageNet , which will put in the fold of ./pretrain_models. And we also provide the best model of resnest50 BaiduYun link, keyword: g2xy, GoogleDrive link

Usage

Decompress three json files of train/val/test datasets in the fold of ./dataset/AiProducts, more details please see the config files in the fold of ./configs.

# Get dataset of AiProducts
sh ./dataset/get_dataset_AiProducts.sh
# Training the model and the models will be saved in the fold of ./log/AiProducts 
python main.py  
# Finetune the model
python main.py --RESUME_MODEL ./log/AiProducts/best_model.pth --DATASET_TRAIN_JSON ./dataset/AiProducts/converted_val.json 
# Test the model
python test.py --RESUME_MODEL ./log/AiProducts/best_model.pth
# Adjust the classifier using the tau-norm method and the models will be saved in the fold of ./log_tau
python tau_norm.py --RESUME_MODEL ./log/AiProducts/best_model.pth

More experiments need to be tried such as different image size, backbone, optimizer or learning rate decay method which noly need change the config file.

Data format

The annotation of a dataset is a dict consisting of two field: annotations and num_classes. The field annotations is a list of dict with fpath and category_id.

Here is an example.

AiProducts
{
    'annotations': 
	[
        {
		"category_id": 0, 
		"fpath": "/val/00000/1849756.jpg"
        },
        ...
    ]
    'num_classes': 50030
}

Acknowledge

Thanks for the help of my partners Baole Wei, Yirong Yang. Please let me know if you encounter any issues(my email zhangmingliang2018@ia.ac.cn).

About

In CVPR 2020 AliProducts Challenge: Large-scale Product Recognition, we got error rate 0.099 and ranked No.6. The model will get higher score if using deeper backbone, larger batch-size or larger resolution.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.1%
  • Shell 1.9%