火车自定义检测器yolov4-roboflow-pytorch.ipynb的问题
I was trying the yoloV4 pytorch model from the https://models.roboflow.com/object -Detection/Yolov4-Pytorch 我看了教程和评论部分,但仍无法正常工作。
这是
%cd ..
#start training
#-b batch size (you should keep this low (2-4) for training to work properly)
#-s number of subdivisions in the batch, this was more relevant for the darknet framework
#-l learning rate
#-g direct training to the GPU device
#pretrained invoke the pretrained weights that we downloaded above
#classes - number of classes
#dir - where the training data is
#epoch - how long to train for
!python ./pytorch-YOLOv4/train.py -b 2 -s 1 -l 0.001 -g 0 -pretrained /content/pytorch-YOLOv4/cfg/yolov4.conv.137.pth -classes {num_classes} -dir ./train -epochs 50
第一个错误是目录不可避免,因此我更改了目录,但是现在这是它显示的错误:
log file path:log/log_2022-05-19_08-01-18.txt
2022-05-19 08:01:18,220 train.py[line:435] INFO: Using device cuda
Traceback (most recent call last):
File "./pytorch-YOLOv4/train.py", line 447, in <module>
device=device, )
File "./pytorch-YOLOv4/train.py", line 247, in train
train_dataset = Yolo_dataset(config.train_label, config)
File "/content/pytorch-YOLOv4/dataset.py", line 254, in __init__
f = open(lable_path, 'r', encoding='utf-8')
FileNotFoundError: [Errno 2] No such file or directory: 'train.txt'
我需要此问题的帮助,因为我不知道下一步该怎么做。
I was trying the yoloV4 pytorch model from the https://models.roboflow.com/object-detection/yolov4-pytorch I watched the tutorials and the comment section but it is still not working properly.
This is the code
%cd ..
#start training
#-b batch size (you should keep this low (2-4) for training to work properly)
#-s number of subdivisions in the batch, this was more relevant for the darknet framework
#-l learning rate
#-g direct training to the GPU device
#pretrained invoke the pretrained weights that we downloaded above
#classes - number of classes
#dir - where the training data is
#epoch - how long to train for
!python ./pytorch-YOLOv4/train.py -b 2 -s 1 -l 0.001 -g 0 -pretrained /content/pytorch-YOLOv4/cfg/yolov4.conv.137.pth -classes {num_classes} -dir ./train -epochs 50
The first error was that the directory was not avaiable and thus I changed the directory but now this is the error it is showing:
log file path:log/log_2022-05-19_08-01-18.txt
2022-05-19 08:01:18,220 train.py[line:435] INFO: Using device cuda
Traceback (most recent call last):
File "./pytorch-YOLOv4/train.py", line 447, in <module>
device=device, )
File "./pytorch-YOLOv4/train.py", line 247, in train
train_dataset = Yolo_dataset(config.train_label, config)
File "/content/pytorch-YOLOv4/dataset.py", line 254, in __init__
f = open(lable_path, 'r', encoding='utf-8')
FileNotFoundError: [Errno 2] No such file or directory: 'train.txt'
I need help with this problem as I have no idea what to do next.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论