0

I am trying to execute python train.py within Anaconda prompt but I am receiving numerous line text and an AssertionError: File not found: div2.yaml. As you can see my div2.yaml file is based on the coco128 thats linked to my datasets photos and validation.

python train.py --img 640 --batch 16 --epochs 3 --data div2.yaml --weights yolov5s.pt

I tried to Upload more screen prints to show the file directories, but it wont allow me. The div2.yaml file is located in C:\Users\Marti\Desktop\yolov5\Data. I have tried entering the full directory into the code but I have the same outcome. I am not sure what is wrong, if someone can help

Thanks

  • 2
    Welcome to Stack Overflow. Please include the relevant parts of the code and the fulll traceback error as text. – ewokx Jun 14 '22 at 02:53
  • 1
    Your command assumes `div2.yaml` is in the current directory. If it isn't, then use the full pathname. – John Gordon Jun 14 '22 at 02:54
  • I did send screen prints but it seems to have not attached to my message? – Marze lells Jun 14 '22 at 02:56
  • my first thought was to use the full path --Data C:\Users\Marti\Desktop\yolov5\Data\div2.yaml but I get the same result – Marze lells Jun 14 '22 at 02:58
  • File "C:\Users\Marti\Desktop\yolov5\train.py", line 540, in main check_file(opt.data), check_yaml(opt.cfg), check_yaml(opt.hyp), str(opt.weights), str(opt.project) # checks File "C:\Users\Marti\Desktop\yolov5\utils\general.py", line 435, in check_file assert len(files), f'File not found: {file}' # assert file was found AssertionError: File not found: C:\Users\Marti\Desktop\yolov5\Data\div2.yaml – Marze lells Jun 14 '22 at 03:00
  • (base) C:\Users\Marti\Desktop\yolov5>python train.py --img 640 --batch 16 --epochs 3 --data C:\Users\Marti\Desktop\yolov5\Data\div2.yaml --weights yolov5s.pt – Marze lells Jun 14 '22 at 03:01
  • `File not found: C:\Users\Marti\Desktop\yolov5\Data\div2.yaml` Sounds like .. the file isn't there. – John Gordon Jun 14 '22 at 03:06
  • But it's there...... Can I not send screen prints on here? Thanks – Marze lells Jun 14 '22 at 03:24

0 Answers0