从colab执行文件

2024-09-27 23:16:51 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在使用暗色代码进行YOLO对象检测。我已经为我的数据集定制了它,它在我的本地计算机上运行良好。但是,当我将代码上传到google drive,并尝试使用代码从Colab的新jupyter笔记本执行代码时:

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

我得到一个错误:

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

我真的被困在这,任何建议都会非常有用,谢谢


Tags: 数据对象代码data计算机customgoogleyolo
2条回答

上载文件夹的zip并使用

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

该文件夹现在显示在root目录本身中,而不是content/drive/My Drive目录中

如果文件太大,请尝试以下方法导入文件:

from google.colab import files
uploaded = files.upload

这将允许您从计算机下载该文件

相关问题 更多 >

    热门问题