allenai / satlas-super-resolution

Apache License 2.0
190 stars 24 forks source link

'recursive=True' might be missing in glob function (ssr/infer.py) #37

Closed AdityaHegde712 closed 1 month ago

AdityaHegde712 commented 1 month ago

Hi, I noticed that on line 42, the recursive=True keyword argument might be missing: pngs = glob.glob(data_dir + "/**/*.png")

For it to recursively search files in data_dir, from my experience, it's necessary to include the recursive=True argument. While ** is intended to ensure recursive search, in practice, glob.glob only performs a recursive search when both ** is used, and recursive=True is mentioned. Otherwise, it treats ** as *.

The corrected line could be: pngs = glob.glob(data_dir + "/**/*.png", recursive=True)

Edit: Same goes for the line in infer_grid.py

piperwolters commented 1 month ago

Ah, thank you! I just pushed these changes.