vincentgong7 / vg_alexeyab_darknet Goto Github PK
View Code? Open in Web Editor NEWA forked AlexeyAB Darknet repo with extra convenient functions.
Home Page: https://darknet.gong.im
License: Other
A forked AlexeyAB Darknet repo with extra convenient functions.
Home Page: https://darknet.gong.im
License: Other
Thanks for your great work.
I wonder that your VG_AlexeyAB_darknet supports multiple detections for c# (yolowrapper.cs) as well.
I cannot find any difference between AlexeyAB's and your yolowrapper.cs.
I have tried all the weights available on the official YOLO websites, however, none actually detects objects in the output file except https://pjreddie.com/media/files/yolov3.weights
Does anyone know why?
This is also evident in the output text file.
This is the result gotten when the weight YOLOv3 open Image weight is used
This is the result gotten when YOLOv3 weight is used.
I would like to know. Thanks.
Hello @vincentgong7 ,
I would like to create a Custom Object detector. Therefore to start the training as mentioned in the procedure, I start with darknet53.conv.74 convolutional weight which is a pretrained weight file on ImageNet. I do not want to use the pretrained darknet53.conv.74 convolutional weight file. Instead I want to create my own convolutional weight file like darknet53.conv.74 convolutional weight file.
Request your support to share some steps. A quick support will be really helpful as i am in the middle of a project.
Thank you in advance.
Hey Vincent,
Thanks for the great work!
However the batch_detector function does not make test with image batches. Similar to detector it takes directory as input instead of a txt file with image paths.
I would like to run detection on batches of images, but so far it only seems to be taking a list as input while processing the items one by one.
I'm I missing something, or is this feature not supported yet ?
Thanks in advance
If i have a trained yolo model on my custom dataset, why is not enought with weights and model.cfg?
For instance this is my call
./darknet detector batch cfg/obj.data cfg/yolov3-tiny-obj.cfg weights/yolov3-tiny-obj-416_best.weights io_folder samples/ output/ -out output/result.json -ext_output > output/result.txt -dont_show
this is what obj.data contains:
classes = 1
train = cfg/train.txt
valid = cfg/test.txt
names = cfg/obj.names
backup = /backup
In fact, i am not using anythin of this path but obj.names with this content:
Olive
Hey Vincent,
Thx for the great fork! We're using to implement our project, but facing some issue.
when we use the google Colab to run, setting the GPU = 1 / CUDNN=1, but it is not working.
some error happen. "/bin/bash: ./darknet: No such file or directory"
! sed -i "s/GPU=0/GPU=1/g" /content/VG_AlexeyAB_darknet/Makefile
! sed -i "s/CUDNN=0/CUDNN=1/g" /content/VG_AlexeyAB_darknet/Makefile
! sed -i "s/OPENCV=1/OPENCV=0/g" /content/VG_AlexeyAB_darknet/Makefile
GPU:
NVIDIA-SMI 465.19.01 Driver Version: 460.32.03 CUDA Version: 11.2
Tesla K80
error :
nvcc fatal : Unsupported gpu architecture 'compute_30'
Makefile:177: recipe for target 'obj/convolutional_kernels.o' failed
make: *** [obj/convolutional_kernels.o] Error 1
!./darknet detector batch cfg/coco.data cfg/yolov4.cfg weights/yolov4.weights io_folder sample_imgs/ output/ -out output/result.json -ext_output > output/result.txt
error : /bin/bash: ./darknet: No such file or directory
Hello Vincent,
I have a question about partitioning data into training and test data in the alexeyAB Yolo version . Why stratification isn't used to ensure representativeness of object classes in both partitions?
I'm also trying to calculate the percentage of my object classes in the test and training data, but I'm having a bit of trouble. Do you have a tip on how to do it?
Thank you
Hello! I am trying to run your program, but I have this error:
"mask_scale: Using default '1.000000'
Loading weights from weights/yolo-voc.backup...Done!
(145:15882): Gtk-WARNING **: cannot open display: "
Basically, the program predicts one image and saves the results, but after 1 image it stops with this phrase. What is your suggestion?
UPDATE
I figured out it was a problem with opencv library, so I had to make opencv=0 in Makefile and run command make again, so it worked for me
Hi,
As far as I observe batch_detector function actually does not make test operations with image batches. Its the only difference from test detector is taking directory as input instead of a txt file which consists of image paths. I need to make test operation for batch_size>1 Is there anyone that has any idea how can I do that?
Hi,
I have a special need. I only need to judge a category in the picture, so I want to remove the label name in the picture and keep the box in the result, so that I can easily check the result, how can I do it?
Thanks
Hi Vincent,
I ran this code with input 20,000 images, but when I finished almost 1000 images.
It appear this error:
Cannot load image "xxxx.jpg"
Segmentation fault (core dumped)
I checked every jpg file in folder.
It must be no problem.
Do you have this experience when you batch processing a lot of images?
Thank you
GPU:GTX1080
OS:Ubuntu16.04
In the data set I have, files are structured in folders, allowing multiple files with the same basename. Unfortunatelly, this repo seesm to fail in this case:
Start processing sample_imgs/output
Cannot load image "sample_imgs/subfolder"
STB Reason: unknown image type
sample_imgs/subfolder: Predicted in 22702.145000 milli-seconds.
Not compiled with OpenCV, saving to output/output.png instead
End
Start processing sample_imgs/2.jpg
sample_imgs/2.jpg: Predicted in 22786.058000 milli-seconds.
person: 66.568291%
person: 97.305855%
person: 31.458485%
person: 69.110840%
person: 66.265213%
person: 41.056736%
person: 45.226303%
boat: 34.057201%
Not compiled with OpenCV, saving to output/2.png instead
End
input video file then output coordinates for each frame in txt or JSON file
I'm just wondering what the diff Btw
!./darknet detector batch cfg/voc.data cfg/yolov4.cfg weights/yolov4.weights data/dog.jpg
and this
!./darknet detect cfg/yolov4.weights weights/yolov4.weights data/dog.jpg
also if I replace detector batch with detector test?
I use the version of alexeyAB and I also asked the question about this batch detection. I have not used your version yet, but I would like to know if it is possible to calculate the MAP on the batch of images specified?
Hey Vincent,
Thx for the great fork! I have a dataset train for 22 different classes. I used your fork and it went super smooth through 600 test images, saved the predictions etc pp.
Then I changed the classes for my dataset to only two classes (same images though), trained again and tried your fork for batch predictions.
Now after it runs through 4-5 images I keep getting the segmention fault core dump error.
I really don't know what the problem is. I did everything the same, only differenz is the new weight file and the fact it's only 2 classes now.
My training went without problems. I also didn't change anything important in the training (ofc I changed classes, filters etc. Though)
I Google a lot, tried out many different things but nothing works.
Any idea what might caus this? Seems like my weight file might be corrupted or so? It successfully loads it though.
Thx for any help
./src/convolutional_kernels.cu(107): error: identifier "__shfl_xor" is undefined
./src/im2col_kernels.cu(1087): error: identifier "__shfl_xor" is undefined
./src/im2col_kernels.cu(1175): error: identifier "__shfl" is undefined
./src/im2col_kernels.cu(1205): error: identifier "__shfl" is undefined
./src/im2col_kernels.cu(1516): error: identifier "__shfl_down" is undefined
Maybe CUDA and cudnn cant't be found correctly when making?
When I trained my data to report an error when reading the picture, I began to check online that the train. txt might be a format error, and then I reported the same error after converting it into the Linux format. I haven't found the reason, please tell me how to solve it.
STB Reason: can't fopen
Cannot load image "VOC2007/images/045.jpg"
STB Reason: can't fopen
Cannot load image "VOC2007/images/102.jpg"
STB Reason: can't fopen
Cannot load image "VOC2007/images/110.jpg"
STB Reason: can't fopen
Cannot load image "VOC2007/images/015.jpg"
STB Reason: can't fopen
Cannot load image "VOC2007/images/055.jpg"
STB Reason: can't fopen
Can't open label file. (This can be normal only if you use MSCOCO): VOC2007/images/067.txt
Can't open label file. (This can be normal only if you use MSCOCO): VOC2007/images/070.txt
Can't open label file. (This can be normal only if you use MSCOCO): VOC2007/images/079.txt
Can't open label file. (This can be normal only if you use MSCOCO): VOC2007/images/105.txt
Can't open label file. (This can be normal only if you use MSCOCO): VOC2007/images/033.txt
Can't open label file. (This can be normal only if you use MSCOCO): VOC2007/images/009.txt
Can't open label file. (This can be normal only if you use MSCOCO): VOC2007/images/084.txt
Can't open label file. (This can be normal only if you use MSCOCO): VOC2007/images/119.txt
Hi there,
Could you help me modify the codes to write the coordinate bounding boxes next to the percentage in the result.txt
I've tried to modify image.c as suggested with no luck. Thank you so much for your help/
Please leave a message if you want.
I am training the detector on my dataset to detect one specific object ( number of classes is equal to 1). I use the yolo3.weights from original website. I do not recieve any error but when I run the command:
./darknet detector batch build/darknet/x64/data/obj.data cfg/yolo-obj.cfg weights/yolov3.weights io_folder sample_imgs/ output/ -out output/result.json -ext_output > output/result.txt
the result.json objects are empty and there are no bounding boxes drawn on the images. For each picture in the sample_imgs folder I recieve this log:
Not compiled with OpenCV, saving to output/18T_1076301.png instead
Also during the detection, I recieve the following warnings:
Cannot load image "data/labels/126_7.png"
STB Reason: can't fopen
How can I change it?
Thanks,
Kiana
!./darknet detector batch cfg/coco.data cfg/yolov4.cfg weights/yolov4.weights io_folder sample_imgs/ output/ -out output/result.json -ext_output > output/result.txt
this code works but when I change weight to weights/yolov4.weights.7z.001 Does not work, Which cfg file work with this weight such as yolov4.cfg >> yolov4.weights and yolov4.tiny.cfg >>yolov4.tiny.weights and so an.
Hi,
I have a question: I want to detect the frames of two cameras simultaneously and currently use the darknet python wrapper (AlexeyAB-Version) and just feed one frame to the network at once. Is it possible to speed up the detection by using batch detection (batch=2) within python wrapper (e.g. darknet_video.py)? How does the speed compare (2 frames with batch=1 vs. batch=2)?
Thank you.
thank you!
Is there a way to increase precision of predictions that can be saved to file? Currently they are rounded to integers
Start processing data/in_images/eagle.jpg
data/in_images/eagle.jpg: Predicted in 257.116000 milli-seconds.
bird: 99% (left_x: 111 top_y: 89 width: 523 height: 353)
End
but I am interested in something like this
Start processing data/in_images/eagle.jpg
data/in_images/eagle.jpg: Predicted in 257.116000 milli-seconds.
bird: 0.9931342 (left_x: 111 top_y: 89 width: 523 height: 353)
End
Dear VincentCongratulations on your amazing work. I really appreciate your hard work. I would really appreciate your time if you could help me with the following issues.
List to issues.
1- Not able to compile or make successfully with OpenCV.
2- Without Opencv not able to save predictions as png or jpg.
3- Tried to save as json using "-out" and text using "-save_labels" but failed.
4 - the only result able to save is inside result.txt is the time taken per inference.
Total BFLOPS 65.864
seen 64 folder input=/content/VG_AlexeyAB_darknet/exp/input_images/content/images_test/ and output=exp/out_images/Start processing /content/VG_AlexeyAB_darknet/exp/input_images/content/images_test/0521fd41-40219907.jpg/content/VG_AlexeyAB_darknet/exp/input_images/content/images_test/0521fd41-40219907.jpg: Predicted in 264.639000 milli-seconds.EndStart processing /content/VG_AlexeyAB_darknet/exp/input_images/content/images_test/03d34d05-4a61174c.jpg/content/VG_AlexeyAB_darknet/exp/input_images/content/images_test/03d34d05-4a61174c.jpg: Predicted in 20.649000 milli-seconds.End
5- Couldn't find the right variable to change the batch size. Or maybe the whole image directory is one batch
Can you please provide some suggestions.
For more information and procedures I followed please check-
https://colab.research.google.com/drive/1X280Qm3x9Vwm2RvShBpaSWq2jdj91mTo
Hi, how can I use this repo to detect only people in the image and change the word font on the bounding box?
Hi,
When I try to detect some Images with open cv=1, with my own weights file
It detect only 1 or few images randomly from the in_images folder
But
when I turn off OpenCV ( Opencv=0) is able to detect all images from the In_images folder
Hello @vincentgong7
The json file and .txt file gets generated without any Trouble.
I have 2 queries.
What Format of .json file is followed? i.e. I think we have different dataset Annotation Format.
For example, I would like to convert the generated text file and .json file into COCO Format/VOC Format or in yolo Format.
Is there a way to generate separate text and .json files for each Image ?. Right now we have one Output file that contains all Information about all the Image file and all objects.
Thank you in Advance.!
Using this repository for the set of functions it can provide, but i cannot find the generic -thresh 0.25 command that works in the generic repository. The -dont_show works just fine.
Any assist on where can i tweak the threshold value for inference and evaluate my model with a precision recall curve but also being able to see whats the different threshold can give in detection from the generated images ?
hi,
draw_detections_v3(im, dets, nboxes, thresh, names, alphabet, l.classes, ext_output);
// save_image(im, "predictions");
save_image(im, outputfilename_without_ext);
I just want to save the picture of the detected box,how to modify?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.