Open SaraSlm opened 1 year ago
Hello,
We did not train any classifier. The classifier and the oracle, we trained them using the DiVE's code. We shared the weights for future work to compare more fairly with us. The idea of our work is to generate counterfactuals for a given classifier.
With respect to the oracle, could you be more specific about what did you not understand? (eg. what is used for?)
Hello,
I want to know which specific attribute the target label in the repo refers to (smile or young or something else?) Does "target_label=-1" in the parameter refer to the last column "young"? Can counterfactuals based on other attributes (such as Male) be generated by simply modifying the value of target_label?
Thank you for your help!
Hi,
There are two flags you need to take into account when generating the counterfactuals.
--query_label
selects which binary task to choose (e.g. 31 is smile/non-smile, 39 for young/old, and 20 for male/female if I'm not wrong :P). This is the flag you need to change to tackle the male attribute in your case.--target_label
refers to which binary category target (e.g. 1 is generating the explanations such that the classifier predicts smile when --query_label=31
). Note that the code filters the images when --target_label=1
or --target_label=0
to select only the images whose label is the opposite of the --target_label
. If --target_label=-1
, the code will generate the explanations for all the images targeting the opposite of the classifier's prediction.Hello,
Thank you very much for your patient answer!But I still have doubts about "--target label". Employing the smile attribute as an illustrative example, my interpretation posits that "target label =1" corresponds to the generation of smiling images, whereas "target label =0" corresponds to the generation of non-smiling images. Is this correct to understand?
Thank you for your help!
Exactly!
Hello
I want to train this repo on my own dataset but I have a problem with "oracle.pth" and "classifier.pt" ... after taking a look at guided-diffusion, I found that "image_train.py" is the same as "celeba_train_diffusion.py" but I couldn't find "classifier_train.py" in this repo to get "classifier.pth". and actually, I couldn't understand "oracle.pth".
Thank you for your help