Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yolov3_tiny_3l support! #95

Open
BackT0TheFuture opened this issue May 10, 2020 · 9 comments
Open

yolov3_tiny_3l support! #95

BackT0TheFuture opened this issue May 10, 2020 · 9 comments

Comments

@BackT0TheFuture
Copy link

would you like to add support for yolov3_tiny_3l.cfg?
thx!

@eizamaliev
Copy link

@goodtogood could you provide weights and some ground-truth data for testing?

@BackT0TheFuture
Copy link
Author

@eizamaliev
Hi, weights and cfg and some test images are uploaded to google drive,
the model was trained for face mask detection.
there are two classes, no_mask & face_mask.
you can get files following this link

@eizamaliev
Copy link

See #98

Also I tried to run your model with OpenVINO succesfully. See YOLO demo. If you would have any problem with it, you can freely ask me.

@BackT0TheFuture
Copy link
Author

BackT0TheFuture commented Jun 12, 2020

Hi @eizamaliev
I can convert darknet weights file to pb of tensorflow using the command below

python convert_weights_pb.py --class_names mask_yvt3l_608.names --data_format NHWC --weights_file mask_yvt3l_608.weights --tiny_3l --size 608 --output_graph mask_yvt3l_608.pb

but error occured when converting to IR of openvino
I found the command below by the link

python mo_tf.py --input_model ./mask_yvt3l_608.pb --tensorflow_use_custom_operations_config yolo_v3_tiny_3l.json

how to make yolo_v3_tiny_3l.json correctlly?
thanks!

@eizamaliev
Copy link

Hi @goodtogood
It would much easier if you provided .json file, but fine.

[
  {
    "id": "TFYOLOV3",
    "match_kind": "general",
    "custom_attributes": {
      "classes": 2,
      "anchors": [4,7, 7,15, 13,25,   25,42, 41,67, 75,94,   91,162, 158,205, 250,332],
      "coords": 4,
      "num": 9,
      "masks": [[6,7,8], [3, 4, 5], [0, 1, 2]],
      "entry_points": ["detector/yolo-v3-tiny/Reshape", "detector/yolo-v3-tiny/Reshape_4", "detector/yolo-v3-tiny/Reshape_8"]
    }
  }
]

Also you should add these options for MO --reverse_input_channels --input_shape [1,608,608,3] --input inputs

@GotG
Copy link

GotG commented Sep 7, 2020

Hello @eizamaliev

I am trying to convert a slimmed down tiny yolo v3 to OpenVINO trained on 2 classes, mask and no mask. I manage to do that, however when i run inference using the .bin and .xml I get no detections.
What do you think is wrong? Thanks!

Below are the weights and the model config.
https://drive.google.com/file/d/1Jl-lIJafAYy6mqp6sVn-lCTerfsUjAWz/view?usp=sharing
yolo_v3_tiny_mod.txt

@eizamaliev
Copy link

Hi @GotG

I not able to answer you question, because you provide too little information. Please, provide:

  • conversion process (with keys, additional files, etc) (or provide IR)
  • how do you infer this model (with OMZ demo or your own)

Will be glad to help!

@GotG
Copy link

GotG commented Sep 8, 2020

Hello

The inference in darknet works well using the weights above.
To convert the weights to .pb I modify yolo v3 tiny from this repo to fit the config I shared above. Here I already have a problem, as the inference results are different using the .pb in tf vs the original in darknet.
Then I convert the .pb to xml and bin using the standard OpenVINO way with the MO (which works well for the regular tiny yolo v3 models). For inference I use your yolo detection code from OMZ python demos. Again, this works for the standard tiny model cfg. But it does not work for the xml from my cfg. There are no detections.

The zip below contains all the files mentioned above:
https://drive.google.com/file/d/1PnsxwNKIMugR2zvi24lx3uQX51wr1GN2/view?usp=sharing

Thank you!

@GotG
Copy link

GotG commented Sep 15, 2020

Hi @eizamaliev any advice for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants