matterport / Mask_RCNN

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

Try using custom_callbacks. Counting accuracy takes a lot of time, so don't use it every epoch. #2674

Open t00lbelt opened 3 years ago

t00lbelt commented 3 years ago

Try using custom_callbacks. Counting accuracy takes a lot of time, so don't use it every epoch.

mean_average_precision_callback = modellib.MeanAveragePrecisionCallback(model,\ model_inference, dataset_val, calculate_map_at_every_X_epoch=5, verbose=1)

model.train(dataset_train, dataset_val, learning_rate=config.LEARNING_RATE, epochs=100, layers='heads', custom_callbacks=[mean_average_precision_callback])

_Originally posted by @VtlNmnk in https://github.com/matterport/Mask_RCNN/issues/1839#issuecomment-549430332_

t00lbelt commented 3 years ago

Hi Everyone, I am new to neural networks and humbly ask for assistance. I am working on the matterport Mask-RCNN with a custom dataset. To calculate accuracy, I added the code recommended in the post to my training and model scripts. When I ran my training script, I received the following error: image Where and how is 'model_inference' defined?