SOLOv2-detectron2 icon indicating copy to clipboard operation
SOLOv2-detectron2 copied to clipboard

how to visualize the final result?

Open lucasjinreal opened this issue 5 years ago • 9 comments

how to visiulize the predicted result?

lucasjinreal avatar Jun 11 '20 04:06 lucasjinreal

The visiulize code(demo part) has been updated.

gakkiri avatar Jun 11 '20 06:06 gakkiri

    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

lucasjinreal avatar Jun 22 '20 07:06 lucasjinreal

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.

gakkiri avatar Jun 22 '20 07:06 gakkiri

@gakkiri thanks!

lucasjinreal avatar Jun 22 '20 07:06 lucasjinreal

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

lucasjinreal avatar Jun 22 '20 07:06 lucasjinreal

@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.

gakkiri avatar Jun 22 '20 07:06 gakkiri

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

lucasjinreal avatar Jun 22 '20 09:06 lucasjinreal

@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 avatar Jun 22 '20 09:06 gakkiri

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

gakkiri avatar Jun 22 '20 09:06 gakkiri