Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.

I improved the precision of my tiny-YoloV3's Github repository

Hyodo__Katsuya
Innovator
1,923 Views
Hello everyone. I solved the problem of low precision. (Python) There was a mistake in the logic of preprocessing and postprocessing. It can be estimated with accuracy of 2 to 3 times of the previous one. I'm sorry for the inconvenience. https://github.com/PINTO0309/OpenVINO-YoloV3.git
0 Kudos
10 Replies
McDonald__Shaun
Beginner
1,923 Views

A good man admits his mistakes - a great man corrects them! Thank you, sir!

0 Kudos
Shubha_R_Intel
Employee
1,923 Views

Wonderful Katsuya  !

Thanks !

Shubha

0 Kudos
Lee__Terry
Beginner
1,923 Views

That is great Katsuya. I have being waiting for a solution to the problems. I will try it out with NSC2.

Thanks,

Terry 

0 Kudos
nikos1
Valued Contributor I
1,923 Views

Thank you Katsuya-san!

0 Kudos
Lee__Terry
Beginner
1,923 Views

Hello Katsuya,

Thanks again for solving the yolo3 precision issue.

I was able to see the precision improvements when running your example with my data.

I get an error when converting weight using the weight from the download.

The command is: python convert_weights.py  --weights_file E:\t\yolo3\OpenVINO-YoloV3-master\weights\yolov3-tiny.weights --class_names coco.names --size 416 --data_format NHWC

Output:

lov3-tiny.weights --class_names coco.names --size 416 --data_format NHWC
detect_1.shape = (1, 507, 85)
detect_2.shape = (1, 2028, 85)
detect_3.shape = (1, 8112, 85)
Traceback (most recent call last):
  File "convert_weights.py", line 52, in <module>
    tf.app.run()
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run
    _sys.exit(main(argv))
  File "convert_weights.py", line 40, in main
    scope='detector'), FLAGS.weights_file)
  File "E:\t\yolo3\OpenVINO-YoloV3-master\utils.py", line 122, in load_weights
    (shape[3], shape[2], shape[0], shape[1]))
ValueError: cannot reshape array of size 391694 into shape (512,256,3,3)

 

Did I missed something simple ?

Should I follow the link  https://github.com/jinyu121/DW2TF to convert  yolo model to tensorflow ?

Thanks,

Terry

 

 

 

0 Kudos
Hyodo__Katsuya
Innovator
1,923 Views

I am also examining the problem now.

It takes a little time.

0 Kudos
Lee__Terry
Beginner
1,923 Views

Thanks for looking into it.

0 Kudos
Golkar__Grace
Beginner
1,923 Views

Lee, Terry wrote:

Hello Katsuya,

Thanks again for solving the yolo3 precision issue.

I was able to see the precision improvements when running your example with my data.

I get an error when converting weight using the weight from the download.

The command is: python convert_weights.py  --weights_file E:\t\yolo3\OpenVINO-YoloV3-master\weights\yolov3-tiny.weights --class_names coco.names --size 416 --data_format NHWC

Output:

lov3-tiny.weights --class_names coco.names --size 416 --data_format NHWC
detect_1.shape = (1, 507, 85)
detect_2.shape = (1, 2028, 85)
detect_3.shape = (1, 8112, 85)
Traceback (most recent call last):
  File "convert_weights.py", line 52, in <module>
    tf.app.run()
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run
    _sys.exit(main(argv))
  File "convert_weights.py", line 40, in main
    scope='detector'), FLAGS.weights_file)
  File "E:\t\yolo3\OpenVINO-YoloV3-master\utils.py", line 122, in load_weights
    (shape[3], shape[2], shape[0], shape[1]))
ValueError: cannot reshape array of size 391694 into shape (512,256,3,3)

 

Did I missed something simple ?

Should I follow the link  https://github.com/jinyu121/DW2TF to convert  yolo model to tensorflow ?

Thanks,

Terry

 

 

 

Hi Terry,

Actually ,I have exact problem with yolo tiny version3 .I was wondering whether you have found a solution for it .If yes could you please share it with me .Thanks .

0 Kudos
Golkar__Grace
Beginner
1,923 Views

Hi Terry,

 I have the same problem with Yolo tiny v3 .

File "load_weights.py", line 44, in load_weights
    (shape[3], shape[2], shape[0], shape[1]))
ValueError: cannot reshape array of size 391694 into shape (512,256,3,3)

 

I was wondering whether you found a solution and if yes could you please share it with me .

Thanks .

Grace

 

0 Kudos
Hyodo__Katsuya
Innovator
1,923 Views
0 Kudos
Reply