Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
chrisTopp84 opened this issue Sep 26, 2020 · 2 comments

Comments

@chrisTopp84
Copy link

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

@RahmadSadli
Copy link
Owner

RahmadSadli commented Sep 26, 2020

Hi,
Just go to YOLOv3_TF2 folder and execute the convert_weights.py from it.
cheers,

@chrisTopp84
Copy link
Author

Thank you.

Next time i should switch on my head first ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants