Community
cancel
Showing results for 
Search instead for 
Did you mean: 
349 Views

What are coords in the yolo_v3.json file?

Hi!

I try to convert a yolov3 model to IR following this tuto: https://software.intel.com/en-us/articles/OpenVINO-Using-TensorFlow#converting-a-darknet-yolo-model

They ask to change some variables in the yolo_v3.json file and one of them is called "coords". I can't find it in my cfg file.

Can you tell me what are the "coords" and what I should set it to?

Here is my yolo_v3.json file:

[
  {
    "id": "TFYOLOV3",
    "match_kind": "general",
    "custom_attributes": {
        "classes": 1,
        "coords": 4,
        "num": 9,
        "mask": [0, 1, 2],
        "entry_points": ["detector/yolo-v3/Reshape", "detector/yolo-v3/Reshape_4", "detector/yolo-v3/Reshape_8"]

    }
  }
]

 

And here is the YOLO part of my cfg file:

[yolo]
mask = 0,1,2
anchors = 10,13,  16,30,  33,23,  30,61,  62,45,  59,119,  116,90,  156,198,  373,326
classes=1
num=9
jitter=.3
ignore_thresh = .7
truth_thresh = 1
random=1

Thank you!!

Quentin

PS: Should I also change my entry_points?

0 Kudos
3 Replies
Shubha_R_Intel
Employee
349 Views

Quentin I do understand your confusion. Indeed the "coords" is not found in any cfg file. In the examples I've seen, coords should be left at '4'. This blog article explains it well : https://hackernoon.com/understanding-yolo-f5a74bbc7967 

Coords represent the number of bounding box coordinates x,y,w,h . So the default value of '4' should work fine.

To answer your question about entry_points, those should match the actual entry points in the frozen pb file. So the best way to see what those are is to view frozen_yolo.pb in Tensorboard OR dump frozen_yolo.pb into a text file.  Look/Search for Reshape and you will see what the correct hierarchical name should be. For instance, I know for tiny yolo it looks different so the only way you can really know the entry point name is by actually inspecting the graphdef.

Hope this helps and thanks for using OpenVino.

Shubha

349 Views

Thank you Shubha! It makes sence.

About the entry points, I looked at my pb file using nano and searched for Reshape. And I've found a whole bunch of file paths with "Reshape" in it.

Should I copy all of them in the entry points of just a few of them? If so... which ones?

You can download my pb file here if you want: https://we.tl/t-tb6J1KLj2c

Quentin

Shubha_R_Intel
Employee
349 Views

Hi there. Yes there will be more than one Reshape. But if you look at yolo_v3.json you will see this line:

 "entry_points": ["detector/yolo-v3/Reshape", "detector/yolo-v3/Reshape_4", "detector/yolo-v3/Reshape_8"]

When looking at the frozen_pb.txt search for Reshape, Reshape_4 and Reshape_8.  You will see the following :

"prefix/detector/yolo-v3/Reshape/shape"

"prefix/detector/yolo-v3/Reshape_4/shape"

"prefix/detector/yolo-v3/Reshape_8/shape"

You can leave the prefix part out since MO's yolo_v3.json doesn't use it.

Thanks,

Shubha

 

Reply