Mask_RCNN
Mask_RCNN copied to clipboard
Type object "Config" has no attribute "image_shape"
I am trying to recreate the "Brain tumor masking using MRCNN" project. However, I'm running into a problem as shown in the title. I'm unable to get through this line
Create model object in inference mode.
model = modellib.MaskRCNN(mode="inference", model_dir=MODEL_DIR, config=config). Can anyone tell me what is wrong and how can I solve it? Thanks a lot!!
The mode is in 'inference' if you have defined a different class for Inference then, config=config will not work. My code for eg is like this:
class InferenceConfig(CustomConfig):
GPU_COUNT = 1
IMAGES_PER_GPU = 1
IMAGE_MIN_DIM = 512
IMAGE_MAX_DIM = 512
DETECTION_MIN_CONFIDENCE = 0.85
inference_config = InferenceConfig()
model = modellib.MaskRCNN(mode="inference",
config=inference_config,
model_dir=MODEL_DIR)