Code Monkey home page Code Monkey logo

tinyyolov2's Issues

Support YOLOv2

Did you plan to support YOLOv2 ?
If yes, do you know when ?
If no, do you know why ?
And what we could do to help to do it ?

Thanks

class prediction in test.py

thanks you for your code.

in the test.py, class prediction is calculated per a grid cell.
why is it?
i think, it is calculated based on all grid cell.

How to open the binary weights file?

Hi, Simo! You've done an amazing project and really help me a lot! I have a small question that how do you open the binary weights file like tiny-yolo-voc.weights? I wanted to edit it with 'vi tiny-yolo-voc.weights' or 'gedit tiny-yolo-voc.weights' in Ubuntu 16.04 but failed. Does it need any special applications to open it? Thx.

Offset and loaded weights differ by one

Hi,

I was inspired by your code on loading weights for tiny yolo v2 from coco weight file. I have implemented my yolo network as below:
YOLO-Net

Yolo-Sub-Func

However, there is a difference in the final offset and loaded weights of 1. I am not able to figure out what mistake I am making. Could you please help me out?
Here is more details:
LoadingWeight
LoadingWeight_2
LoadingWeight_3
WeightLoader

Size of weight file is -> 44948600
Total number of params to load = 11237146
Loading 496 weights of conv0 ...
Loading 4736 weights of conv1 ...
Loading 18688 weights of conv2 ...
Loading 74240 weights of conv3 ...
Loading 295936 weights of conv4 ...
Loading 1181696 weights of conv5 ...
Loading 4722688 weights of conv6 ...
Loading 4720640 weights of conv7 ...
Loading 218025 weights of conv8 ...
len-> 11237145
len-> 11237146
Final offset = 11237145
Total number of params in the weight file = 11237146

Name of All Variables:
All Var [<tf.Variable 'conv0/kernel:0' shape=(3, 3, 3, 16) dtype=float32_ref>, <tf.Variable 'conv0_bn/gamma:0' shape=(16,) dtype=float32_ref>, <tf.Variable 'conv0_bn/beta:0' shape=(16,) dtype=float32_ref>, <tf.Variable 'conv0_bn/moving_mean:0' shape=(16,) dtype=float32_ref>, <tf.Variable 'conv0_bn/moving_variance:0' shape=(16,) dtype=float32_ref>, <tf.Variable 'conv1/kernel:0' shape=(3, 3, 16, 32) dtype=float32_ref>, <tf.Variable 'conv1_bn/gamma:0' shape=(32,) dtype=float32_ref>, <tf.Variable 'conv1_bn/beta:0' shape=(32,) dtype=float32_ref>, <tf.Variable 'conv1_bn/moving_mean:0' shape=(32,) dtype=float32_ref>, <tf.Variable 'conv1_bn/moving_variance:0' shape=(32,) dtype=float32_ref>, <tf.Variable 'conv2/kernel:0' shape=(3, 3, 32, 64) dtype=float32_ref>, <tf.Variable 'conv2_bn/gamma:0' shape=(64,) dtype=float32_ref>, <tf.Variable 'conv2_bn/beta:0' shape=(64,) dtype=float32_ref>, <tf.Variable 'conv2_bn/moving_mean:0' shape=(64,) dtype=float32_ref>, <tf.Variable 'conv2_bn/moving_variance:0' shape=(64,) dtype=float32_ref>, <tf.Variable 'conv3_1/kernel:0' shape=(3, 3, 64, 128) dtype=float32_ref>, <tf.Variable 'conv3_1_bn/gamma:0' shape=(128,) dtype=float32_ref>, <tf.Variable 'conv3_1_bn/beta:0' shape=(128,) dtype=float32_ref>, <tf.Variable 'conv3_1_bn/moving_mean:0' shape=(128,) dtype=float32_ref>, <tf.Variable 'conv3_1_bn/moving_variance:0' shape=(128,) dtype=float32_ref>, <tf.Variable 'conv4_1/kernel:0' shape=(3, 3, 128, 256) dtype=float32_ref>, <tf.Variable 'conv4_1_bn/gamma:0' shape=(256,) dtype=float32_ref>, <tf.Variable 'conv4_1_bn/beta:0' shape=(256,) dtype=float32_ref>, <tf.Variable 'conv4_1_bn/moving_mean:0' shape=(256,) dtype=float32_ref>, <tf.Variable 'conv4_1_bn/moving_variance:0' shape=(256,) dtype=float32_ref>, <tf.Variable 'conv5_1/kernel:0' shape=(3, 3, 256, 512) dtype=float32_ref>, <tf.Variable 'conv5_1_bn/gamma:0' shape=(512,) dtype=float32_ref>, <tf.Variable 'conv5_1_bn/beta:0' shape=(512,) dtype=float32_ref>, <tf.Variable 'conv5_1_bn/moving_mean:0' shape=(512,) dtype=float32_ref>, <tf.Variable 'conv5_1_bn/moving_variance:0' shape=(512,) dtype=float32_ref>, <tf.Variable 'conv6_1/kernel:0' shape=(3, 3, 512, 1024) dtype=float32_ref>, <tf.Variable 'conv6_1_bn/gamma:0' shape=(1024,) dtype=float32_ref>, <tf.Variable 'conv6_1_bn/beta:0' shape=(1024,) dtype=float32_ref>, <tf.Variable 'conv6_1_bn/moving_mean:0' shape=(1024,) dtype=float32_ref>, <tf.Variable 'conv6_1_bn/moving_variance:0' shape=(1024,) dtype=float32_ref>, <tf.Variable 'conv6_3/kernel:0' shape=(3, 3, 1024, 512) dtype=float32_ref>, <tf.Variable 'conv6_3_bn/gamma:0' shape=(512,) dtype=float32_ref>, <tf.Variable 'conv6_3_bn/beta:0' shape=(512,) dtype=float32_ref>, <tf.Variable 'conv6_3_bn/moving_mean:0' shape=(512,) dtype=float32_ref>, <tf.Variable 'conv6_3_bn/moving_variance:0' shape=(512,) dtype=float32_ref>, <tf.Variable 'conv_dec/kernel:0' shape=(1, 1, 512, 425) dtype=float32_ref>, <tf.Variable 'conv_dec/bias:0' shape=(425,) dtype=float32_ref>]
Thanks

Hello,thank you for your code.

My question is ,is the network in net.py is based on MobilenetV1? I want to change the net.py based on MobilenetV2,what should I do ? Thank you very much!

Tiny Yolo is very slow on Jetson TX1

hi simo,
hw r u doing....

i have taken your tinyYOLOv2 and start running on my GPU(GTX-980), its working good. But i need the same tiny-yolo to be implemented on Jetson TX1. I have tried that, but it was very slow it was around 2 fps but where as in my GPU its touching to 30fps. Earlier to tiny-yolo i have done people detection and is working well on TX1. My Jetson TX1 board is of 4GB RAM and even i have swapped with 16GB(total 20GB). So, could you please suggest me ways to increase the speed.

implemented on :
Ubuntu 16.04
Tensorflow 1.0
Python 2.7
OpenCV 3.0
Numpy 1.13.0

thanks in advance,
parvez.

Purpose of load_conv_layer_bn

Hi, I finally figured out the purpose for my NaN value. It's due to line 53 of https://github.com/simo23/tinyYOLOv2/blob/master/weights_loader.py which is:
scale = gammas[i] / np.sqrt(var[i] + net.bn_epsilon)
as there was a negative number being square root. However, because I do not fully understand the code, I am unable to figure out why the negative value exist. It is definitely due to this line:
var = loaded_weights[offset:offset+n_bn_var] at line 42 but I am not very sure what var is for.. I am puzzled since the only difference between my code and yours is that I have 1 class only while you have 20 so I change the relevant parts such as the last layer. Sorry for the trouble man!

test.py crashes

[~/tinyYOLOv2]$ python3 test.py

Total number of params = 15867885
2018-12-25 11:34:48.750981: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
Looking for a checkpoint...
No checkpoint found!
Loading weights from file and creating new checkpoint...
Total number of params to load = 15867885
Loading 496 weights of conv1 ...
Loading 4736 weights of conv2 ...
Loading 18688 weights of conv3 ...
Loading 74240 weights of conv4 ...
Loading 295936 weights of conv5 ...
Loading 1181696 weights of conv6 ...
Loading 4722688 weights of conv7 ...
Loading 9441280 weights of conv8 ...
Loading 128125 weights of conv9 ...
Final offset = 15867885
Total number of params in the weight file = 15867885
Saving new checkpoint to the new checkpoint directory ./ckpt/ !
Preprocessing...
Traceback (most recent call last):
File "test.py", line 249, in
tf.app.run(main=main)
File "/home/amd/.local/lib/python3.5/site-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "test.py", line 237, in main
preprocessed_image = preprocessing(input_img_path,input_height,input_width)
File "test.py", line 82, in preprocessing
resized_image = cv2.resize(input_image,(input_height, input_width), interpolation = cv2.INTER_CUBIC)
cv2.error: OpenCV(3.4.4) /io/opencv/modules/imgproc/src/resize.cpp:3784: error: (-215:Assertion failed) !ssize.empty() in function 'resize'

Outdated weights file name

It looks like the app expects a different name for the weights file being downloaded. Renaming the file works.

mv yolov2-tiny-voc.weights ./tiny-yolo-voc.weights

Any update on training part

@simo23 Thanks for your wonderful work!
I am trying the low-precision version of tiny-yolo recently, and I wonder if there is any update on training part.
Best wishes!

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.