如何计算map?

1.VOCdevkit/VOC2007/ImageSets/Main/test.txt、val.txt、train.txt、trainval.txt由voc2yolo4.py生成
可以使用trainval_percent和train_percent的比例改变来修改
实验比例的话是trainval_percent=0.9,train_percent=1
根据我来看的代码,使用k-means聚类之后得到的结果不需要改变这边。
————————————2021.4.18——————————————————

D:\ProgramData\Anaconda3\envs\pytorch\python.exe D:/PythonStudySpace/yolov4-pytorch/FPS_test.py
Loading weights into state dict...
Finished!
model_data/yolo4_weights.pth model, anchors, and classes loaded.
2.951487748622894 seconds, 0.3388121805576121FPS, @batch_size 1

Process finished with exit code 0


D:\ProgramData\Anaconda3\envs\pytorch\python.exe D:/PythonStudySpace/yolov4-pytorch/kmeans_for_anchors.py
acc:87.22%
[[ 15.15428571  73.9375    ]
 [ 16.04571429 140.96875   ]
 [ 22.88        85.71875   ]
 [ 23.32571429  40.828125  ]
 [ 54.08        49.359375  ]
 [ 66.85714286  89.78125   ]
 [ 67.74857143  93.84375   ]
 [ 68.64        85.71875   ]
 [ 71.90857143  72.71875   ]]


(pytorch) ubuntu-gpu@UbuntuGPU:~/wangmiao/yolov4-pytorch-master/yolov4-pytorch-master$ python FPS_test.py
Loading weights into state dict...
Finished!
logs/Epoch70-Total_Loss0.9002-Val_Loss2.2391.pth model, anchors, and classes loaded.
0.030595953464508056 seconds, 32.68406069319006FPS, @batch_size 1

('VOCdevkit/VOC2007/ImageSets/Main/test.txt:352
./VOCdevkit/VOC2007/JPEGImages/testImages/"+image_id+".jpg":353个

统计某文件夹下文件的个数

train and val size 1052
traub suze 1052:353

统计某文件夹下目录的个数

ls -l |grep "^d"|wc -l

统计文件夹下文件的个数,包括子文件夹里的

ls -lR|grep "^-"|wc -l
~/wangmiao/yolov4-pytorch-master/VOCdevkit/VOC2007/JPEGImages$
ls -l |grep "^-"|wc -l
:825
ubuntu-gpu@UbuntuGPU:~
/wangmiao/yolov4-pytorch-master/VOCdevkit/VOC2007/JPEGImages$
 ls -l |grep "^d"|wc -l
0
ubuntu-gpu@UbuntuGPU:~
/wangmiao/yolov4-pytorch-master/VOCdevkit/VOC2007/JPEGImages$
 ls -lR|grep "^-"|wc -l
1178
ubuntu-gpu@UbuntuGPU:
~/wangmiao/yolov4-pytorch-master/VOCdevkit/VOC2007/JPEGImages/testImages$
 ls -lR|grep "^-"|wc -l
353

ubuntu-gpu@UbuntuGPU:
~/wangmiao/yolov4-pytorch
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值