Skip to content

FileNotFoundError: [Errno 2] No such file or directory: 'cfg/yolov3.cfg' #6

@chrisTopp84

Description

@chrisTopp84

Hi,
when I run python3 convert_weights.py

the error below occurs.

christopher@ccz:~/Deep-Learning$ python3 convert_weights.py
2020-09-26 18:32:45.032131: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0
2020-09-26 18:32:48.161327: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libnvinfer.so.6
2020-09-26 18:32:48.163125: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libnvinfer_plugin.so.6
ausgeführt
Traceback (most recent call last):
  File "convert_weights.py", line 78, in <module>
    main()
  File "convert_weights.py", line 67, in main
    model=YOLOv3Net(cfgfile,model_size,num_classes)
  File "/home/christopher/Deep-Learning/yolov3.py", line 29, in YOLOv3Net
    blocks = parse_cfg(cfgfile)
  File "/home/christopher/Deep-Learning/yolov3.py", line 11, in parse_cfg
    with open(cfgfile, 'r') as file:
FileNotFoundError: [Errno 2] No such file or directory: 'cfg/yolov3.cfg'

I dont really know why it can't find yolov3.cfg file???

I start the convert_weights.py file within this directory:

christopher@ccz:~/Deep-Learning$ ls
convert_weights.py  __pycache__  video.py   YOLOv3_TF2
image.py            utils.py     yolov3.py

And as you can see the yolov3.cfg file is at its place.

christopher@ccz:~/Deep-Learning$ cd YOLOv3_TF2/
christopher@ccz:~/Deep-Learning/YOLOv3_TF2$ ls
cfg                 data      README.md  video.py  yolov3.py
convert_weights.py  image.py  utils.py   weights
christopher@ccz:~/Deep-Learning/YOLOv3_TF2$ cd cfg
christopher@ccz:~/Deep-Learning/YOLOv3_TF2/cfg$ ls
yolov3.cfg

Any idea what's going wrong?

Best regards
chris

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions