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