Closed Hello0312 closed 2 weeks ago
π Hello @Hello0312, thank you for your interest in Ultralytics π! We recommend a visit to the Docs for new users where you can find many Python and CLI usage examples and where many of the most common questions may already be answered.
From the details provided, it appears you may be encountering a π bug. To help us investigate further, could you please ensure that your issue includes a minimum reproducible example? This helps us narrow down the root cause effectively.
It seems that a FileNotFoundError
is being raised due to a missing coco.yaml
file. To resolve this:
pip install -U ultralytics
coco.yaml
file or redefine the path when required. The configuration files are typically located in a subdirectory under the library's package, so variation in paths across different setups can occur. Providing your file navigation paths in detail would be helpful.Connect with the Ultralytics community for additional support:
YOLO can operate in various up-to-date environments. If you wish to re-run your setup or debug further, consider using any of the following verified options:
If the badge above is green, all Ultralytics CI tests are currently passing. The CI tests verify correct functionality across all YOLO Modes and Tasks on macOS, Windows, and Ubuntu every 24 hours and on every commit.
Please note that this is an automated response. One of our Ultralytics engineers will take a closer look and assist you further as soon as possible π!
Why do you want to run model.val()
on MS COCO?
The reason it's probably using that path is because it was trained on Linux, so it saved that as the path. You can override it by passing data="coco.yaml"
to model.val()
.
Search before asking
Ultralytics YOLO Component
Other
Bug
I use Windows 11 Home
It says "FileNotFoundError: '/usr/src/ultralytics/ultralytics/cfg/datasets/coco.yaml' does not exist" I am confused as I don't have a USR folder because I do not use a UNIX-based system.
I think the actual 'coco.yaml' file is at path "C:\Users\total\AppData\Local\Programs\Python\Python312\Lib\site-packages\ultralytics\cfg\datasets".
Environment
System Info
Ultralytics 8.3.70 π Python-3.12.8 torch-2.5.1+cu124 CUDA:0 (NVIDIA GeForce RTX 4060 Laptop GPU, 8188MiB) Setup complete β (24 CPUs, 31.7 GB RAM, 113.9/953.0 GB disk)
OS Windows-11-10.0.26100-SP0 Environment Windows Python 3.12.8 Install pip RAM 31.71 GB Disk 113.9/953.0 GB CPU Intel Core(TM) i7-14650HX CPU count 24 GPU NVIDIA GeForce RTX 4060 Laptop GPU, 8188MiB GPU count 1 CUDA 12.4
numpy β 1.26.3<=2.1.1,>=1.23.0 matplotlib β 3.10.0>=3.3.0 opencv-python β 4.11.0.86>=4.6.0 pillow β 10.2.0>=7.1.2 pyyaml β 6.0.2>=5.3.1 requests β 2.32.3>=2.23.0 scipy β 1.15.1>=1.4.1 torch β 2.5.1+cu124>=1.8.0 torch β 2.5.1+cu124!=2.4.0,>=1.8.0; sys_platform == "win32" torchvision β 0.20.1+cu124>=0.9.0 tqdm β 4.67.1>=4.64.0 psutil β 6.1.1 py-cpuinfo β 9.0.0 pandas β 2.2.3>=1.1.4 seaborn β 0.13.2>=0.11.0 ultralytics-thop β 2.0.14>=2.0.0 {'OS': 'Windows-11-10.0.26100-SP0', 'Environment': 'Windows', 'Python': '3.12.8', 'Install': 'pip', 'RAM': '31.71 GB', 'Disk': '113.9/953.0 GB', 'CPU': 'Intel Core(TM) i7-14650HX', 'CPU count': 24, 'GPU': 'NVIDIA GeForce RTX 4060 Laptop GPU, 8188MiB', 'GPU count': 1, 'CUDA': '12.4', 'Package Info': {'numpy': 'β 1.26.3<=2.1.1,>=1.23.0', 'matplotlib': 'β 3.10.0>=3.3.0', 'opencv-python': 'β 4.11.0.86>=4.6.0', 'pillow': 'β 10.2.0>=7.1.2', 'pyyaml': 'β 6.0.2>=5.3.1', 'requests': 'β 2.32.3>=2.23.0', 'scipy': 'β 1.15.1>=1.4.1', 'torch': 'β 2.5.1+cu124!=2.4.0,>=1.8.0; sys_platform == "win32"', 'torchvision': 'β 0.20.1+cu124>=0.9.0', 'tqdm': 'β 4.67.1>=4.64.0', 'psutil': 'β 6.1.1', 'py-cpuinfo': 'β 9.0.0', 'pandas': 'β 2.2.3>=1.1.4', 'seaborn': 'β 0.13.2>=0.11.0', 'ultralytics-thop': 'β 2.0.14>=2.0.0'}}
Minimal Reproducible Example
Code
from ultralytics import YOLO
model = YOLO("yolo11n.pt")
metrics = model.val()
results = model("C:\Users\total\AppData\Local\Programs\Python\Python312\Lib\site-packages\ultralytics\assets\bus.jpg") results[0].show()
Additional
No response
Are you willing to submit a PR?