gakkiri / SOLOv2-detectron2

Unofficial implementation for SOLOv2 instance segmentation
15 stars 3 forks source link

how to visualize the final result? #2

Open lucasjinreal opened 4 years ago

lucasjinreal commented 4 years ago

how to visiulize the predicted result?

gakkiri commented 4 years ago

The visiulize code(demo part) has been updated.

lucasjinreal commented 4 years ago
    assert masks.shape[-1] == masks.shape[-2], "Only square mask predictions are supported"
AssertionError: Only square mask predictions are supported

Got this error when runing the demo

gakkiri commented 4 years ago

This file(postprocessing.py in detectron2) needs to be replaced.

First replace the original detectron2 installed postprocessing.py with the file.

This is due to Detectron2's postprocessing.py only supports square mask prediction, This issue has been modified in the provided file.

lucasjinreal commented 4 years ago

@gakkiri thanks!

lucasjinreal commented 4 years ago

@gakkiri May I ask why do u trim the person class in training? From your trained model provided can not see person detected.

gakkiri commented 4 years ago

@jinfagang Initially, this was a bug here https://github.com/gakkiri/SOLOv2-detectron2/blob/master/SOLOv2/modeling/solov2.py#L180. That's when I used .gt(0), causing Person to be ignored, and other categories are well trained. After I fixed the problem and found low performance, I thought maybe I was missing something.

lucasjinreal commented 4 years ago

@gakkiri So did u trained on full classes and found low performance? some biasis with the index cls id?

gakkiri commented 4 years ago

@jinfagang No, all categories of AP are not high(about 10+-), but the losses converged to a good level. I think maybe the problem is somewhere else. Although at that time my gpu server suddenly down caused me not to be able to get the best weight.

gakkiri commented 4 years ago

@jinfagang BTW, It works well when there's no Person, and that's what surprises me.