代码拉取完成,页面将自动刷新
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 |
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。