Open bonzoq opened 6 years ago
You should recompile with OpenCV=0
then the result will be saved as an image in the root folder of darknet. The OpenCV is only used to show detections in a window and since you are using the AWS I assume you are doing it through an ssh connection.
@bonzoq Results of successfully training on Windows and Linux: https://github.com/AlexeyAB/darknet/issues/243#issuecomment-340908751
Can you get any bounded boxes using this command?
./darknet detector test cfg/voc.data cfg/yolo-voc.cfg backupVOC/yolo-voc_300.weights VOCdevkit/VOC2007/JPEGImages/009460.jpg -thresh 0.01
Thanks for your quick responses @TheMikeyR and @AlexeyAB.
I recompiled with OpenCV=0
and even with the threshold set to 0.01 I get no detections.
Threshold 0.00 also gives no detections. When I use the original yolo model I get plenty of detections.
I have the same problem. But training with tiny-yolo-voc.cfg is ok.
@bonzoq
When I use the original yolo model I get plenty of detections.
Do you use yolo-voc_300.weights
trained on my fork, to test on original fork, and it gives plenty of detections?
Do you use batch=64 and subdivison=8 in your yolo-voc.cfg
file for training?
Try to update code from the last commit, and try to train again using in your cfg-file such params:
learning_rate=0.0001
steps=100,25000,35000
scales=10,.1,.1
@AlexeyAB
When I use your fork to perform detections on this one image I mentioned above (VOCdevkit/VOC2007/JPEGImages/009460.jpg
) with the model https://pjreddie.com/media/files/yolo.weights I get plenty of detections. yolo-voc_300.weights
I trained on your fork. When I try to use it to perform detections on the same image I get zero detections.
Yes, I use batch=64
and subdivison=8
in my yolo-voc.cfg file for training.
I will try to retrain using your last commit and updated cfg file.
Thanks, I will let you know!
@bonzoq
When I use your fork to perform detections on this one image I mentioned above (
VOCdevkit/VOC2007/JPEGImages/009460.jpg
) with the model https://pjreddie.com/media/files/yolo.weights I get plenty of detections.
yolo.weights
is COCO-model and it should be used for yolo.cfg
only, so check that you use it in a such way: ./darknet detector test cfg/coco.data cfg/yolo.cfg yolo.weights VOCdevkit/VOC2007/JPEGImages/009460.jpg
To use VOC-model, download yolo-voc.weights
and use it such: ./darknet detector test cfg/voc.data cfg/yolo-voc.cfg yolo-voc.weights VOCdevkit/VOC2007/JPEGImages/009460.jpg
Also if you train your model on VOC-dataset, usually you can see any detections after >1000 iterations with low threshold -thresh 0.01
And to train your own model, try to use such params: https://github.com/AlexeyAB/darknet/issues/243#issuecomment-339659709
@AlexeyAB thanks for pointing out I was using a COCO model with VOC config.
Also if you train your model on VOC-dataset, usually you can see any detections after >1000 iterations with low threshold -thresh 0.01
Does it mean that when training on VOC-dataset I won't get any detections with -thresh 0.01
and fewer than 1000 iterations?
Hi, I'm having the same problem. I think something is wrong with generated weights files after commit ae74d0ef31485f84e1856b4733135d2753dbb033. Weights files created before are ok.
I use VS 2017, Cuda 9.0, cuDNN 7, OpenCV 3.2.0 cfg: yolo-voc.2.0.cfg and resnet50_yolo.cfg
@phqmourao Thank you, I fixed it.
@bonzoq @TheMikeyR @sc1234qwer An error was added 5 days ago. Now I have fixed it.
So I compiled the code with the latest commit Fixed bug with: net->seen
and trained the network with default parameters. After 1000 iterations I get zero detections even with threshold 0.001.
Maybe the problem lays somewhere else? How can I debug?
@bonzoq
/darknet detector test cfg/voc.data cfg/yolo-voc.cfg yolo-voc.weights VOCdevkit/VOC2007/JPEGImages/009460.jpg
This is strange, I just train my own model with 6 objects based on yolo-voc.2.0.cfg
using 400 iterations on Windows 7x64 (CUDA 8.0, cuDNN 6.0, OpenCV 3.3.0), and it can detect objects.
darknet.exe detector train data/obj.data yolo-obj.cfg darknet19_448.conv.23
darknet.exe detector test data/obj.data yolo-obj.cfg backup/yolo-obj_400.weights img_4_109.jpg
@AlexeyAB I will reply tomorrow as I don't have access to the server right now. Thank you for your prompt reply. Greatly appreciated.
@AlexeyAB
./darknet detector test cfg/voc.data cfg/yolo-voc.cfg yolo-voc.weights VOCdevkit/VOC2007/JPEGImages/009460.jpg
gives me no detections whatsoever.
VOC.data
:
train = VOCdevkit/train.txt
valid = VOCdevkit/2007_test.txt
names = data/voc.names
backup = backupVOC2
yolo-voc.cfg
:
[net]
# Testing
#batch=1
#subdivisions=1
# Training
batch=64
subdivisions=16
height=416
width=416
channels=3
momentum=0.9
decay=0.0005
angle=0
saturation = 1.5
exposure = 1.5
hue=.1
learning_rate=0.001 burn_in=1000 max_batches = 80200 policy=steps steps=40000,60000 scales=.1,.1
[convolutional] batch_normalize=1 filters=32 size=3 stride=1 pad=1 activation=leaky
[maxpool] size=2 stride=2
[convolutional] batch_normalize=1 filters=64 size=3 stride=1 pad=1 activation=leaky
[maxpool] size=2 stride=2
[convolutional] batch_normalize=1 filters=128 size=3 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 filters=64 size=1 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 filters=128 size=3 stride=1 pad=1 activation=leaky
[maxpool] size=2 stride=2
[convolutional] batch_normalize=1 filters=256 size=3 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 filters=128 size=1 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 filters=256 size=3 stride=1 pad=1 activation=leaky
[maxpool] size=2 stride=2
[convolutional] batch_normalize=1 filters=512 size=3 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 filters=256 size=1 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 filters=512 size=3 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 filters=256 size=1 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 filters=512 size=3 stride=1 pad=1 activation=leaky
[maxpool] size=2 stride=2
[convolutional] batch_normalize=1 filters=1024 size=3 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 filters=512 size=1 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 filters=1024 size=3 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 filters=512 size=1 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 filters=1024 size=3 stride=1 pad=1 activation=leaky
#######
[convolutional] batch_normalize=1 size=3 stride=1 pad=1 filters=1024 activation=leaky
[convolutional] batch_normalize=1 size=3 stride=1 pad=1 filters=1024 activation=leaky
[route] layers=-9
[convolutional] batch_normalize=1 size=1 stride=1 pad=1 filters=64 activation=leaky
[reorg] stride=2
[route] layers=-1,-4
[convolutional] batch_normalize=1 size=3 stride=1 pad=1 filters=1024 activation=leaky
[convolutional] size=1 stride=1 pad=1 filters=125 activation=linear
[region] anchors = 1.3221, 1.73145, 3.19275, 4.00944, 5.05587, 8.09892, 9.47112, 4.84053, 11.2364, 10.0071 bias_match=1 classes=20 coords=4 num=5 softmax=1 jitter=.3 rescore=1
object_scale=5 noobject_scale=1 class_scale=1 coord_scale=1
absolute=1 thresh = .6 random=1
4. `VOCdevkit/VOC2007/JPEGImages/009460.jpg`
![009460](https://user-images.githubusercontent.com/2465884/32101377-3fd82452-bb18-11e7-8ee3-58b135a5bdc3.jpg)
@bonzoq Try to use this command with -i 0
at the end: ./darknet detector test cfg/voc.data cfg/yolo-voc.cfg yolo-voc.weights VOCdevkit/VOC2007/JPEGImages/009460.jpg -i 0
And if it doesn't work show screenshot of your console output.
Just now I try it on both Windows 7x64 and Linux x64 (Debian 8):
@AlexeyAB sadly still no luck:
I updated the my previous comment to include the whole content of yolo-voc.cfg
, which it didn't before.
@bonzoq I found the solution - set batch=1 subdivision=1
for detection.
In general
On Linux:
batch=64 subdivision=16
(or subdivision=8)batch=1 subdivision=1
On Windows:
batch=64 subdivision=16
(or subdivision=8)batch=1 subdivision=1
or batch=64 subdivision=16
I'll look for a reason why we must set the values (batch=1 subdivision=1) for detection on Linux.
@AlexeyAB I set batch=1
and subdivision=1
.
Sadly it didn't help. Can I debug this somehow?
@bonzoq
./darknet detector test cfg/voc.data cfg/yolo-voc.cfg yolo-voc.weights VOCdevkit/VOC2007/JPEGImages/009460.jpg -i 0
GPU=0
CUDNN=0
OPENCV=0
DEBUG=0
OPENMP=0
LIBSO=0
LIBSO=1
, put yolo-voc.cfg
and yolo-voc.weights
near with compiled uselib
file and do: ./uselib VOCdevkit/VOC2007/JPEGImages/009460.jpg
Hi all, I have sort of the same issue than @bonzoq here. The training looks ok, it converges to an avg 0.06, high IOU, Recall 1.0 almost everywhere, but on detection it always draws a box around the whole image even there's nothing to detect. :/
@AlexeyAB
LIBSO=1
and tried but that did not work:
@AlexeyAB I encounter the same question in windows10, could you help to fix the bug? I downloaded the stop and yield JPEG format images from http://guanghan.info/blog/en/my-works/train-yolo/, Merged them together, the image number only is 554. I trained the images following the instruction “How to train (to detect your custom objects):”, cmd is “darknet.exe detector train data/obj.data yolo-obj.cfg darknet19_448.conv.23”,after 3000 iterations get the following result, Avg recall = 1.000, avg loss = 0.103, but I can’t detect any objects with cmd”arknet.exe detector test data/obj.data yolo-obj.cfg backup/yolo-obj_3000.weights”. Following is the training processing screenshot.
Following is the obj.data file content: classes= 2 train = data/train.txt valid = data/train.txt names = data/obj.names backup = backup/ Following is the yolo-obj.cfg file content: _[net] batch=64 subdivisions=8 height=416 width=416 channels=3 momentum=0.9 decay=0.0005 angle=0 saturation = 1.5 exposure = 1.5 hue=.1
learning_rate=0.0001 max_batches = 45000 policy=steps steps=100,25000,35000 scales=10,.1,.1
[convolutional] batch_normalize=1 filters=32 size=3 stride=1 pad=1 activation=leaky
[maxpool] size=2 stride=2
[convolutional] batch_normalize=1 filters=64 size=3 stride=1 pad=1 activation=leaky
[maxpool] size=2 stride=2
[convolutional] batch_normalize=1 filters=128 size=3 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 filters=64 size=1 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 filters=128 size=3 stride=1 pad=1 activation=leaky
[maxpool] size=2 stride=2
[convolutional] batch_normalize=1 filters=256 size=3 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 filters=128 size=1 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 filters=256 size=3 stride=1 pad=1 activation=leaky
[maxpool] size=2 stride=2
[convolutional] batch_normalize=1 filters=512 size=3 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 filters=256 size=1 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 filters=512 size=3 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 filters=256 size=1 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 filters=512 size=3 stride=1 pad=1 activation=leaky
[maxpool] size=2 stride=2
[convolutional] batch_normalize=1 filters=1024 size=3 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 filters=512 size=1 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 filters=1024 size=3 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 filters=512 size=1 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 filters=1024 size=3 stride=1 pad=1 activation=leaky
#######
[convolutional] batch_normalize=1 size=3 stride=1 pad=1 filters=1024 activation=leaky
[convolutional] batch_normalize=1 size=3 stride=1 pad=1 filters=1024 activation=leaky
[route] layers=-9
[reorg] stride=2
[route] layers=-1,-3
[convolutional] batch_normalize=1 size=3 stride=1 pad=1 filters=1024 activation=leaky
[convolutional] size=1 stride=1 pad=1 filters=35 activation=linear
[region] anchors = 1.08,1.19, 3.42,4.41, 6.63,11.38, 9.42,5.11, 16.62,10.52 bias_match=1 classes=2 coords=4 num=5 softmax=1 jitter=.2 rescore=1
object_scale=5 noobject_scale=1 class_scale=1 coord_scale=1
absolute=1 thresh = .6 random=0_
Following is the detection cmd and result screenshot.
@zhang11wu4 Can you detect anything using default trained model yolo-voc.cfg
and yolo-voc.weights
downloaded by the link? https://pjreddie.com/darknet/yolo/
@AlexeyAB yes, I can detect objects correctly with "yolo-voc.cfg" and "yolo-voc.weights" downloaded from that website.
@zhang11wu4 Can you share your yolo-obj_3000.weights
using GoogleDisk?
@AlexeyAB https://drive.google.com/file/d/0Bw2dL4mXINuzMVBUaGFlamk0WUU/view?usp=sharing pls check, thanks!
@zhang11wu4 I can't detect anything too using this weights-file.
train.txt
and all training dataset (images and labels) in one archive?@AlexeyAB
@zhang11wu4 I just trained model of 400 iterations using your dataset without any changes by using this command: darknet.exe detector train stopsign/obj.data stopsign/yolo-obj.cfg darknet19_448.conv.23
batch=64 subdivision=8
in the yolo-obj.cfg
from your darknet-master_guanghan_info_release.rar
obj.data
:
classes=2
train =stopsign/train.txt
valid =stopsign/test.txt
names=stopsign/obj.names
backup=backup/
train.txt
didn't changed, and didn't changed images and txt-labels. Images placed:
And I can detect stop sign by using this command: darknet.exe detector test stopsign/obj.data stopsign/yolo-obj.cfg backup/yolo-obj_400.weights stopsign/014.jpg -thresh 0.1
@zhang11wu4
\darknet.sln
-> (right click on project) -> properties -> C/C++ -> Preprocessor -> Preprocessor Definitions, and remove: CUDNN;
@AlexeyAB
1.Yes, I use CUDA8.0 with cudnn5.1;
2.GPU is GForce 980M;
3.I tried commit 6ccb418, it works, I can detect objects successfully with 4000 iterations with original dataset including stop signs and yield signs.
Train cmd: darknet.exe detector train data/obj.data yolo-obj.cfg darknet19_448.conv.23
Test cmd: darknet.exe detector test data/obj.data yolo-obj.cfg backup/yolo-obj_4000.weights
Hi @AlexeyAB , @zhang11wu4 , @bonzoq here's my conf :
I used the tarball provided by @zhang11wu4 and enabled GPU, CUDNN, OPENCV and OPENMP in the Makefile then "make" it.
Then in "build/darknet/x64" I edited data/obj.data like this:
classes=2 train =data/train.txt valid =data/test.txt names=data/obj.names backup=backup/ because train.txt, test.txt and obj.names were located there. (there is no directory called stopsign)
I also had to rebuild train.txt and test.txt to have the paths in linux format and relative to current directory:
root@0e5c13ae42c1:~/WilliamZhang/build/darknet/x64# head data/train.txt data/obj/stopsign/001.JPEG data/obj/stopsign/002.JPEG data/obj/stopsign/003.JPEG
I did'nt change anything else.
Then I ran the following command: "/root/WilliamZhang/darknet detector train data/obj.data yolo-obj.cfg darknet19_448.conv.23"
After 400 iterations, I ran the following command: "/root/WilliamZhang/darknet detector test data/obj.data yolo-obj.cfg backup/yolo-obj_400.weights data/obj/stopsign/014.JPEG -thresh 0.1"
The result is no detections.
I also tried with smaller thresholds (down to zero!) and even by setting batch and subdivisions to 1 in yolo-obj.cfg , again no detections.
I really don't understand what's going on ...
Maybe it's a linux specific issue when generating weights because when I try weights from the official website for instance the detection works very well, the problem it's when try to generate it by myself, maybe you can share your "yolo-obj_4000.weights" so I can give it a try ?
Thank you very much for your help
Mirko
@scamianbas
Try to update your code from the last commit.
Check that you edit the same obj.data that used in training command line
Then in "build/darknet/x64" I edited data/obj.data like this:
Then I ran the following command: "/root/WilliamZhang/darknet detector train data/obj.data yolo-obj.cfg darknet19_448.conv.23"
@scamianbas this the weight file https://drive.google.com/open?id=0Bw2dL4mXINuzS2hqOVRvaWZkMzA following is my cmd and detection result screenshot:
@AlexeyAB
@zhang11wu4 Thanks for your weights file, the detection worked fine ! (with batch=1 subdivisions=1)
It really looks like the issue is linux related...
one class with 100 images and after about 400--800 iterations,the weights work well, i am doubtful, the train so fast ??
@scamianbas
darknet
, training dataset /data/obj
, two trained models in /backup
folder - you can download all by the url: https://drive.google.com/open?id=0BwRgzHpNbsWBZi0xVENMbm1ZMVk
darknet_port.zip
img_sign.sh
make clean
and make -j8
in folder with Makefile
img_sign.sh
to check detection workvalid_sign.sh
to check recall worktrain_sign.sh
to check training, and after 100 iterations, cancel training CTRL+C and check detection - run img_sign.sh
100 iterations too few for good prediction, but it enough to detect anything. For good prediction it should be trained ~4000 iterations for 2 classes (stop, yield) = 2000 per class
@AlexeyAB Yep it works ! Thank you very much ! Tomorrow I will analyze why and keep you informed. I had to recompile, dos2unix the .sh files and invoke bash to xecute them. Thanks a lot again !
@AlexeyAB please find below the src differences with @zhang11wu4 version, if you want analyze it:
root@0e5c13ae42c1:~/darknet_port# diff -rq src /root/WilliamZhang/src
Files src/demo.c and /root/WilliamZhang/src/demo.c differ
Files src/detector.c and /root/WilliamZhang/src/detector.c differ
Files src/image.c and /root/WilliamZhang/src/image.c differ
Files src/network.h and /root/WilliamZhang/src/network.h differ
Files src/parser.c and /root/WilliamZhang/src/parser.c differ
Files src/parser.h and /root/WilliamZhang/src/parser.h differ
Files src/yolo_console_dll.cpp and /root/WilliamZhang/src/yolo_console_dll.cpp differ
Files src/yolo_v2_class.cpp and /root/WilliamZhang/src/yolo_v2_class.cpp differ
root@0e5c13ae42c1:~/darknet_port# diff src/demo.c /root/WilliamZhang/src/demo.c
128c128
< net = parse_network_cfg_custom(cfgfile, 1);
---
> net = parse_network_cfg(cfgfile);
root@0e5c13ae42c1:~/darknet_port# diff src/detector.c /root/WilliamZhang/src/detector.c
14d13
<
17,18c16
< #define OPENCV_VERSION CVAUX_STR(CV_VERSION_MAJOR)""CVAUX_STR(CV_VERSION_MINOR)""CVAUX_STR(CV_VERSION_REVISION)
< #pragma comment(lib, "opencv_world" OPENCV_VERSION ".lib")
---
> #pragma comment(lib, "opencv_world320.lib")
20,23c18,20
< #define OPENCV_VERSION CVAUX_STR(CV_VERSION_EPOCH)""CVAUX_STR(CV_VERSION_MAJOR)""CVAUX_STR(CV_VERSION_MINOR)
< #pragma comment(lib, "opencv_core" OPENCV_VERSION ".lib")
< #pragma comment(lib, "opencv_imgproc" OPENCV_VERSION ".lib")
< #pragma comment(lib, "opencv_highgui" OPENCV_VERSION ".lib")
---
> #pragma comment(lib, "opencv_core2413.lib")
> #pragma comment(lib, "opencv_imgproc2413.lib")
> #pragma comment(lib, "opencv_highgui2413.lib")
25d21
<
27d22
<
31a27
> printf("detector.c train_detector()\n");
33a30
> printf("detector.c train_images=%s\n", train_images);
35c32
<
---
> printf("detector.c backup_directory=%s\n", backup_directory);
37a35
> printf("detector.c basefile=%s\n", base);
461a460,461
> printf("detector.c test_detector() names0=%s\n", names[0]);
> printf("detector.c test_detector() names1=%s\n", names[1]);
464c464
< network net = parse_network_cfg_custom(cfgfile, 1);
---
> network net = parse_network_cfg(cfgfile);
478d477
< if (input[strlen(input) - 1] == 0x0d) input[strlen(input) - 1] = 0;
565d563
< if (filename[strlen(filename) - 1] == 0x0d) filename[strlen(filename) - 1] = 0;
root@0e5c13ae42c1:~/darknet_port# diff src/image.c /root/WilliamZhang/src/image.c
19d18
< #include "opencv2/imgcodecs/imgcodecs_c.h"
188c187
<
---
> //printf("draw_detections()_num=%d\n", num);
190a190
> //printf("draw_detections()_class=%d\n", class);
191a192
> //printf("draw_detections()_prob=%f\n", prob);
194,201d194
< //// for comparison with OpenCV version of DNN Darknet Yolo v2
< //printf("\n %f, %f, %f, %f, ", boxes[i].x, boxes[i].y, boxes[i].w, boxes[i].h);
< // int k;
< //for (k = 0; k < classes; ++k) {
< // printf("%f, ", probs[i][k]);
< //}
< //printf("\n");
<
301c294
< //printf("left=%d, right=%d, top=%d, bottom=%d, obj_id=%d, obj=%s \n", left, right, top, bot, class, names[class]);
---
>
1368,1369c1361,1362
< //image out = load_image_stb(filename, c); // OpenCV 3.x
< image out = load_image_cv(filename, c);
---
> image out = load_image_stb(filename, c); // OpenCV 3.x
> //image out = load_image_cv(filename, c);
root@0e5c13ae42c1:~/darknet_port# diff src/network.h /root/WilliamZhang/src/network.h
24c24
< int *seen;
---
> uint64_t *seen;
root@0e5c13ae42c1:~/darknet_port# diff src/parser.c /root/WilliamZhang/src/parser.c
587,591d586
< return parse_network_cfg_custom(filename, 0);
< }
<
< network parse_network_cfg_custom(char *filename, int batch)
< {
608d602
< if (batch > 0) net.batch = batch;
708,709d701
<
<
847c839
< fwrite(net.seen, sizeof(int), 1, fp);
---
> fwrite(net.seen, sizeof(uint64_t), 1, fp);
1036,1038c1028
< uint64_t iseen = 0;
< fread(&iseen, sizeof(uint64_t), 1, fp);
< *net->seen = iseen;
---
> fread(net->seen, sizeof(uint64_t), 1, fp);
1041c1031,1033
< fread(net->seen, sizeof(int), 1, fp);
---
> int iseen = 0;
> fread(&iseen, sizeof(int), 1, fp);
> *net->seen = iseen;
root@0e5c13ae42c1:~/darknet_port# diff src/parser.h /root/WilliamZhang/src/parser.h
6d5
< network parse_network_cfg_custom(char *filename, int batch);
root@0e5c13ae42c1:~/darknet_port# diff src/yolo_console_dll.cpp /root/WilliamZhang/src/yolo_console_dll.cpp
88c88
< Detector detector("cfg/yolo-voc.cfg", "yolo-voc.weights");
---
> Detector detector("yolo-voc.cfg", "yolo-voc.weights");
root@0e5c13ae42c1:~/darknet_port# diff src/yolo_v2_class.cpp /root/WilliamZhang/src/yolo_v2_class.cpp
57c57
< net = parse_network_cfg_custom(cfgfile, 1);
---
> net = parse_network_cfg(cfgfile);
@AlexeyAB @bonzoq @scamianbas hello , i am using windows 10 , cuda 9.0 and Cudacnn 7.0 . and i followed all the steps mentioned in the blog to train the model https://timebutt.github.io/static/how-to-train-yolov2-to-detect-custom-objects/ and successfully trained the model . but when i am predicting using cmd PS C:\darknet\darknet\build\darknet\x64> .\darknet.exe detector test cfg\obj.data cfg\yolo-obj.cfg backup\yolo-obj_1000.weights C:\darknet\darknet\build\darknet\x64\NFPAdatas
et\pos-1.jpg i ma not getting any detection . even i tried with yolo-9000 weights and label still its not detecting anything .
obj.zip @bonzoq @AlexeyAB @scamianbas my config file are attached in zip file
root@0e5c13ae42c1:~/darknet_port# diff src/network.h /root/WilliamZhang/src/network.h
24c24
< int *seen;
---
> uint64_t *seen;
@scamianbas Yes, definitely @zhang11wu4 code version without bug fixes, i.e. one of commit between these two:
@Chanki8658 Try to update your code from this repo.
@AlexeyAB changes of b714004#diff-3d6e69dd5b0d5232fc0779ad2cea1e00R24 commit with bug fix < used commit this branch is already in my code which i built . How can i debug this . when i debug the code everything seems to be fine and just that float *probs = calloc(l.wl.hl.n, sizeof(float )); probability is always coming zero . could you please suggest
@AlexeyAB parser.zip parser.c and network.c network.zip is attached
@AlexeyAB could you suggest the last correct branch which built and predict successfully on windows .
@AlexeyAB i also tried with pre-train weights . but still its not showing up anything https://drive.google.com/open?id=0B6yBEDUqsu7Ta1M1dE40OFV1Tms
@Chanki8658 You should do each step described here: https://github.com/AlexeyAB/darknet/issues/243#issuecomment-340908751
I saw the "help wanted"-label have been applied to this thread. I've completed the steps in https://github.com/AlexeyAB/darknet/issues/243#issuecomment-340908751 (had to make again for it to work) and I have no issues, detecting everything fine also after a new training.
./data/obj/stopsign/001.JPEG: Predicted in 0.067797 seconds.
: 73%
: 57%
System Info GPU: Quadro M1200 OS: Ubuntu 16.04 CUDA: 8.0 CUDNN: 5.1
Hi @AlexeyAB what is the "-i 0" option for ? Thanks
@scamianbas For using GPU number 0.
I compiled your version of darknet on Amazon Linux (using Tesla K80 GPU) with the following settings:
I trained Yolo for 300 iterations using the steps described in https://pjreddie.com/darknet/yolo/ .
When I try to perform detection on a single image:
./darknet detector test cfg/voc.data cfg/yolo-voc.cfg backupVOC/yolo-voc_300.weights VOCdevkit/VOC2007/JPEGImages/009460.jpg
I get no detections. I think I should get some (though not correct detections) even though the training was limited.
On another occasion I trained a classifier reproducing the steps from this tutorial https://timebutt.github.io/static/how-to-train-yolov2-to-detect-custom-objects/ . Training went on for a few thousand iterations with the average lost as low as 0.05 in the end and yet still I was unable to detect anything with that model.
What might I be doing wrong ?