Bug in Counterfactual Generation Process
The traditional pathway
Counterfactual should be generated using a template image. And then whether it is reference driven or latent driven, the template image is altered into a counterfactual using the stile of the reference or latent code.
Bug description
The source class is always different from the target class. Yet in the resulting dataset, it happens that there are a small amount of image that has the same target and source class. This shouldn't happen.
Possible solution
- Either for very specific example in the loop, in the generation process, there are case when source class is the same as the target class (could happen because there is a certain class imbalance. Or the way fold are handled.
- Either in the way the dataset is created, the source and target class is miss registered.