GXYM / TextBPN-Plus-Plus

Arbitrary Shape Text Detection via Boundary Transformer;The paper at: https://arxiv.org/abs/2205.05320, which has been accepted by IEEE Transactions on Multimedia (T-MM 2023).
175 stars 38 forks source link

Possible error in image shape definition in textnet.py #22

Closed lucatirel closed 1 year ago

lucatirel commented 1 year ago

Hello, I am using your repository and i noticed a possible error. I would like if possible just to have a clarification.

In: TextBPN-Plus-Plus/network/textnet.py

Where you defined: image = torch.zeros((b, c, cfg.test_size[1], cfg.test_size[1]), dtype=torch.float32).to(cfg.device)

It seems that the image is being forced to be square by using cfg.test_size[1] for both dimensions. I didn't understand the reason for this. Can you clarify if this is intended or is it an oversight?

Thank you for your time.

GXYM commented 1 year ago

Hello, I am using your repository and i noticed a possible error. I would like if possible just to have a clarification.

In: TextBPN-Plus-Plus/network/textnet.py

Where you defined: image = torch.zeros((b, c, cfg.test_size[1], cfg.test_size[1]), dtype=torch.float32).to(cfg.device)

It seems that the image is being forced to be square by using cfg.test_size[1] for both dimensions. I didn't understand the reason for this. Can you clarify if this is intended or is it an oversight?

Thank you for your time.

This is because in older versions of Pytorch, maintaining the same size of input images can achieve faster inference speed, and this operation does not result in performance loss。