matterport / Mask_RCNN

Mask R-CNN for object detection and instance segmentation on Keras and TensorFlow
Other
24.73k stars 11.71k forks source link

TypeError: Unsupported dtype for TensorType: <dtype: 'int32'> #793

Open Habiib29 opened 6 years ago

Habiib29 commented 6 years ago

I'm trying to train my own data, and i'm having this message. how can i solve it ?

Traceback (most recent call last):

File "", line 1, in runfile('D:/Users/user_m/Mask/Mask_RCNN/usine.py', args='train --dataset="D:/Users/user_m/Mask/Mask_RCNN/data/usine/" --weights=D:/Users/user_m/Mask/Mask_RCNN/mask_rcnn_coco.h5 --image=D:/Users/user_m/Mask/Mask_RCNN/data/usine/predict --subset=D:/Users/user_m/Mask/Mask_RCNN/data/usine/val', wdir='D:/Users/user_m/Mask/Mask_RCNN')

File "D:\Users\user_m\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 705, in runfile execfile(filename, namespace)

File "D:\Users\user_m\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile exec(compile(f.read(), filename, 'exec'), namespace)

File "D:/Users/user_m/Mask/Mask_RCNN/usine.py", line 448, in model_dir=args.logs)

File "D:\Users\user_m\Mask\Mask_RCNN\mrcnn\model.py", line 1845, in init self.keras_model = self.build(mode=mode, config=config)

File "D:\Users\user_m\Mask\Mask_RCNN\mrcnn\model.py", line 1870, in build shape=[None, 1], name="input_rpn_match", dtype=tensorflow.int32)

File "D:\Users\user_m\AppData\Local\Continuum\anaconda3\lib\site-packages\keras\engine\input_layer.py", line 176, in Input input_tensor=tensor)

File "D:\Users\user_m\AppData\Local\Continuum\anaconda3\lib\site-packages\keras\legacy\interfaces.py", line 91, in wrapper return func(*args, **kwargs)

File "D:\Users\user_m\AppData\Local\Continuum\anaconda3\lib\site-packages\keras\engine\input_layer.py", line 85, in init name=self.name)

File "D:\Users\user_m\AppData\Local\Continuum\anaconda3\lib\site-packages\keras\backend\theano_backend.py", line 246, in placeholder x = T.TensorType(dtype, broadcast)(name)

File "D:\Users\user_m\AppData\Local\Continuum\anaconda3\lib\site-packages\theano\tensor\type.py", line 51, in init self.dtype_specs() # error checking is done there

File "D:\Users\user_m\AppData\Local\Continuum\anaconda3\lib\site-packages\theano\tensor\type.py", line 272, in dtype_specs % (self.class.name, self.dtype))

TypeError: Unsupported dtype for TensorType: <dtype: 'int32'>

Xiaoyang-Rebecca commented 6 years ago

check the label datatype, either shouldn't go for int32, need to be str ; or convert it to tensorType "tf.int32"