This model is the B0 version of the EfficientNet series, whitch can be used for image classification tasks, such as cat and dog classification, flower classification, and so on.
git clone -b release/2.5 https://github.com/PaddlePaddle/PaddleClas.git
cd PaddleClas
pip3 install -r requirements.txt
pip3 install paddleclas
pip3 install protobuf==3.20.3
yum install mesa-libGL
pip3 install urllib3==1.26.15
Sign up and login in ImageNet official website, then choose 'Download' to download the whole ImageNet dataset.
The ImageNet dataset path structure should look like:
PaddleClas/dataset/ILSVRC2012/
├── train
│ └── n01440764
│ ├── n01440764_10026.JPEG
│ └── ...
├── train_list.txt
├── val
│ └── n01440764
│ ├── ILSVRC2012_val_00000293.JPEG
│ └── ...
└── val_list.txt
Tips
For PaddleClas
training, the image path in train_list.txt and val_list.txt must contain train/
and val/
directories:
# add "train/" and "val/" to head of lines
sed -i 's#^#train/#g' train_list.txt
sed -i 's#^#val/#g' val_list.txt
# Link your dataset to default location
cd PaddleClas/
ln -s /path/to/imagenet ./dataset/ILSVRC2012
# 8 GPUs
export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7
python3 -m paddle.distributed.launch tools/train.py -c ppcls/configs/ImageNet/EfficientNet/EfficientNetB0.yaml
# 1 GPU
export CUDA_VISIBLE_DEVICES=0
python3 tools/train.py -c ppcls/configs/ImageNet/EfficientNet/EfficientNetB0.yaml
GPUs | ips | Top1 | Top5 |
---|---|---|---|
BI-V100 x8 | 1065.28 | 0.7683 | 0.9316 |
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》