iDesktopX 10i 机器学习 模型训练时 出错

0 投票
使用产品:iDesktopX 10i     操作系统:win10 x64。

在进行模型训练时出错:

Python 3.6.6 | packaged by conda-forge | (default, Jul 26 2018, 11:48:23) [MSC v.1900 64 bit (AMD64)]
Using TensorFlow backend.
[iObjectsPy]: Connection gateway-service successful, Python callback port bind 54946

Backend Qt5Agg is interactive backend. Turning interactive mode on.
Output snapshot model will be saved to `D:\机器学习\模型训练\ckpt_model_path`
TensorFlow summaries will be saved to `D:\机器学习\模型训练\tensorflow`
Output model will be saved to `D:\机器学习\模型\saved_model`
Appending horizontally-flipped training examples...
done
Preparing training data...
done
Preparing training data...
done
Filtered 214 roidb entries: 540 -> 326
Filtered 16 roidb entries: 31 -> 15
Solving...
C:\SuperMap\SuperMap iDesktopX 10i\support\MiniConda\envs\requirements-conda-cpu\lib\site-packages\tensorflow\python\ops\gradients_impl.py:112: UserWarning: Converting sparse IndexedSlices to a dense Tensor of unknown shape. This may consume a large amount of memory.
  "Converting sparse IndexedSlices to a dense Tensor of unknown shape. "
Loading initial model weights from C:\SuperMap\SuperMap iDesktopX 10i\resources_ml\backbone\res101.ckpt
Loaded.
Fix Resnet V1 layers..
Fixed.
Traceback (most recent call last):
  File "<input>", line 10, in <module>
  File "D:\BuildAgent\work\bcb3e729e880e969/iobjectspy/ml\vision\_trainer.py", line 63, in object_detect_train
  File "D:\BuildAgent\work\bcb3e729e880e969/iobjectspy/ml\vision\_trainer_collector\object_detection_train.py", line 27, in train
  File "D:\BuildAgent\work\bcb3e729e880e969/iobjectspy/ml\vision\_trainer_collector\object_detection_train.py", line 32, in faster_rcnn_tensorflow
  File "D:\BuildAgent\work\bcb3e729e880e969/iobjectspy/ml\vision\_models\faster_rcnn\model\faster_rcnn.py", line 139, in train
  File "D:\BuildAgent\work\bcb3e729e880e969/iobjectspy/ml\vision\_models\faster_rcnn\model\train_val.py", line 404, in train_net
  File "D:\BuildAgent\work\bcb3e729e880e969/iobjectspy/ml\vision\_models\faster_rcnn\model\train_val.py", line 282, in train_model
  File "D:\BuildAgent\work\bcb3e729e880e969/iobjectspy/ml\vision\_models\faster_rcnn\roi_data_layer\layer.py", line 90, in forward
  File "D:\BuildAgent\work\bcb3e729e880e969/iobjectspy/ml\vision\_models\faster_rcnn\roi_data_layer\layer.py", line 86, in _get_next_minibatch
  File "D:\BuildAgent\work\bcb3e729e880e969/iobjectspy/ml\vision\_models\faster_rcnn\roi_data_layer\minibatch.py", line 32, in get_minibatch
  File "D:\BuildAgent\work\bcb3e729e880e969/iobjectspy/ml\vision\_models\faster_rcnn\roi_data_layer\minibatch.py", line 70, in _get_image_blob
  File "D:\BuildAgent\work\bcb3e729e880e969/iobjectspy/ml\vision\_models\faster_rcnn\utils\blob.py", line 35, in prep_im_for_blob
AttributeError: 'NoneType' object has no attribute 'astype'

请问问题出在哪?是图片格式问题吗?如何解决?
11月 28, 2019 分类:  177次浏览 | 用户: ygtwrdx (6 分)

1个回答

1 投票
 
已采纳

您好,您在做模型训练时选择的模型训练用途是什么呢?训练配置文件需要与模型训练用途保持一致,您那边检查一下。模型配置文件介绍:
1.scene_cls_train_config.sdt:场景分类
2.object_detection_train_config.sdt:目标检测
3.multi_cls_train_config.sdt:地物分类
4.binary_clas_train_config.sdt :二元分类

11月 28, 2019 用户: 董懿鑫 名扬四海 (4,067 分)
采纳于 11月 29, 2019 用户:ygtwrdx

您好,我用的模型用途是目标检测,训练配置文件也是选的object_detection_train_config.sdt,在训练数据生成时也是选的目标检测。

<!--StartFragment -->

您好,您那边方便发下您的数据吗?可以私信我数据地址 ,谢谢

您好,我使用的数据就是机器学习资源包 resources_ml 文件夹中的样本文件,binary_cls_train_data.udbx和image.tif。

您好,您将存储路径都设置为全英文,尽量不要有中文或者特殊字符。
...