chenhang98 / BPR

code for `Look Closer to Segment Better: Boundary Patch Refinement for Instance Segmentation`
Apache License 2.0
174 stars 23 forks source link

Adapt to newer MMSeg version #50

Closed LEONHWH closed 9 months ago

LEONHWH commented 9 months ago

I found some scripts such as “train.py” are not longer adapted the newer MMCV or mmsegmentation version. Can you offer your pip requirement on BPR? Or, I think extracting the BPR code from this mmseg version is the better way if you can tell where the most import code-file of BPR is in this project.

waitting for your reply.期待陈博士的回复,感谢

chenhang98 commented 9 months ago

Here is the requirements exported from pip list: pip_list.txt

Except for the scripts in the tools folder, the changes we made to mmseg consisted of the following:

configs/bpr
mmseg/datasets/pipelines/loading.py
mmseg/datasets/refine.py
mmseg/models/segmentors/encoder_decoder_refine.py
mmseg/models/backbones/hrnet/resnet_refine.py

These modifications are mainly to enable mmseg to correctly load and process the coarse mask input.

Hoping this information is helpful to you.

LEONHWH commented 9 months ago

Here is the requirements exported from pip list: pip_list.txt

Except for the scripts in the tools folder, the changes we made to mmseg consisted of the following:

configs/bpr
mmseg/datasets/pipelines/loading.py
mmseg/datasets/refine.py
mmseg/models/segmentors/encoder_decoder_refine.py
mmseg/models/backbones/hrnet/resnet_refine.py

These modifications are mainly to enable mmseg to correctly load and process the coarse mask input.

Hoping this information is helpful to you.

Thanks for your helping. I have a question about inference. The launch-testing file “inference_coco.sh” is related to the the script "test_float.py".I have compared this script with the "test.py" and found two changes: https://github.com/chenhang98/BPR/blob/9eafc3f1f6f6c4cfcdd0ceaf9f42bb2d07f90f4f/tools/test_float.py#L115 https://github.com/chenhang98/BPR/blob/9eafc3f1f6f6c4cfcdd0ceaf9f42bb2d07f90f4f/tools/test_float.py#L136C1-L136C1

I'm not sure about what's the reason and purpose of the changes. I also want to modify the "test.py" in the newer MMseg. Can you give me some instructions?

Thanks again.

chenhang98 commented 9 months ago

The first change is to preserve the segmentation results as float type, rather than as bool type (after thresholding). It allows for better merging of possible overlaps of the patches (i.e. average the overlaps of the patches). The other change is to save the model output to a file.

chenhang98 commented 9 months ago

feel free to reopen this issue