0

I am training the yoloV3 for 3 classes and changed the config files accordingly with 'random = 0','classes = 3','filter = 24 and also changed the max_batches accordingly. The training starts but always stops and displays this:

[yolo] params: iou loss: mse (2), iou_norm: 0.75, cls_norm: 1.00, scale_x_y: 1.00
  95 route  91                                 ->   26 x  26 x 256 
  96 conv    128       1 x 1/ 1     26 x  26 x 256 ->   26 x  26 x 128 0.044 BF
  97 upsample                 2x    26 x  26 x 128 ->   52 x  52 x 128
  98 route  97 36                              ->   52 x  52 x 384 
  99 conv    128       1 x 1/ 1     52 x  52 x 384 ->   52 x  52 x 128 0.266 BF
 100 conv    256       3 x 3/ 1     52 x  52 x 128 ->   52 x  52 x 256 1.595 BF
 101 conv    128       1 x 1/ 1     52 x  52 x 256 ->   52 x  52 x 128 0.177 BF
 102 conv    256       3 x 3/ 1     52 x  52 x 128 ->   52 x  52 x 256 1.595 BF
 103 conv    128       1 x 1/ 1     52 x  52 x 256 ->   52 x  52 x 128 0.177 BF
 104 conv    256       3 x 3/ 1     52 x  52 x 128 ->   52 x  52 x 256 1.595 BF
 105 conv    255       1 x 1/ 1     52 x  52 x 256 ->   52 x  52 x 255 0.353 BF
 106 yolo
[yolo] params: iou loss: mse (2), iou_norm: 0.75, cls_norm: 1.00, scale_x_y: 1.00
Total BFLOPS 65.879 
avg_outputs = 532444 
 Allocate additional workspace_size = 52.43 MB 
Loading weights from darknet53.conv.74...
 seen 64, trained: 0 K-images (0 Kilo-batches_64) 
Done! Loaded 75 layers from weights-file 
Learning Rate: 0.001, Momentum: 0.9, Decay: 0.0005
 If error occurs - run training with flag: -dont_show 
Unable to init server: Could not connect: Connection refused

(chart_yolov3_custom2.png:1978): Gtk-WARNING **: 11:20:35.386: cannot open display:
E_net4
  • 27,810
  • 13
  • 101
  • 139
aakarsh
  • 423
  • 1
  • 6
  • 15

4 Answers4

1

1.To run alexab's darknet, you need to follow up on a number of steps. It might be the case you have missed some of them. Do follow this setting up yolo by alexab for detection

2.Have you sync in your google drive (where your data is kept)?

Mehul Gupta
  • 1,829
  • 3
  • 17
  • 33
0

Check train.txt file and test.txt files if this files are empty you will get above error

0

Add -dont_show at the end of your training command

RamiQ
  • 19
  • 1
  • You should probably consider explaining why your sugestion works and what it will achieve. Otherwise, it looks more like a comment than a real answer :) – Joseph Budin Apr 08 '21 at 12:18
  • The answer by @RamiQ works, so I don't understand the downvote. What should he explain? If you use this flag, the error message doesn't appear. We understand that this implies that the script does not try to open the connection to the create a popup window. – Agile Bean May 24 '21 at 07:41
0

Actually there is an instruction for this process. A good step to https://pysource.com/2020/04/02/train-yolo-to-detect-a-custom-object-online-with-free-gpu/

You see some pieces in train code.

import glob
images_list = glob.glob("data/obj/*.jpg")
print(images_list)
     

#Create training.txt file
file = open("data/train.txt", "w") 
file.write("\n".join(images_list)) 
file.close() 
     
6) Start the training


# Start the training
!./darknet detector train data/obj.data cfg/yolov3_training.cfg darknet53.conv.74 -dont_show

now look at that

import glob
images_list = glob.glob("data/obj/*.jpg")
print(images_list)

You see a "jpg" if your images is not jpg turns a problem. edit this section as "png" or other.

berk berk
  • 36
  • 3