遇到问题如下:
Traceback (most recent call last):
File "keras_retinanet/bin/train.py", line 426, in <module>
main()
File "keras_retinanet/bin/train.py", line 362, in main
train_generator, validation_generator = create_generators(args)
File "keras_retinanet/bin/train.py", line 190, in create_generators
batch_size=args.batch_size
File "keras_retinanet/bin/../../keras_retinanet/preprocessing/pascal_voc.py", line 92, in __init__
super(PascalVocGenerator, self).__init__(**kwargs)
File "keras_retinanet/bin/../../keras_retinanet/preprocessing/generator.py", line 60, in __init__
self.group_images()
File "keras_retinanet/bin/../../keras_retinanet/preprocessing/generator.py", line 166, in group_images
order.sort(key=lambda x: self.image_aspect_ratio(x))
File "keras_retinanet/bin/../../keras_retinanet/preprocessing/generator.py", line 166, in <lambda>
order.sort(key=lambda x: self.image_aspect_ratio(x))
File "keras_retinanet/bin/../../keras_retinanet/preprocessing/pascal_voc.py", line 109, in image_aspect_ratio
return float(image.width) / float(image.height)
File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 608, in __getattr__
raise AttributeError(name)
AttributeError: width
解决方法:
pip install --upgrade Pillow