markjay4k / Mask-RCNN-series

This series we'll use Mask RCNN
164 stars 231 forks source link

tensorflow.python.framework.errors_impl.InvalidArgumentError: indices[0] = 29 is not in [0, 22 #14

Open fabioaraujopt opened 6 years ago

fabioaraujopt commented 6 years ago

Hello,

while running the process_video.py i get this error. Have you an ideia?

Traceback (most recent call last): File "process_video.py", line 3, in from visualize_cv2 import model, display_instances, class_names File "C:\Anaconda3\envs\MaskRCNN\Mask_RCNN\mrcnn\visualize_cv2.py", line 122, in results = model.detect([frame], verbose=0) File "C:\Anaconda3\envs\MaskRCNN\Mask_RCNN\mrcnn\model.py", line 2525, in detect self.keras_model.predict([molded_images, image_metas, anchors], verbose=0) File "C:\Anaconda3\envs\MaskRCNN\lib\site-packages\keras\engine\training.py", line 1169, in predict steps=steps) File "C:\Anaconda3\envs\MaskRCNN\lib\site-packages\keras\engine\training_arrays.py", line 294, in predict_loop batch_outs = f(ins_batch) File "C:\Anaconda3\envs\MaskRCNN\lib\site-packages\keras\backend\tensorflow_backend.py", line 2715, in call return self._call(inputs) File "C:\Anaconda3\envs\MaskRCNN\lib\site-packages\keras\backend\tensorflow_backend.py", line 2675, in _call fetched = self._callable_fn(*array_vals) File "C:\Anaconda3\envs\MaskRCNN\lib\site-packages\tensorflow\python\client\session.py", line 1439, in call run_metadata_ptr) File "C:\Anaconda3\envs\MaskRCNN\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 528, in exit c_api.TF_GetCode(self.status.status)) tensorflow.python.framework.errors_impl.InvalidArgumentError: indices[0] = 29 is not in [0, 22) [[{{node mrcnn_detection/map/while/GatherV2_2}} = GatherV2[Taxis=DT_INT32, Tindices=DT_INT32, Tparams=DT_INT64, _device="/job:localhost/replica:0/task:0/device:CPU:0"](mrcnn_detection/map/while/strided_slice, mrcnn_detection/map/while/non_max_suppression/NonMaxSuppressionV3, mrcnn_detection/map/while/PadV2/paddings/0/0)]]

cooleel commented 5 years ago

Did you solve the problem? I Met the same error when trying to run the inference mode on the CPU. The same script runs well on a GPU machine. Any ideas? Thanks.