raise AttributeError(name)

遇到问题如下:
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

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值