Suraj
Suraj

Reputation: 2477

Executing files from colab

I am using the darknet code for YOLO object detection. I have customized it for my dataset and it runs fine in my local computer. However when I uploaded the code to google drive and try to execute it from a new jupyter notebook in Colab using the code :

%shell ./darknet detector train custom_data/detector.data custom_data/cfg/yolov3-custom.cfg darknet53.conv.74 yolov3-custom

I get the error :

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

I am really stuck at this, any suggestions would be really helpful, thanks !

Upvotes: 0

Views: 1666

Answers (2)

Suraj
Suraj

Reputation: 2477

Uploading a zip of the folder and unzipping it using

!unzip "/content/drive/My Drive/darknet.zip"

works as the folder now appears inside the root directory itself and not inside content/drive/My Drive.

Upvotes: 0

hoop_coop
hoop_coop

Reputation: 23

Try this to import a file if it is too large:

from google.colab import files
uploaded = files.upload

This should allow you to download the file from your computer

Upvotes: 1

Related Questions