matterport / Mask_RCNN

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

Useful Conda Environment for Mask_RCNN Project #2801

Open Atotem opened 2 years ago

Atotem commented 2 years ago

Hi! After several tries I finally obtained a useful conda enviorment to run at least the demo from the samples folder. I had to set the enviorment to a python 3.6 version and install tensorflow and keras correctly. I hope this information is useful to you, i wasted a lot of time setting up my environment. Cheers!

P.D.: Change the document suffix from .txt to .yml environment.txt

fschiro commented 2 years ago

First, thank you so much for doing this!!!

When using this environment I got an error at train time in reference to tf.reduce_mean. The error states the function doesn't have the argument keepdims.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/media/frank/T7/programs/Mask_RCNN/mrcnn/model.py", line 2354, in train
    self.compile(learning_rate, self.config.LEARNING_MOMENTUM)
  File "/media/frank/T7/programs/Mask_RCNN/mrcnn/model.py", line 2173, in compile
    tf.reduce_mean(layer.output, keepdims=True)
TypeError: reduce_mean() got an unexpected keyword argument 'keepdims'

To fix this problem just change all instances of keepdims to keep_dims in model.py. Reference: https://github.com/matterport/Mask_RCNN/issues/572