vincentgong7 / VG_AlexeyAB_darknet

A forked AlexeyAB Darknet repo with extra convenient functions.

Home Page:https://darknet.gong.im

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Website Guestbook

vincentgong7 opened this issue · comments

Please leave a message if you want.

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

Hi Vincent

I have tried to follow this link, but I would like to know if it can work on custom dataset. This is because, whenever I'm trying to run with custom dataset, I have ended up with comments like I have mentioned down.

This is how I have editted the command based on my dataset directory in colab

!./darknet detector batch exp/in_images/data_z/obj.data cfg/yolov3.cfg backup/yolov3_last.weights batch exp/in_images/data_z/img exp/out_images/ > results/result.txt

comments:
Loading weights from backup/yolov3_last.weights...Done!
Cannot load image "exp/in_images/data_z/imgimg0044.jpg"
STB Reason: can't fopen
Failed to write image exp/out_images/img0044.png
Not compiled with OpenCV, saving to exp/out_images/img0044.png instead
Failed to write image exp/out_images/img0044.png
Cannot load image "exp/in_images/data_z/imgimg0354.txt"
STB Reason: can't fopen
Failed to write image exp/out_images/img0354.png
Not compiled with OpenCV, saving to exp/out_images/img0354.png instead
Failed to write image exp/out_images/img0354.png
Cannot load image "exp/in_images/data_z/imgimg0186.jpg"
STB Reason: can't fopen
Failed to write image exp/out_images/img0186.png
Not compiled with OpenCV, saving to exp/out_images/img0186.png instead
Failed to write image exp/out_images/img0186.png
Cannot load image "exp/in_images/data_z/imgimg0139.txt"
STB Reason: can't fopen
Failed to write image exp/out_images/img0139.png
Not compiled with OpenCV, saving to exp/out_images/img0139.png instead
Failed to write image exp/out_images/img0139.png
Cannot load image "exp/in_images/data_z/imgimg0061.txt"
STB Reason: can't fopen
Failed to write image exp/out_images/img0061.png
Not compiled with OpenCV, saving to exp/out_images/img0061.png instead
Failed to write image exp/out_images/img0061.png
Cannot load image "exp/in_images/data_z/imgimg0305.jpg"
STB Reason: can't fopen
Failed to write image exp/out_images/img0305.png
Not compiled with OpenCV, saving to exp/out_images/img0305.png instead
Failed to write image exp/out_images/img0305.png
Cannot load image "exp/in_images/data_z/imgimg0125.txt"
STB Reason: can't fopen
Failed to write image exp/out_images/img0125.png
Not compiled with OpenCV, saving to exp/out_images/img0125.png instead
Failed to write image exp/out_images/img0125.png

And in the result.txt, I'm getting the mentioned info below, insteady of the detection of the bbox cordinates

Info:
Total BFLOPS 24.650

seen 64
folder input=exp/in_images/data_z/img and output=exp/out_images/
Start processing exp/in_images/data_z/imgimg0044.jpg
exp/in_images/data_z/imgimg0044.jpg: Predicted in 366.713000 milli-seconds.
End
Start processing exp/in_images/data_z/imgimg0354.txt
exp/in_images/data_z/imgimg0354.txt: Predicted in 18.117000 milli-seconds.
End
Start processing exp/in_images/data_z/imgimg0186.jpg
exp/in_images/data_z/imgimg0186.jpg: Predicted in 18.289000 milli-seconds.
End
Start processing exp/in_images/data_z/imgimg0139.txt
exp/in_images/data_z/imgimg0139.txt: Predicted in 18.090000 milli-seconds.
End
Start processing exp/in_images/data_z/imgimg0061.txt
exp/in_images/data_z/imgimg0061.txt: Predicted in 18.181000 milli-seconds.
End

Please read the instruction on my website carefully, because the command you are using is not correct.
On Tue, 28 Apr 2020 at 23:47, MHansy @.***> wrote: !./darknet detector batch exp/in_images/data_z/obj.data cfg/yolov3.cfg backup/yolov3_last.weights batch exp/in_images/data_z/img exp/out_images/ > results/result.txt And in the result.txt, I'm getting the mentioned info below, insteady of the detection of the bbox cordinates Info: Total BFLOPS 24.650 seen 64 folder input=exp/in_images/data_z/img and output=exp/out_images/ Start processing exp/in_images/data_z/imgimg0044.jpg exp/in_images/data_z/imgimg0044.jpg: Predicted in 366.713000 milli-seconds. End Start processing exp/in_images/data_z/imgimg0354.txt exp/in_images/data_z/imgimg0354.txt: Predicted in 18.117000 milli-seconds. End Start processing exp/in_images/data_z/imgimg0186.jpg exp/in_images/data_z/imgimg0186.jpg: Predicted in 18.289000 milli-seconds. End Start processing exp/in_images/data_z/imgimg0139.txt exp/in_images/data_z/imgimg0139.txt: Predicted in 18.090000 milli-seconds. End Start processing exp/in_images/data_z/imgimg0061.txt exp/in_images/data_z/imgimg0061.txt: Predicted in 18.181000 milli-seconds. End — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#7 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSXEI3SD2UQ3LWJILH6IGDRO5FHHANCNFSM4IOO45XQ .
-- Regards, Vincent X. Gong

Thank you very much, now it is working very well.

Hi Vincent,
I added another three images, and ran this code in Colab use CPU is ok, when using GPU,
but it does not finish the whole picture
Do you have this experience?
Thank you
-Jason

159 conv 1024 3 x 3/ 1 19 x 19 x 512 -> 19 x 19 x1024 3.407 BF
160 conv 255 1 x 1/ 1 19 x 19 x1024 -> 19 x 19 x 255 0.189 BF
161 yolo
[yolo] params: iou loss: ciou (4), iou_norm: 0.07, obj_norm: 1.00, cls_norm: 1.00, delta_norm: 1.00, scale_x_y: 1.05
Total BFLOPS 128.459
avg_outputs = 1068395
Allocate additional workspace_size = 52.43 MB
Loading weights from weights/yolov4.weights...Done! Loaded 162 layers from weights-file
Unable to init server: Could not connect: Connection refused

(Neil_bath02:1225): Gtk-WARNING **: 18:48:17.919: cannot open display:

Hi Vincent,
I added another three images, and ran this code in Colab use CPU is ok, when using GPU,
but it does not finish the whole picture
Do you have this experience?
Thank you
-Jason

159 conv 1024 3 x 3/ 1 19 x 19 x 512 -> 19 x 19 x1024 3.407 BF
160 conv 255 1 x 1/ 1 19 x 19 x1024 -> 19 x 19 x 255 0.189 BF
161 yolo
[yolo] params: iou loss: ciou (4), iou_norm: 0.07, obj_norm: 1.00, cls_norm: 1.00, delta_norm: 1.00, scale_x_y: 1.05
Total BFLOPS 128.459
avg_outputs = 1068395
Allocate additional workspace_size = 52.43 MB
Loading weights from weights/yolov4.weights...Done! Loaded 162 layers from weights-file
Unable to init server: Could not connect: Connection refused

(Neil_bath02:1225): Gtk-WARNING **: 18:48:17.919: cannot open display:

I find out the solution, is about the openCV interrupt,
just set up the openCV=0, close the open CV function, that's done.
Thank you
-Jason

code:
! 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

Thanks for getting back to me.
I find out the solution, maybe is about the openCV interrupt,
just set up the openCV=0, close the openCV function, it's working and work faster.
Thank you
-Jason

code:
! 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

Hi, I think GPU is not supported here. Regards, Vincent X. Gong

On Sat, Feb 20, 2021 at 7:59 PM 1000shin @.***> wrote: Hi Vincent, I added another three images, and ran this code in Colab use CPU is ok, when using GPU, but it does not finish the whole picture Do you have this experience? Thank you -Jason 159 conv 1024 3 x 3/ 1 19 x 19 x 512 -> 19 x 19 x1024 3.407 BF 160 conv 255 1 x 1/ 1 19 x 19 x1024 -> 19 x 19 x 255 0.189 BF 161 yolo [yolo] params: iou loss: ciou (4), iou_norm: 0.07, obj_norm: 1.00, cls_norm: 1.00, delta_norm: 1.00, scale_x_y: 1.05 Total BFLOPS 128.459 avg_outputs = 1068395 Allocate additional workspace_size = 52.43 MB Loading weights from weights/yolov4.weights...Done! Loaded 162 layers from weights-file Unable to init server: Could not connect: Connection refused (Neil_bath02:1225): Gtk-WARNING **: 18:48:17.919: cannot open display: — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub <#7 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSXEIZWTGYMTGQTXBWCSITTAABALANCNFSM4IOO45XQ .

Hi I was wondering if it would be possible to specify a class to detect, and to have the images containing only this class in the detection, moved to a specific folder (without the bounding-boxes and class names displayed on the images itself) really helpful code thank you!