htcr / sam_road

Segment Anything Model for large-scale, vectorized road network extraction from aerial imagery. CVPRW 2024
https://arxiv.org/pdf/2403.16051.pdf
MIT License
146 stars 18 forks source link

The shape of variable accidentally changed #29

Closed mwang063 closed 1 month ago

mwang063 commented 1 month ago

Hello, thanks so much for your work! I came across a problem when running the model. In the code file model.py about line 140, the code 'pair_features = self.transformer_encoder(pair_features, src_key_padding_mask=padding_mask)' might cause error sometimes.

The shape of pair_features should not be changed before and after self.transformer_encoder, but at some time, its shape might be changed which confused me. Could you find the reason? Thanks a lot!

htcr commented 1 month ago

Hi, thank you for your interest - I think the code shall run fine in general for Cityscale and SpaceNet dataset. Have you found a way to reliably reproduce?

mwang063 commented 1 month ago

Thanks for your reply, i will check my reproduction way and dataset further. Thanks!