Skip to content

Strength-controllable Diffusion Anomaly Synthesis 問題 #105

@01fpcrd

Description

@01fpcrd

我想自己訓練自己的資料集
參考github上的教學,我已經跑完diffusion model,guided classifier
但我進行Strength-controllable Diffusion Anomaly Synthesis時
程式可以正常執行完成
torchrun --nproc_per_node=1 sample.py
sample wheel: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████| 16/16 [03:37<00:00, 13.60s/it]
[rank0]:[W1205 18:00:08.749365132 ProcessGroupNCCL.cpp:1553] Warning: WARNING: destroy_process_group() was not called before program exit, which can leak resources. For more info, please see https://pytorch.org/docs/stable/distributed.html#shutdown (function operator())

但我去查看我程式執行的結果,會是一張雜訊的照片(參考MVTec-AD/sdas/的結果,應該是正常的照片)
想請問這是哪裡有問題?

Image

我的diffusion model,guided classifier跑出來的checkpoint副檔名都是.pth.tar
我有修改sample.yaml的內容
如:pertrain_path: experiments/DATA/wheel_diffusion_checkpoints/ckpt_1000.pth.tar
pertrain_path: experiments/DATA/wheel_classifier_checkpoints/ckpt_1000.pth.tar

這是我執行train_diffusion.py結果,請問這樣是對的嗎?
Image

這是我執行train_classifier.py結果,請問這樣是對的嗎?

Image

I want to train my own dataset.
Following the instructions on the GitHub repository, I have already completed the diffusion model and guided classifier training steps.

However, when I run Strength-controllable Diffusion Anomaly Synthesis using::torchrun --nproc_per_node=1 sample.py

the program finishes without any errors:

sample wheel: 100%|███████████████████████████████████████████| 16/16 [03:37<00:00, 13.60s/it]
[rank0]:[W1205 18:00:08.749365132 ProcessGroupNCCL.cpp:1553] Warning: WARNING: destroy_process_group() was not called before program exit...

But the output images are ust noisy images
(According to the reference output in MVTec-AD/sdas/, they should be normal-looking images instead of pure noise.)

I would like to know what might be causing this issue.

My diffusion model and classifier checkpoints were saved as .pth.tar
So I modified my sample.yaml accordingly, for example:

like:
pertrain_path: experiments/DATA/wheel_diffusion_checkpoints/ckpt_1000.pth.tar
pertrain_path: experiments/DATA/wheel_classifier_checkpoints/ckpt_1000.pth.tar

Here are the results from running train_diffusion.py. Is this correct?
Image

Here are the results from running train_classifier.py. Is this correct?"

Image

Is this the correct way to load these checkpoints, or could this be the reason why my results become noise?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions