SkyTNT / anime-segmentation

high-accuracy segmentation for anime character
Apache License 2.0
649 stars 62 forks source link

Is it possible to save each character detected in an image to a separate file? #8

Open corydambach opened 1 year ago

corydambach commented 1 year ago

Is it possible to save each character detected in an image to a separate file?

SkyTNT commented 1 year ago

It is not possible now.

cory-vade commented 1 year ago

Is it because of the neural network architecture used?

narugo1992 commented 1 year ago

@cory-vade

Because this is a semantic segmentation problem. It will only identify pixels in the image that correspond to the concept of "person". If you expect to segment different individuals separately, then it would be an instance segmentation task, which requires completely different algorithms such as YOLO, DINO, and so on.

BTW, we have trained an object detection model specifically for characters in anime images (online demo, Python library). You might consider trying to perform object detection first and then use the semantic segmentation model within each detected region. Although it may not be perfect (for example, it may not separate two close individuals), it should yield some results.