experiencor / keras-yolo3

Training and Detecting Objects with YOLO3
MIT License
1.61k stars 861 forks source link

Problem training the model #336

Closed TheChief123 closed 1 year ago

TheChief123 commented 2 years ago

I have successfully installed the packages from requirement.txt.

I am now working on the kangaroo example.

When I run the code:

python train.py -c config.json

I get the following error:

[Errno 2] No such file or directory: 'valid_annot00147.xml' Ignore this bad annotation: valid_annot00147.xml

The error is the same through files 00147.xml to 00183.xml in the valid_annot folder which contains .xml annotation files for images 00147 to 00183.

I am sure that this is not a typo in the config.json file. I have also renamed/made new folder etc. Problem stays the same. It cannot access the validation annotations. The folder with annotations is in the same directory as all the other files from this repository.

Below is the full terminal output:

` (cpu_only) C:\Users\Public\DiplomskaNaloga\deep\keras-yolo3-master\keras-yolo3-master>python train.py -c config.json Using TensorFlow backend. 2022-07-02 15:02:14.507225: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_100.dll'; dlerror: cudart64_100.dll not found 2022-07-02 15:02:14.507354: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. 2022-07-02 15:02:16.190426: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 2022-07-02 15:02:16.194358: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library nvcuda.dll 2022-07-02 15:02:16.281043: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties: name: Quadro K2100M major: 3 minor: 0 memoryClockRate(GHz): 0.6665 pciBusID: 0000:01:00.0 2022-07-02 15:02:16.282220: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_100.dll'; dlerror: cudart64_100.dll not found 2022-07-02 15:02:16.284486: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cublas64_100.dll'; dlerror: cublas64_100.dll not found 2022-07-02 15:02:16.287633: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cufft64_100.dll'; dlerror: cufft64_100.dll not found 2022-07-02 15:02:16.288589: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'curand64_100.dll'; dlerror: curand64_100.dll not found 2022-07-02 15:02:16.289533: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cusolver64_100.dll'; dlerror: cusolver64_100.dll not found 2022-07-02 15:02:16.290489: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cusparse64_100.dll'; dlerror: cusparse64_100.dll not found 2022-07-02 15:02:16.291538: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudnn64_7.dll'; dlerror: cudnn64_7.dll not found 2022-07-02 15:02:16.291621: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1641] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform. Skipping registering GPU devices... 2022-07-02 15:02:16.329293: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1159] Device interconnect StreamExecutor with strength 1 edge matrix: 2022-07-02 15:02:16.329427: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1165] 0 2022-07-02 15:02:16.331331: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1178] 0: N WARNING:tensorflow:From train.py:26: The name tf.keras.backend.set_session is deprecated. Please use tf.compat.v1.keras.backend.set_session instead.

[Errno 2] No such file or directory: 'valid_annot00147.xml' Ignore this bad annotation: valid_annot00147.xml [Errno 2] No such file or directory: 'valid_annot00148.xml' Ignore this bad annotation: valid_annot00148.xml [Errno 2] No such file or directory: 'valid_annot00149.xml' Ignore this bad annotation: valid_annot00149.xml [Errno 2] No such file or directory: 'valid_annot00150.xml' Ignore this bad annotation: valid_annot00150.xml [Errno 2] No such file or directory: 'valid_annot00151.xml' Ignore this bad annotation: valid_annot00151.xml [Errno 2] No such file or directory: 'valid_annot00152.xml' Ignore this bad annotation: valid_annot00152.xml [Errno 2] No such file or directory: 'valid_annot00153.xml' Ignore this bad annotation: valid_annot00153.xml [Errno 2] No such file or directory: 'valid_annot00154.xml' Ignore this bad annotation: valid_annot00154.xml [Errno 2] No such file or directory: 'valid_annot00155.xml' Ignore this bad annotation: valid_annot00155.xml [Errno 2] No such file or directory: 'valid_annot00156.xml' Ignore this bad annotation: valid_annot00156.xml [Errno 2] No such file or directory: 'valid_annot00157.xml' Ignore this bad annotation: valid_annot00157.xml [Errno 2] No such file or directory: 'valid_annot00158.xml' Ignore this bad annotation: valid_annot00158.xml [Errno 2] No such file or directory: 'valid_annot00159.xml' Ignore this bad annotation: valid_annot00159.xml [Errno 2] No such file or directory: 'valid_annot00161.xml' Ignore this bad annotation: valid_annot00161.xml [Errno 2] No such file or directory: 'valid_annot00162.xml' Ignore this bad annotation: valid_annot00162.xml [Errno 2] No such file or directory: 'valid_annot00163.xml' Ignore this bad annotation: valid_annot00163.xml [Errno 2] No such file or directory: 'valid_annot00164.xml' Ignore this bad annotation: valid_annot00164.xml [Errno 2] No such file or directory: 'valid_annot00166.xml' Ignore this bad annotation: valid_annot00166.xml [Errno 2] No such file or directory: 'valid_annot00167.xml' Ignore this bad annotation: valid_annot00167.xml [Errno 2] No such file or directory: 'valid_annot00168.xml' Ignore this bad annotation: valid_annot00168.xml [Errno 2] No such file or directory: 'valid_annot00169.xml' Ignore this bad annotation: valid_annot00169.xml [Errno 2] No such file or directory: 'valid_annot00170.xml' Ignore this bad annotation: valid_annot00170.xml [Errno 2] No such file or directory: 'valid_annot00171.xml' Ignore this bad annotation: valid_annot00171.xml [Errno 2] No such file or directory: 'valid_annot00172.xml' Ignore this bad annotation: valid_annot00172.xml [Errno 2] No such file or directory: 'valid_annot00173.xml' Ignore this bad annotation: valid_annot00173.xml [Errno 2] No such file or directory: 'valid_annot00174.xml' Ignore this bad annotation: valid_annot00174.xml [Errno 2] No such file or directory: 'valid_annot00175.xml' Ignore this bad annotation: valid_annot00175.xml [Errno 2] No such file or directory: 'valid_annot00176.xml' Ignore this bad annotation: valid_annot00176.xml [Errno 2] No such file or directory: 'valid_annot00177.xml' Ignore this bad annotation: valid_annot00177.xml [Errno 2] No such file or directory: 'valid_annot00178.xml' Ignore this bad annotation: valid_annot00178.xml [Errno 2] No such file or directory: 'valid_annot00179.xml' Ignore this bad annotation: valid_annot00179.xml [Errno 2] No such file or directory: 'valid_annot00180.xml' Ignore this bad annotation: valid_annot00180.xml [Errno 2] No such file or directory: 'valid_annot00181.xml' Ignore this bad annotation: valid_annot00181.xml [Errno 2] No such file or directory: 'valid_annot00182.xml' Ignore this bad annotation: valid_annot00182.xml [Errno 2] No such file or directory: 'valid_annot00183.xml' Ignore this bad annotation: valid_annot00183.xml Traceback (most recent call last): File "train.py", line 289, in main(args) File "train.py", line 191, in main config['model']['labels'] File "train.py", line 42, in create_training_instances valid_ints, valid_labels = parse_voc_annotation(valid_annot_folder, valid_image_folder, valid_cache, labels) File "C:\Users\Public\DiplomskaNaloga\deep\keras-yolo3-master\keras-yolo3-master\voc.py", line 64, in parse_voc_annotation with open(cache_name, 'wb') as handle: FileNotFoundError: [Errno 2] No such file or directory: '' `

Can anyone help me diagnose this?

Thank you