Tob*_*ob 4 python keras darknet yolo
我正在使用 yad2k 将暗网 YOLO 模型转换为 keras .h5 格式。我的 yolov3-voc.cfg、yolov3.weights 和 yolov3.cfg 都在包含 yad2k 脚本的目录上方。当我运行以下命令时:
python3 yad2k.py -p ../yolov3-voc.cfg ../yolov3.weights model_data/yolov3.h5
Run Code Online (Sandbox Code Playgroud)
或者:
python3 yad2k.py -p ../yolov3.cfg ../yolov3.weights model_data/yolov3.h5
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
Traceback (most recent call last):
File "yad2k.py", line 271, in <module>
_main(parser.parse_args())
File "yad2k.py", line 90, in _main
cfg_parser.read_file(unique_config_file)
File "/Users/tobykrieman/anaconda/lib/python3.6/configparser.py", line 718, in read_file
self._read(f, source)
File "/Users/tobykrieman/anaconda/lib/python3.6/configparser.py", line 1080, in _read
raise MissingSectionHeaderError(fpname, lineno, line)
configparser.MissingSectionHeaderError: File contains no section headers.
file: '<???>', line: 7
'<!DOCTYPE html>\n'
Run Code Online (Sandbox Code Playgroud)
我怎样才能解决这个问题?
小智 5
您应该尝试此Github 存储库中的说明,它是“YOLOv3 的 Keras 实现”
git clone https://github.com/qqwweee/keras-yolo3.git
cd keras-yolo3
wget https://pjreddie.com/media/files/yolov3.weights
python convert.py yolov3.cfg yolov3.weights model_data/yolo.h5
python yolo.py OR python yolo_video.py [video_path] [output_path(optional)]
Run Code Online (Sandbox Code Playgroud)