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
150 stars 18 forks source link

The shape of variable accidentally changed #29

Closed mwang063 closed 2 months ago

mwang063 commented 2 months 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 2 months 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 2 months ago

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