Giter VIP home page Giter VIP logo

caffe-yolov2's People

Contributors

ctmackay avatar gklz1982 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  avatar  avatar  avatar  avatar  avatar

caffe-yolov2's Issues

how to detect a img?

hello, I want to detect a img use yolo-caffe, but all py sripts in your github , will only do cnn in caffe, and box detection with python (that's low performance)

and I try use the prototxt in example/indoor, the last layer seems error , the last layer I think is "DetectionOutput", and the last Convolution numoutput is 125.

would you please give a example to show: how to use caffe to detect a image with your yolo-caffe

Logical error in BoxDataLayer?

When reading the source code of BoxDataLayer. (code) It brings me to here. It seems that box labels are not transformed, but image is transformed (crop, mirror) in Transform(cv_img, transformed_blob) in testing stage. I assume this would cause fatal error such as box labels out of range of images.

Similar situation happens in training stage code. It seems you random shift the position of box labels. You resize the image to its origin size, while keeping box labels unresized. Then you transform the image, and do nothing to box labels.

Since I do not have the dataset, I cannot reproduce the "error". But it looks incorrect intuitively.

Aborted at 1526157655 (unix time) try "date -d @1526157655" if you are using GNU date

Thank you for your sharing
l meet a strange problem, log as follow:
I0513 04:40:55.310163 5815 caffe.cpp:223] Starting Optimization
I0513 04:40:55.310175 5815 solver.cpp:280] Solving YOLONET
I0513 04:40:55.310178 5815 solver.cpp:281] Learning Rate Policy: multifixed
*** Aborted at 1526157655 (unix time) try "date -d @1526157655" if you are using GNU date ***
PC: @ 0x7f9c4e389fea caffe::get_region_box<>()
*** SIGSEGV (@0x0) received by PID 5815 (TID 0x7f9c4f02c740) from PID 0; stack trace: ***
@ 0x7f9c4c6b94b0 (unknown)
@ 0x7f9c4e389fea caffe::get_region_box<>()
@ 0x7f9c4e38e8c0 caffe::RegionLossLayer<>::Forward_cpu()
@ 0x7f9c4e3e03c7 caffe::Net<>::ForwardFromTo()
@ 0x7f9c4e3e0737 caffe::Net<>::Forward()
@ 0x7f9c4e422730 caffe::Solver<>::Step()
@ 0x7f9c4e4231be caffe::Solver<>::Solve()
@ 0x40e7b4 train()
@ 0x408c4d main
@ 0x7f9c4c6a4830 __libc_start_main
@ 0x4095b9 _start
Segmentation fault (core dumped)
thanks for you reply !

cudnn version and reorg_param problems

Very impressive work! I got two problems. First, what's your cudnn version? Mine is 6.0.21. When I build your project, there's something wrong with cudnn version. Then I change the corresponding cpp and hpp to the official caffe ones, I build your project successfully.
But when I run convert_weights_to_caffemodel.py, error ocurrs "caffe.LayerParameter" has no field named "reorg_param". Could help me fix this? Thanks a lot.

test result is error

I use your code change yolo.cfg yolo.weights to yolo.prototxt yolo.caffemodel.
use "test_yolo_v2.py" to detect a image("dog.jpg"),but the result is error. i find "obj_score"(in test_yolo_v2.py means confidence) is not credible.the obj_score's value is -11.53 -14.98 -22.15 and so on.
can you give me some suggestions
1、maybe the model is change wrong ?
2、the input image is wrong?
3、the yolo.weights cannot detect very well?

error appear at the begining.

I0804 17:49:41.090296 13616 solver.cpp:245] Train net output #0: region1 = 130.248 (* 1 = 130.248 loss)
I0804 17:49:41.090306 13616 sgd_solver.cpp:115] Iteration 0, lr = 0.0001
I0804 17:50:22.566540 13616 region_loss_layer.cpp:469] avg_noobj: 0.440657 avg_obj: 0.441241 avg_iou: 0.623299 avg_cat: 0.250071 recall: 1 class_count: 5
I0804 17:50:53.259757 13616 solver.cpp:229] Iteration 20, loss = 104.177
I0804 17:50:53.259923 13616 solver.cpp:245] Train net output #0: region1 = 96.0165 (* 1 = 96.0165 loss)
I0804 17:50:53.259968 13616 sgd_solver.cpp:115] Iteration 20, lr = 0.0001
I0804 17:51:07.790935 13616 region_loss_layer.cpp:469] avg_noobj: 0.348465 avg_obj: 0.348111 avg_iou: 0.431767 avg_cat: 0.250216 recall: 0.391304 class_count: 23
I0804 17:51:53.122269 13616 region_loss_layer.cpp:469] avg_noobj: 0.270268 avg_obj: 0.270857 avg_iou: 0.55787 avg_cat: 0.24985 recall: 0.857143 class_count: 7
I0804 17:52:06.210116 13616 solver.cpp:229] Iteration 40, loss = 49.2193
I0804 17:52:06.210199 13616 solver.cpp:245] Train net output #0: region1 = 41.1888 (* 1 = 41.1888 loss)
I0804 17:52:06.210211 13616 sgd_solver.cpp:115] Iteration 40, lr = 0.0001
I0804 17:52:39.102437 13616 region_loss_layer.cpp:469] avg_noobj: 0.223499 avg_obj: 0.225008 avg_iou: 0.568238 avg_cat: 0.250957 recall: 0.666667 class_count: 6
F0804 17:53:05.186326 13616 region_loss_layer.cpp:234] **Check failed: ## swap_data[index] >= 0 (-nan vs. 0)
*** Check failure stack trace: *****
@ 0x7f2e06772daa (unknown)

why the value below 0 ?

Got training stuck.

image
I waited for a long time but the training is stuck just like on the picture above. Any solution?

what's tje required cudnn version?

Hi, when I compile your project, error occurs due to cudnn version problem, so I compile without cudnn. So first I am wondering what's your cudnn version?
My model in tiny-yolov2, got 1 class to detect, when I train my model, error ocurrs:
''F0928 12:13:05.047139 1687 region_loss_layer.cpp:182] Check failed: input_count == tmp_input_count (4320 vs. 5070) ''
So what does '30' mean in region_loss_layer.cpp, line 181? What else code should I change? Thanks a lot

How do I get mAP?

The test_yolo_v2.py script doesn't seem to read the ground truth in .xml files and compute mAP.

Segmentation fault when running examples/indoor/eval_detection test_yolo_v2.py

Description:
I was able to convert the yolo.weights to caffemodel successfuly using the script convert_weights_to_caffemodel.py, but when I try to run a detection example, it is causing a segmentation fault. Platform am using is Jetson-TX2

Error log:
0727 05:31:26.794594 18700 net.cpp:261] This network produces output detection_eval
I0727 05:31:26.794610 18700 net.cpp:261] This network produces output region1
I0727 05:31:26.794724 18700 net.cpp:274] Network initialization done.
/home/nvidia/.local/lib/python2.7/site-packages/skimage/io/_io.py:49: UserWarning: as_grey has been deprecated in favor of as_gray
warn('as_grey has been deprecated in favor of as_gray')
/home/nvidia/.local/lib/python2.7/site-packages/skimage/transform/_warps.py:105: UserWarning: The default mode, 'constant', will be changed to 'reflect' in skimage 0.15.
warn("The default mode, 'constant', will be changed to 'reflect' in "
/home/nvidia/.local/lib/python2.7/site-packages/skimage/transform/_warps.py:110: UserWarning: Anti-aliasing will be enabled by default in skimage 0.15 to avoid aliasing artifacts when down-sampling images.
warn("Anti-aliasing will be enabled by default in skimage 0.15 to "
Segmentation fault (core dumped)

Crash log:
0000007f967836f8 in std::vector<float, std::allocator > caffe::get_region_box(float*, std::vector<float, std::allocator >, int, int, int, int, int, int) () from /home/nvidia/caffe/python/caffe/../../build/lib/libcaffe.so.1.0.0-rc3

Can you please let me know what am missing?

How to convert the weights to caffemodel?

Thanks for your share.I meet a problem when I try to convert the weights to caffemodel.
python convert_weights_to_caffemodel.py yolo.prototxt yolo.weights yolo.caffemodel
the yolo.prototxt is provided by you,and the yolo.caffemodel(yolov2) is downloaded from https://github.com/AlexeyAB/darknet ,when I run the program,I got the error:
conv20(conv)
bn20(batchnorm)
scale20(scale)
conv21(conv)
Traceback (most recent call last):
File "convert_weights_to_caffemodel.py", line 70, in
net.params[pr][0].data[...] = np.reshape(netWeights[count:count + weightSize], dims)
File "/home/zcy/.local/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 232, in reshape
return _wrapfunc(a, 'reshape', newshape, order=order)
File "/home/zcy/.local/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 57, in _wrapfunc
return getattr(obj, method)(*args, **kwds)
ValueError: cannot reshape array of size 12265129 into shape (1024,3072,3,3)
I dont know why this happened?

How about the speed?

Hi,
Are there speed evaluation about this yolo solution?
such as comparing with SSD...
Thank you.

Question about Input data "BoxData"

Hi, thanks for your sharing. I found that you did not have Annotated Data layer in this repo. Can I use Annotated Data such as VOC0712 to train and test?

why train batch_size = 1 , pad = 0 and how to predicct?

Thank you for sharing the code. I have some questions, could you give me some advice?
Q1: Why batch = 1 in train.prototxt? The training process is very slow. I change this param, but there is no change in cuda momery, why?
Q2: Error occured when pad = 1 ( in layer conv4), but pad = 0 is ok, why? pad in darknet was setted 1.
**Q3:**How to use your code to predict images?
Look forward to your reply!

Run this demo

hi ,thanks for your codes.I have trained my data and get model,but i don't know how to run your codes to detect a picture,Could you tell me the way?Thanks!

Apply this to movidius

Hello, I want to know if yolov2 using this tensorflow model can be used on intel's moveidius?

train own data

hei ,thanks for your share , i have a question is how to deal with the picture's labels ? could you give me an example of image labels ?need your help!

Loss

Hi,thanks for your code. I updated train.prototxt and trained on my own 9 class data, but the loss no longer drops when the loss drops to 26.Can you help me?

How to convert the weights to caffemodel

when I use your convert_weights_to_caffemodel.py
python convert_weights_to_caffemodel.py yolo.prototxt yolo.weights yolo.caffemodel
I met the problem that the reorg is not define,how to solve it

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.