hanktseng131415go / RAMEM

The implemented code of RAMEM, Real-time Automatic M-mode Echocardiography Measurement with Panel Attention from Local-to-Global Pixels.
8 stars 4 forks source link

Handling of overlapping Labels (e.g. Person - Head - Eyes)? #2

Open thomasf1 opened 11 months ago

thomasf1 commented 11 months ago

Hey :)

Can your code handle overlapping Labels (e.g. Person - Head - Eyes)? or is it also assigning one pixel to one label like most other instance segmentation models? A hint what to use would be good, at the moment I´m splitting the label layers into separate models, which is not ideal.

hanktseng131415go commented 11 months ago

Hi,

Considering your case, I believe you can find the answer in the line: https://github.com/hanktseng131415go/RAMEM/blob/7b880cc3012751a889038cd3eaf522642538ecca/utils/output_utils.py#L398 in which colours the mask toward each label (it produces the overlapping masks if you stack all the masks together).

The following line, https://github.com/hanktseng131415go/RAMEM/blob/7b880cc3012751a889038cd3eaf522642538ecca/utils/output_utils.py#L400 sum-ups all the mask in int values by dividing the number of labels (it does the instance segmentation one-pixel assignment).