1
$\begingroup$

If I need to detect on an image some objects and we are only interested in counting them, between image segmentation and object detection which one would you think would yield best results in terms of accuracy of instance detections?

In my opinion there is no doubt that the object detection would yield better results but I wouldn't really know to say why. I know that for image segmentation accuracy is not a metric per se but let's just assume we segment the image to get the object instances and count them.

In your answer please provide the motivation behind your choice?

$\endgroup$
1
  • $\begingroup$ What type of items are you trying to detect? It may be relevant to answer your question $\endgroup$ Commented Feb 1 at 17:25

2 Answers 2

1
$\begingroup$

Image Segmentation can extract objects from environments now adays after Meta published SAM (SegmentAnything) and even with few-shot learning can perform very well. Recommend using it to set the stage for object detection.

Then object detection model robustness can be measured as extracted objects can be relocated in noisy environments (background with Gaussian Noise) or non-common environments for the objects.

Thus for an optimal pipeline, utilize both segmentation and then object detection.

$\endgroup$
1
$\begingroup$

It's an interesting question. I don't think there is a definitive "always true" answer. So empirical results would prevail.

To me, the biggest factor regarding accuracy would be the type of objects you are trying to detect. Object detection deals well with items that fit in rectangles, but what if you are trying to count how many bananas are in a box? Image segmentation might also work well on scenarios where objects are stacked or hidden behind each other.

You only mentioned accuracy, but for good measure, it's good to mention that object detection datasets are easier to build and therefore are often larger. So it's likely an object detection pre-trained model would be quite good. Whereas image segmentation is often dealing with more specialized cases (i.e. medical images).

One last thing. Image segmentation might not always deal nicely with items that are split in chunks (i.e. a person behind a lamp post). The algorithm might detect all the pixels that represent a person, but is it detecting one or two? That's important to investigate.

$\endgroup$
1
  • $\begingroup$ Let's presume you have the same amount of pictures for both approaches. And you can do the task in both ways. Let's say it's a simple task like just as I mentioned in my question. So you say that both approaches should theoretically yield similarly results? In my opinion segmentation is more complex and i think it should give poorer results than only detection. But is just my feeling. $\endgroup$
    – Dinu Mihai
    Commented Feb 9 at 22:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.