Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Lack of image normalization in DiffusionPolicy #48

Open
hesic73 opened this issue Apr 13, 2024 · 3 comments
Open

Lack of image normalization in DiffusionPolicy #48

hesic73 opened this issue Apr 13, 2024 · 3 comments

Comments

@hesic73
Copy link

hesic73 commented Apr 13, 2024

In policy.py, image normalization is applied in both ACTPolicy and CNNMLPPolicy as follows:

        normalize = transforms.Normalize(mean=[0.485, 0.456, 0.406],
                                         std=[0.229, 0.224, 0.225])
        image = normalize(image)

However, this normalization step is missing in DiffusionPolicy. Is this omission intentional? Could you clarify the reasoning behind this difference?

@woltium
Copy link

woltium commented Jul 10, 2024

In policy.py, image normalization is applied in both ACTPolicy and CNNMLPPolicy as follows:

        normalize = transforms.Normalize(mean=[0.485, 0.456, 0.406],
                                         std=[0.229, 0.224, 0.225])
        image = normalize(image)

However, this normalization step is missing in DiffusionPolicy. Is this omission intentional? Could you clarify the reasoning behind this difference?

@hesic73 same question,and whether the normalization is added or not, the final eval performance of Diffusion policy is poor,arms keeps shaking and can't complete the task. Have you solved this problem?

@QueirosJustin
Copy link

@woltium Hello, How did Diffusion Policy even run for you? Even after following all the instructions I get an error until I turn off ENABLE_EMA = True in policy.py to false. Once I do this though, I receive " raise _control.PhysicsError(message)
dm_control.rl.control.PhysicsError: Physics state is invalid. Warning(s) raised: mjWARN_BADQACC" everytime during the first evaluation. For ACT everything is working fine for me. I would appreciate an answer a lot.

@QueirosJustin
Copy link

@woltium I used this command: python3 imitate_episodes.py --task_name sim_transfer_cube_scripted --ckpt_dir /home/Desktop/learning --policy_class Diffusion --chunk_size 32 --batch_size 32 --lr 1e-5 --seed 0 --num_steps 100000 --eval_every 2000 --validate_every 2000 --save_every 2000

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants