Open AlbertoMCS opened 5 years ago
You can insert a for loop to count every detected class.
You will want to look at the model.detect() output.
You will want to look at the model.detect() output.
* https://github.com/matterport/Mask_RCNN/blob/master/mrcnn/model.py#L2532 counting the number of each class_id will give you the information you want.
When I count the number of class_id, using len(r['class_ids']))
it just returns me 1.
I suppose it counts the number of classes identified in each image. In my case I have only one class, like nucleus samples. The solution I tried is len(r["rois"])
. I think I get the right answer using this.
Have you solved this problem ?
Hi,
I set up demo.ipynb correctly so now every time I input an image I get as an output the same image with the elements detected highlighted with different colours. The question is: how can I get how many elements of one class have been detected? e.g. If the network has detected 5 people and 3 cars and I would like to get as an output "5 people, 3 cars".
Thanks,