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

parse_darknet_yolo2.py #8

Open
gengmujian10 opened this issue Sep 11, 2017 · 5 comments
Open

parse_darknet_yolo2.py #8

gengmujian10 opened this issue Sep 11, 2017 · 5 comments

Comments

@gengmujian10
Copy link

INFO:tensorflow:yolo2_darknet/conv20/BatchNorm/moving_variance: [1024]=1024
<class 'numpy.int32'>
INFO:tensorflow:yolo2_darknet/conv20/weights: [3, 3, 3072, 1024]=28311552
<class 'numpy.int32'>
Traceback (most recent call last):
File "parse_darknet_yolo2.py", line 137, in
main()
File "parse_darknet_yolo2.py", line 94, in main
p = struct.unpack('%df' % cnt, f.read(4 * cnt))
struct.error: unpack requires a bytes object of length 113246208

I print the value of(4*cnt). It actually equals to 113246208, and the type of cnt is int32.
And I do not know how to solve this problem.....
Could anyone tell me about it ?
Thank you !

@huseinzol05
Copy link

@ruiminshen not really follow the real model YOLOv2 architecture

@simo23
Copy link

simo23 commented Sep 21, 2017

Hi,
@gengmujian10 did you check your python version? The author stated that he used python 3 so that could be the problem. I had the same issue in a similar case while unpacking some binary values and it was my wrong version of python.
By the way, if you want to give it a try there is the same code but by @huseinzol05 in its github!

@huseinzol05 could you please state why do you think this is wrong? I m trying to implement YOLOv2, I already made the forward as you did but I cannot find a valid training part. Are you working on it?
Thanks,
Andrea

@huseinzol05
Copy link

based on .cfg from darknet

[route]
layers=-9

[convolutional]
batch_normalize=1
size=1
stride=1
pad=1
filters=64
activation=leaky

from inference.py,

_net = reorg(passthrough)

supposed,

passthrough = slim.layers.conv2d(passthrough, 64)
_net = reorg(passthrough)

@ThatAIGeek
Copy link

so is there a solution for this problem?

@ashleyjsands
Copy link

I think I encountered this problem and I believe I got around the problem by downloading and using the yolo-full.weights file stored in the Google Drive link.

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

5 participants