I'm trying to use the train-azureml.py script to train a custom model.
I get the following error:
Traceback (most recent call last):
File "train_azureml.py", line 274, in <module>
anchors_path=args.anchors_path, data_dir=args.data_dir)
File "train_azureml.py", line 102, in main
callbacks=[logging, LogRunMetrics()])
File "/Users/hernanrazo/pythonProjects/package_theft_detection/theft_env/lib/python3.6/site-packages/keras/legacy/interfaces.py", line 91, in wrapper
return func(*args, **kwargs)
File "/Users/hernanrazo/pythonProjects/package_theft_detection/theft_env/lib/python3.6/site-packages/keras/engine/training.py", line 1418, in fit_generator
initial_epoch=initial_epoch)
File "/Users/hernanrazo/pythonProjects/package_theft_detection/theft_env/lib/python3.6/site-packages/keras/engine/training_generator.py", line 181, in fit_generator
generator_output = next(output_generator)
File "/Users/hernanrazo/pythonProjects/package_theft_detection/theft_env/lib/python3.6/site-packages/keras/utils/data_utils.py", line 709, in get
six.reraise(*sys.exc_info())
File "/Users/hernanrazo/pythonProjects/package_theft_detection/theft_env/lib/python3.6/site-packages/six.py", line 703, in reraise
raise value
File "/Users/hernanrazo/pythonProjects/package_theft_detection/theft_env/lib/python3.6/site-packages/keras/utils/data_utils.py", line 685, in get
inputs = self.queue.get(block=True).get()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 644, in get
raise self._value
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/Users/hernanrazo/pythonProjects/package_theft_detection/theft_env/lib/python3.6/site-packages/keras/utils/data_utils.py", line 626, in next_sample
return six.next(_SHARED_SEQUENCES[uid])
File "train_azureml.py", line 221, in data_generator
image, box = get_random_data(annotation_lines[i], input_shape, random=True)
File "/Users/hernanrazo/pythonProjects/package_theft_detection/azureml-keras-yolov3-custom/project/yolo3/utils.py", line 39, in get_random_data
image = Image.open(line[0])
File "/Users/hernanrazo/pythonProjects/package_theft_detection/theft_env/lib/python3.6/site-packages/PIL/Image.py", line 2766, in open
fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'data/JPEGImages/f2669269b8aaea24.jpg
I know for a fact that the images are in my local computer and in the azure container. I don't know why it is giving me this error but I suspect I did not generate the annotations correctly.
I'm trying to use the
train-azureml.py
script to train a custom model.I get the following error:
The terminal command I use to start training is:
I know for a fact that the images are in my local computer and in the azure container. I don't know why it is giving me this error but I suspect I did not generate the annotations correctly.
my train_list.txt file looks like:
The
voc_annotations.py
file generated an .xml
file for each image and looks like:Any help is appreciated.