Code Monkey home page Code Monkey logo

yolo2openvino's People

Contributors

tersekmatija avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

yolo2openvino's Issues

ValueError: cannot reshape array of size 372388 into shape (256,256,3,3)

hello,
when i run like this:
python convert_weights_pb.py --yolo 4 --voc.data --output yolov4-duck.pb --weights_file /yolov4-tiny-duck_last.weights --size 416
and error occur!:
Traceback (most recent call last):
File "convert_weights_pb.py", line 94, in
tf.app.run()
File "/home//anaconda3/envs/change/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "/home/
/.local/lib/python3.6/site-packages/absl/app.py", line 303, in run
_run_main(main, args)
File "/home//.local/lib/python3.6/site-packages/absl/app.py", line 251, in _run_main
sys.exit(main(argv))
File "convert_weights_pb.py", line 78, in main
load_ops = load_weights(tf.global_variables(scope='detector'), FLAGS.weights_file)
File "/home/
/Documents/ceprei/yolo2openvino/utils/utils.py", line 113, in load_weights
(shape[3], shape[2], shape[0], shape[1]))
ValueError: cannot reshape array of size 372388 into shape (256,256,3,3)

how can i fix it?

thank you!

question abour anchors and mask

Hi, I have questions about anchors and mask. So in case of yolov4-tiny, the [yolo] layer in cfg file is
First yolo layer

[yolo]
mask = 3,4,5
anchors = 10,14,  23,27,  37,58,  81,82,  135,169,  344,319
classes=1
num=6
jitter=.3
scale_x_y = 1.05
cls_normalizer=1.0
iou_normalizer=0.5
iou_loss=giou
ignore_thresh = .9
truth_thresh = 1
random=0
resize=1.5
nms_kind=greedynms
beta_nms=0.6
#new_coords=1
#scale_x_y = 2.0

Second yolo layer

[yolo]
mask = 1,2,3
anchors = 10,14,  23,27,  37,58,  81,82,  135,169,  344,319
classes=1
num=6
jitter=.3
scale_x_y = 1.05
cls_normalizer=1.0
iou_normalizer=0.5
iou_loss=giou
ignore_thresh = 0.9
truth_thresh = 1
random=1
resize=1.5
nms_kind=greedynms
beta_nms=0.6
max=200
#new_coords=1
#scale_x_y = 2.0

So as you explained about Anchors here, when I specify the argument on convert_weights_pb.py , I need to put it like this? -a 23,27,37,58,81,82,81,82,135,169,344,319
Because it uses 1,2,3 and 3,4,5 mask, so index 3 would be double?

How to Transform yolov4-custom to .pb

Hi,

I'm using a darknet yolov4-custom model for detecting small objects modified according to this guide darknet-small-objects, which we plan to run on a depthAI device (we will later change to yolov4-tiny, also customized). However, I'm having troubles to adapt your code so I can convert to .pb format (Im following your colab guide to transform darknet to blob)

So far I understand a bit how your code works to transform darknet yolo to tensorflow .pb and I've managed to modify the code for custom classes, anchors and masks. However, one of the modifications made on my custom yolo was set layers = 23 instead of layers = 54 in the route before the firs yolo layer (L895 in custom .cfg). As I understand, this means that I have to replace up_route_54 in L100 and L102 with up_route_23, but I do not know how to capture up_route_23, any guide or idea?

I've also modified the stride = 2 to stride = 4 in the line just before the modified route. Do I have to change something else related to this stride?.

Thanks!

Add demo

Add a simple demo for both, TF model and OpenVINO model.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.