Code Monkey home page Code Monkey logo

carnd-vehicle-detection's People

Contributors

xslittlegrass avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

carnd-vehicle-detection's Issues

Different weights file

Hi,

I was having a look at the YOLO V1 website https://pjreddie.com/darknet/yolov1/. It says the tiny-yolo.weights file should be around 103 MB. The link provided by you the readme is about 180 MB. Why are these weight files different?

Also you have provided a reference to https://github.com/sunshineatnoon/Darknet.keras in your utils file. The model architecture in that repository seems to be different than yours, both are supposed to be for YOLO v1. The Darknet.keras repo doesn't have leaky relu after every convolutional layer, but yours does. Why is that so?

Thanks,
Subodh

file

load_weights(model,'./yolo-tiny.weights')

FileNotFoundError Traceback (most recent call last)
in ()
2
3
----> 4 load_weights(model,'./yolo-tiny.weights')

/anaconda3/lib/python3.6/site-packages/utils/utils.py in load_weights(model, yolo_weight_file)
9 def load_weights(model,yolo_weight_file):
10
---> 11 data = np.fromfile('yolo_weight_file',np.float32)
12 data=data[4:]
13

FileNotFoundError: [Errno 2] No such file or directory: './yolo-tiny.weights'

Please help me to sort the issue. Thanks

training from scratch

Hi, Good Job
I want to train this model from scratch to detect traffic signs instead of cars.
How should i prepare my dataset and steps by this model.

secondly, the model is wonderful, but the output vector is some strange.
assume i want to crop the detected object to classify it.
how will i do that?
thanks in advance

ValueError: cannot convert float NaN to integer

Traceback (most recent call last):
  File "detect.py", line 69, in <module>

ax2.imshow(draw_box(boxes,image,[[500,1280],[300,650]]))
.../utils/utils.py", line 105, in draw_box
    left  = int ((b.x - b.w/2.) * w)
ValueError: cannot convert float NaN to integer

Did anyone get this error? How did you fix it?

weight- module

Hi,
I tried to reproduce you result but I found the yolo-tiny weight is not working.. Can you show me where you get the weights?

Best,
Henry

ValueError: cannot reshape array of size 136269 into shape (3,3,1024,1024)

When I am running the code, I recieve the following error-
File "C:\Users\in0131\Downloads\CarND-Vehicle-Detection-master\CarND-Vehicle-Detection-master\utils\utils.py", line 21, in load_weights
ker = data[index:index+np.prod(kshape)].reshape(kshape)
ValueError: cannot reshape array of size 136269 into shape (3,3,1024,1024)

Any idea on how to proceed?

utils library

Hi,
I got an issue with the utils library:
from utils import load_weights, Box, yolo_net_out_to_car_boxes, draw_box
It doesn't seem this library is from Keras. Can you help where to find it
Thanks
/Said

Incompatible with Keras > 2.0

The new API of any Keras version bigger than 2.0 seems to lead to unconnected networks. No error of any kind can be seen apart from that the model.summary() will not show any "Connected to" entry and the network will not find any vehicle.

Downgrading to version 1.2.2. resolves the issue.

Thanks for the great work creating this, I would fix the issue myself though I am not yet familiar enough with Keras and do not yet know how.

cannot reshape array of size 136269 into shape (3,3,1024,1024)

in ()
----> 1 load_weights(model,'./tiny-yolo-voc.weights')

in load_weights(model, yolo_weight_file)
15 bia = data[index:index+np.prod(bshape)].reshape(bshape)
16 index += np.prod(bshape)
---> 17 ker = data[index:index+np.prod(kshape)].reshape(kshape)
18 index += np.prod(kshape)
19 layer.set_weights([ker,bia])

ValueError: cannot reshape array of size 136269 into shape (3,3,1024,1024)

i try to run your code , but it shows something error, i have no idea how to fix it . can you help me ,please?

Bounding Boxes are not Shown in the Final Image

After running the script there found no bounding boxes in the output video file.Same as the input source video,tried tweaking with the threshold but no luck in that.
And the boxes variable returns an empty list.

Reading of Pre-trained weights

In the load_weights function in utils.py file, there is this line which does:

data=data[4:]
This ignores the first three values of the loaded weights array.
Can someone please tell why do we need to do this?

No bounding boxes

I downloaded the weights from http://pjreddie.com/media/files/yolo-tiny.weights but after I run the script, no bounding boxes are seen on the test images.

Finetune with My Own Dataset

@xslittlegrass Thanks for sharing your codes. It seems that you load the weights provided by YOLO team and constructs a tiny YOLO model with Keras and then predict images with feedforward pass. What if I want to train with my own dataset, i.e. object not included with YOLO training data, iPhone, iPad, etc.

Weights not loading

the load function is showing the following error -

ker = data[index:index+np.prod(kshape)].reshape(kshape)
ValueError: cannot reshape array of size 443769 into shape (3,3,1024,1024)
Can you please help?

i meet a error, maybe the yolo-tiny.weights is not right, can you help me?

kshape: (3, 3, 3, 16) data:(16175385,) - 432
kshape: (3, 3, 16, 32) data:(16175385,) - 4608
kshape: (3, 3, 32, 64) data:(16175385,) - 18432
kshape: (3, 3, 64, 128) data:(16175385,) - 73728
kshape: (3, 3, 128, 256) data:(16175385,) - 294912
kshape: (3, 3, 256, 512) data:(16175385,) - 1179648
kshape: (3, 3, 512, 1024) data:(16175385,) - 4718592
kshape: (3, 3, 1024, 1024) data:(16175385,) - 9437184
kshape: (3, 3, 1024, 1024) data:(16175385,) - 9437184

ValueError Traceback (most recent call last)
in ()
----> 1 load_weights(model,'./yolo-tiny.weights')
2 print("load_weights succeed")

E:\github\xslittlegrass-CarND-Vehicle-Detection\utils\utils.py in load_weights(model, yolo_weight_file)
21 size = np.prod(kshape)
22 print("kshape: {} data:{} - {}".format(kshape, data.shape, size))
---> 23 ker = data[index:index+size].reshape(kshape)
24 index += np.prod(kshape)
25 layer.set_weights([ker,bia])

ValueError: cannot reshape array of size 443769 into shape (3,3,1024,1024)

Fatal Python error: PyImport_GetModuleDict: no module dictionary!

Hello, @xslittlegrass
I am getting an error when i convert the ipynb file to py file using nbconvert. I am using Python 3.6 on windows 10 with all the necessary packages installed. Can you help me with this? Here is the error:

File "vehicle detection.py", line 163, in
'exec(%matplotlib.agg inline)'('time', 'lane_clip.write_videofile(project_video_output, audio=False)')
TypeError: 'str' object is not callable
Fatal Python error: PyImport_GetModuleDict: no module dictionary!

Current thread 0x00002d58 (most recent call first):
File "C:\Users\rohit\AppData\Local\Programs\Python\Python36\lib\site-packages\moviepy\video\io\VideoFileClip.py", line 116 in del

Thanks in advance.

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.