记录下第一次跑通Faster r-cnn

原理介绍

一文读懂Faster RCNN - 知乎

step1:环境的配置(python3.6+torch == 1.2.0)

conda activate

conda create -n detection python=3.6 -y
conda activate detection

在配置环境的过程中遇到的第一个问题就是 Found conflicts! Looking for incompatible packages.(包含conda卸载)

解决方案:https://blog.csdn.net/ACGTexplorer/article/details/126812909?spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-1-126812909-blog-126671235.pc_relevant_3mothn_strategy_and_data_recovery&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-1-126812909-blog-126671235.pc_relevant_3mothn_strategy_and_data_recovery&utm_relevant_inddex=2https://blog.csdn.net/ACGTexplorer/article/details/126812909?spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-1-126812909-blog-126671235.pc_relevant_3mothn_strategy_and_data_recovery&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-1-126812909-blog-126671235.pc_relevant_3mothn_strategy_and_data_recovery&utm_relevant_index=2第二个问题就是镜像源的问题 需要重新修改下.condarc文件(一般在根目录下但是被隐藏)

解决方案:

https://blog.csdn.net/qq_41897154/article/details/117708305https://blog.csdn.net/qq_41897154/article/details/117708305step 2:就是根据requirements.txt增加相应的包

pip install scipy==1.2.1
pip install numpy==1.17.0
pip install matplotlib==3.1.2
pip install opencv_python==4.1.2.30
pip install torch==1.2.0
pip install torchvision==0.4.0
pip install tqdm==4.60.0
pip install Pillow==8.2.0
pip install h5py==2.10.0

step 3 准备数据集

训练前需要下载好VOC07+12的数据集,解压后放在根目录

修改voc_annotation.py里面的annotation_mode=2,运行voc_annotation.py生成根目录下的2007_train.txt和2007_val.txt。

step 4 训练

因为之前的up主给了权重,所以直接修改了下路径(感谢🙇‍)

step 5 测试

python predict.py

 这个时候会要求输入图像文件(文件地址不需要双引号和单引号)

B站

https://www.bilibili.com/video/BV1BK41157Vs/?spm_id_from=333.337.search-card.all.click&vd_source=05634adffb53eebfbb68d00540a8aff7

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值