Closed dsp6414 closed 4 years ago
thanks
Does it matters if i trained my tiny-yolov4 with a different width and height than the standard 416x416 ?
Hi,@xaerincl You could set the width and height you want. The default size is 416*416: https://github.com/TNTWEN/OpenVINO-YOLOV4/blob/3f5355f9c9ac9b9e2996457f4cdf9f2a40675c34/convert_weights_pb.py#L25
For example,you could use python convert_weights_pb.py --class_names cfg/coco.names --weights_file yolov4.weights --data_format NHWC --size 608
to set 608*608 size. You just need to set it to match the length and width of the model you trained.
Under normal circumstances, we use the same length and width(416*416,608*608,832*832),if you trained a rectangular training model,you could try to change the code yourself.
nice, thanks!
download .weights file:
YOLOV4 :yolov4.weights (https://drive.google.com/open?id=1cewMfusmPjYWbrnuJRuKhPMwRe_b9PaT) YOLOV4-tiny: yolov4-tiny.weights(https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4-tiny.weights)
python convert_weights_pb.py --class_names cfg/coco.names --weights_file yolov4.weights --data_format NHWC
convert .weights(darkent) ->.pb(Tensorflow1.x)"C:\Program Files (x86)\IntelSWTools\openvino\bin\setupvars.bat"
if you install OpenVINO in the default path, you could use this command directly to Initialize OpenVINO environmentpython "C:\Program Files (x86)\IntelSWTools\openvino_2020.4.287\deployment_tools\model_optimizer\mo.py" --input_model frozen_darknet_yolov4_model.pb --transformations_config yolov4.json --batch 1
use OpenVINO Model Optimizer to convert .pb(Tensorflow) ->IR(OpenVINO .xml .bin .mapping )python object_detection_demo_yolov3_async.py -i cam -m frozen_darknet_yolov4_model.xml -d CPU
Now YOLOV4,V4tiny,V4relu are all supported. If you encounter other problems while using it, you can continue to contact me