differentiate-catalysis / catalyst-bubble-detection

Detect bubbles that are evolving gas from a catalyst surface to determine reaction rate
4 stars 0 forks source link

Update torch version, add detections per img hyperparameter, add v2 weights #72

Closed jimtjames closed 2 years ago

jimtjames commented 2 years ago

This PR aims to add a configurable hyperparameter to adjust the number of RoIs proposed by the RoIHeads, as well as updating to the latest torch stable release. We will need to update the conda env via:

conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch

This also adds the v2 versions of MaskRCNN and FasterRCNN. These are largely the same model but have some minor optimizations for improved performance (namely no frozen batchnorm in the backbone). These models should be preferred over the original MaskRCNN and FasterRCNN for future runs. They are denoted as mask_rcnn_v2 and faster_rcnn_v2 respectively.

I did some basic testing on this and it seems to run fine (was able to hit ~72 mAP without any hyperparameter tuning or contrast enhancement on IrO2) but we'll probably want more rigorous testing.

jimtjames commented 2 years ago

@Aadit-Ambadkar definitely add comments as well, it seems it only wants me to add one reviewer for some reason.

jimtjames commented 2 years ago

Yes using the v2 versions of the models should give a modest performance boost.

NathanPruyne commented 2 years ago

Updated with using the different versions as a parameter! I left the old ones as the default, however, for backwards compatibility purposes.