Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
@yang-guowei a0d6b967cd | 1 year ago | |
---|---|---|
.. | ||
README.md | 1 year ago | |
model.py | 1 year ago | |
my_dataset.py | 1 year ago | |
predict.py | 1 year ago | |
requirements.txt | 1 year ago | |
train.py | 1 year ago | |
trans_weights_to_pytorch.py | 1 year ago | |
utils.py | 1 year ago |
train.py
脚本中将--data-path
设置成解压后的flower_photos
文件夹绝对路径train.py
脚本中将--weights
参数设成下载好的预训练权重路径--data-path
以及预训练权重的路径--weights
就能使用train.py
脚本开始训练了(训练过程中会自动生成class_indices.json
文件)predict.py
脚本中导入和训练脚本中同样的模型,并将model_weight_path
设置成训练好的模型权重路径(默认保存在weights文件夹下)predict.py
脚本中将img_path
设置成你自己需要预测的图片绝对路径model_weight_path
和预测的图片路径img_path
就能使用predict.py
脚本进行预测了num_classes
设置成你自己数据的类别数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》