Training custom object detection model: /bin/bash: ./darknet: No such file or directory, or /bin/bash: ./darknet: Is a directory on Google Colab

Viewed 6606

I tried to train the custom object according to https://www.youtube.com/watch?v=mmj3nxGT2YQ&t=1747s. In the training part when i run this code on my colab

!./darknet detector train data/obj.data cfg/yolov4-obj.cfg yolov4.conv.137 -dont_show -map

I get errors like:

/bin/bash: ./darknet: No such file or /bin/bash: ./darknet: Is a directory

What shoul i do?

3 Answers

run !make before running the command (for colab)

I had the same problem, I used "pwd" just before to run that line, I noticed that i was in a diferent directory (I was out Darknet folder). So I changed folder path with "cd" to go to darknest folder an run the line again.

The following steps are to be followed for custom object detection training with Yolo on colab:

# clone darknet from github to create a darknet folder inside /content on colab
!pwd
# /content/darknet
!make
# modify Yolo cfg, copy images etc. and make the training data ready
!pwd
# /content/darknet
# now train
!./darknet detector train data/obj.data cfg/yolov4-obj.cfg yolov4.conv.137 -dont_show -map
Related