ML_YOLOV3(目标检测)
numpy
torch >= 1.1.0
opencv-python
tqdm
python3 train.py --data data/coco_2cls.data --cfg cfg/yolov3-spp-2cls.cfg --weights weights/converted.pt --transfer
(下边这句不对,会报维度的问题) python3 train.py --data data/coco_2cls.data --cfg cfg/yolov3-spp-2cls.cfg --weights weights/last.pt --transfer
python3 test.py --data data/coco_1cls.data --weights weights/ultralytics49.pt
python3 test.py --weights weights/last.pt --cfg cfg/yolov3-spp-2cls.cfg --data data/coco_2cls.data
python3 detect.py --weights weights/last.pt --cfg cfg/yolov3-spp-1cls.cfg --data data/coco_1cls.data
maxHeight=1040 maxWeight=2008
https://blog.csdn.net/djstavaV/article/details/86743175
def convert(size, box):
dw = 1./(size[0])
dh = 1./(size[1])
x = (box[0] + box[1])/2.0 - 1
y = (box[2] + box[3])/2.0 - 1
w = box[1] - box[0]
h = box[3] - box[2]
x = x*dw
w = w*dw
y = y*dh
h = h*dh
return (x,y,w,h)
(1)screen -S yourname -> 新建一个叫yourname的session
(2)screen -ls -> 列出当前所有的session
(3)screen -r yourname -> 回到yourname这个session
(4)ctrl+a,d ->detach当前session
(5)screen -X -S [session # you want to kill] quit
(6)screen -d yourname -> 远程detach某个session
(7)screen -d -r yourname -> 结束当前session并回到yourname这个session
pip3 --default-timeout=1000 *
batch=64 每batch个样本更新一次参数。
subdivisions=16 如果内存不够大,将batch分割为subdivisions个子batch,每个子batch的大小为batch/subdivisions。
训练的话把上面注释掉,测试就把训练部分的注释掉
https://blog.csdn.net/weixin_42731241/article/details/81474920
代码:https://github.com/ultralytics/yolov3
理论:https://blog.csdn.net/happy990/article/details/89644833
echo 1 > /proc/sys/vm/drop_caches
echo 2 > /proc/sys/vm/drop_caches
echo 3 > /proc/sys/vm/drop_caches
(1)执行test.py时,使用原默认参数,可以不加任何参数正常运行,这是要在coco_*.data中配置正确的图片路径, 并且images和labels到一一对应,否则会报奇怪的错误