yu-rp / Distribution-Shift-Iverson

Apache License 2.0
40 stars 0 forks source link

Number of epochs #2

Open Mehrdad-Noori opened 1 year ago

Mehrdad-Noori commented 1 year ago

Hi,

Thanks for the good work. I am trying to reproduce your results and I have 2 questions.

Thanks

yu-rp commented 1 year ago

Hi @Mehrdad-Noori ,

Are you referring to the diffusion model or the OoD classifier in your question?

Best

Mehrdad-Noori commented 1 year ago

Thanks for your reply. I was referring to the diffusion models in my question.

yu-rp commented 1 year ago

Hi @Mehrdad-Noori ,

Best

Mehrdad-Noori commented 1 year ago

Thank you very much for your prompt respons. The reason I asked for the fine-tuned models is to reproduce the results of the paper and try to improve them. Actually, I tried to fine-tune a diffusion model on "art_painintg" domain of the PACS dataset for more than 500 epochs using the defualt setting mentiond in your repository. The training results are satisfying and it seems that the DM learned the source distribution very well. But when I run the step 2, "transformation" in the repo, the transofrmed results which are saved as png files are not very good, and it seems that the class of the most of the samples are changed. Some of them are attached here:

sample

I want to make sure that every thing I have done is correct so that I would to be able to continue to the next steps. Maybe I am missing something. In the paper, it is mentioned that this process is iterative and denoising steps of diffusion model countine until certain confidence at the classifier output is reached. In these examples, it seems that there is no iterative process and only some images are saved at this step. I would be gratful if you could also let me know how we can produce these images in an offline form and then use them for the OOD classifier.

yu-rp commented 1 year ago

Hi @Mehrdad-Noori,

If the category isn't well preserved, it suggests that too much noise has been introduced. By lowering the noise level, category information will be better retained. This can be achieved by selecting a smaller starting time index for the diffusion process. Of course, a compromise to consider is that the domain transfer may not be as comprehensive.

As mentioned in our readme, the transformation step only produces images corresponding to various noise levels. The iterative process takes place during the inference phase.

Best

Mehrdad-Noori commented 1 year ago

Thanks. I will use this network for the next step. Currently, I am training an ERM model using DomainBed. So the inference code will not feed these generated images to the OOD classifier and will create some samples during the 'DSI.main' based on the iterative process explained in the paper? Another question is that what should I feed as 'lpcd' to DSI/main.py?

yu-rp commented 1 year ago

Hi @Mehrdad-Noori ,

Best