I’m trying out some datasets on Yolov4-tiny (Darknet) via the Google Colab from Roboflow.
So far I tried multiple datasets and get the same error.
I added the dataset like this:
from roboflow import Roboflow
rf = Roboflow(api_key="*********")
project = rf.workspace("ballz-ky4w9").project("ballz")
dataset = project.version(1).download("darknet")
And got this error:
Loading Roboflow workspace...
loading Roboflow project...
Downloading Dataset Version Zip in ballz-1 to darknet: 100% [454702 / 454702] bytes
Extracting Dataset Version Zip to ballz-1 in darknet:: 100%|██████████| 42/42 [00:00<00:00, 2333.19it/s]
FileNotFoundError Traceback (most recent call last)
<ipython-input-4-6cc20de6d68a> in <module>
2 rf = Roboflow(api_key="********")
3 project = rf.workspace("ballz-ky4w9").project("ballz")
----> 4 dataset = project.version(1).download("darknet")
/usr/local/lib/python3.8/dist-packages/roboflow/util/annotations.py in amend_data_yaml(path, callback)
7 def amend_data_yaml(path: str, callback: Callable[[dict], dict]):
----> 8 with open(path) as source:
9 content = yaml.safe_load(source)
10 content = callback(content)
FileNotFoundError: [Errno 2] No such file or directory: 'ballz-1/data.yaml'
Any ideas on what to do?
Hello, I experienced the same issue today, despite the fact that I had run the code on Friday and it had worked perfectly.
It’s possible that the
data.yaml file was not properly exported from Roboflow or was accidentally deleted from your Google Colab project.
In general, Roboflow should automatically generate the
data.yaml file for you when you export a dataset in Darknet format. If you previously ran the same code with the same dataset and the
data.yaml file was generated successfully, then it’s possible that the issue is related to the current state of your Google Colab project or the dataset itself.
You can try the following steps to see if they resolve the issue:
- Check if the
data.yaml file is still present in your Roboflow workspace or project. If it is, try downloading it again and uploading it to your Google Colab project.
- If the
data.yaml file is not present in your Roboflow workspace or project, you can create it manually following the format I mentioned in my previous answer.
- Double-check that the path to the
data.yaml file in your code matches the actual location of the file in your Google Colab project.
- Check that the file permissions are set correctly for the
data.yaml file, and that it is not set to read-only or write-protected.
- Restart the Google Colab kernel and try running the code again to see if it resolves the issue.
If none of the above steps work, you can provide more information about the steps you took to export the dataset from Roboflow and how you imported it into Google Colab, and I can help you diagnose the issue further.
I have the same problem. I want to try using your solution but I’m having trouble checking whether data.yaml exists or not. I can’t find a menu to check for data.yaml in my Roboflow workspace. Could you please explain in more detail how to check for the existence of the data.yaml?
Did you solve this issue?
Hi, please use the workaround for now and install roboflow==0.2.29
So I’m trying to export the dataset for a retinanet model but its not generating a data.yaml file. How do I solve this?
I am getting a similar error. …/valid/images was not found at first so I downloaded the whole project file into my drive, unzipped it and edited the YAML file to include a path. This is my YAML:
names: ['healthy_frond', 'healthy_tree', 'infested_frond', 'infested_tree', 'notch']
I was able to train, but when it came to validating I ran into an error (after training for an hour )
This is the output I am getting:
Hi @robobobo what is
roboflow pip package version that you used?
It looks like YOLO 8.0.20. I got I’m using the V8 colab from the youtube video for custom model training.
I was able to fix it by creating a data.yaml on my drive and using absolute paths for all of my images rather than relative
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.