本文主要是介绍PaddleClas基于ResNet50_vd模型+flowers102数据集进行训练、预测,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
前提:安装PaddleClas
cd path_to_clone_PaddleClas
git clone https://github.com/PaddlePaddle/PaddleClas.git
安装python依赖库:
pip install --upgrade -r requirements.txt
1、数据准备
(1)下载数据集
cd path_to_PaddleClas
cd dataset/flowers102
wget https://www.robots.ox.ac.uk/~vgg/data/flowers/102/102flowers.tgz
wget https://www.robots.ox.ac.uk/~vgg/data/flowers/102/imagelabels.mat
wget https://www.robots.ox.ac.uk/~vgg/data/flowers/102/setid.mat
tar -xf 102flowers.tgz
(2)制作train/val/test标签文件
python generate_flowers102_list.py jpg train > train_list.txt python generate_flowers102_list.py jpg valid > val_list.txt python generate_flowers102_list.py jpg test > extra_list.txt cat train_list.txt extra_list.txt > train_extra_list.txt
2、环境准备
(1)设置环境变量
export PYTHONPATH=./:$PYTHONPATH
这篇关于PaddleClas基于ResNet50_vd模型+flowers102数据集进行训练、预测的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!