Closed Leengit closed 1 month ago
Design considerations include that the existing metrics are implemented for a tensorflow
model, but the library we are using to implement BatchBALD is based upon torch
. The current plan is to change the existing implementation, currently in superpixel_classification/SuperpixelClassification/SuperpixelClassification.py
, in several ways.
SuperpixelClassificationBase
class that implements functionality that does not depend upon either the tensorflow
or torch
packages.SuperpixelClassificationTensorflow
and SuperpixelClassificationTorch
, each implementing those methods that depend upon tensorflow
or torch
respectively..py
suffix.batchbald
to the user interface alongside confidence
, margin
, and negative_entropy
.SuperpixelClassification.py
will use its if __name__ == '__main__':
section to check args.certainty
, import either SuperpixelClassificationTensorflow
or SuperpixelClassificationTorch
(and, from within them, import tensorflow
or torch
, respectively), and instantiate and invoke the class.superpixel-classification
(e.g., in our docker image) will not have tensorflow
as a requirement any more. Instead, both tensorflow
and torch
will be options, as in pip install superpixel-classification[tensorflow,torch]
.Please see Pull Request #12 for any subsequent discussions.
Pull request #12 implements the needed re-architecturing. It also includes a start at the torch-specific code, but it is not yet debugged and is not made accessible to the user by that pull request. Making debugged torch-specific code available to the user will be done in a subsequent pull request.
This was done in #16.
We currently support selection of active learning samples via 3 metrics:
confidence
,margin
, andnegative_entropy
. To this we wish to add a fourth,batchbald
.