Implementation of YOLO v3 object detector in Tensorflow (TF-Slim). Full tutorial can be found here.
Tested on Python 3.5, Tensorflow 1.11.0 on Ubuntu 16.04.
To run demo type this in the command line:
wget https://raw.githubusercontent.com/pjreddie/darknet/master/data/coco.names
wget https://pjreddie.com/media/files/yolov3.weights
wget https://pjreddie.com/media/files/yolov3-tiny.weights
wget https://pjreddie.com/media/files/yolov3-spp.weights
python ./convert_weights.py
and python ./convert_weights_pb.py
python ./demo.py --input_img <path-to-image> --output_img <name-of-output-image> --frozen_model <path-to-frozen-model>
--class_names
--weights_file
--data_format
NCHW
(gpu only) or NHWC
--tiny
--spp
--ckpt_file
--class_names
1. Path to the class names file--weights_file
--data_format
NCHW
(gpu only) or NHWC
--tiny
--spp
--output_graph
--class_names
--weights_file
--data_format
NCHW
(gpu only) or NHWC
--ckpt_file
--frozen_model
--conf_threshold
--iou_threshold
--gpu_memory_fraction
When running this line to convert yolov3 custom model to .pb format: !python convert_weights_pb.py --class_names "classes.txt" --weights_file "yolov3_training_last.weights" --data_format "NHWC"
I am getting the above error. I am running this code in google colab
Hey! I am trying to convert the yolov3 + lstm + spp model in layers, obtained from the alexeyab custom models repository.
I run the following command: python convert_weights_pb.py --class_names obj.names --data_format NHWC --weights_file yolo_v3_spp_lstm_final.weights --spp
And I get the following error:
The --spp flag does not help in any way in solving this error. How can this problem be solved? I want to prepare a model to work with OpenVINO
will yolov4 be updated?
There was a bug in the way the all zero prediction was removed from the image_prediction tensor
This solution is correct, much more simple and clear
I have a tiny yolo v3 model trained with https://github.com/AlexeyAB/darknet and would like to convert it to Tensorflow and then to Openvino IR format, as it is mentioned on their documentation.
My model has an input shape of 352x288x1 and there is no option to set width and height separately with the convert_weights_pb.py script. When still try to run it I get the following error:
ValueError: Dimension 1 in both shapes must be equal, but are 18 and 22. Shapes are [?,18,22] and [?,22,18]. for 'detector/yolo-v3-tiny/concat_3' (op: 'ConcatV2') with input shapes: [?,18,22,128], [?,22,18,256], [] and with computed input tensors: input[2] = <3>.
Does anyone know a workaround or is it planned to support rectangular input shapes? Help would be appreciated since I can not change the input shape.
tensorflow yolo tensorflow-yolo detector object-detection yolov3 deep-learning