brudfors / UniRes

Model-based super-resolution of medical images in PyTorch.
MIT License
75 stars 12 forks source link

Boolean values are difficult to set in the command-line tool #10

Closed balbasty closed 3 years ago

balbasty commented 3 years ago

It seems that ArgumentParser has a weird way of converting values to bool as only "" is mapped to False (False and 0 map to True). It makes it a struggle to deactivate steps (e.g., --crop or --do_atlas_align). Maybe something along those lines can be used to make it easier for the user to pass boolean values?

(Also, it would be super useful to have the default values written in the command-line help)

Thanks!

brudfors commented 3 years ago

Thanks for this, just pushed a fix.