Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

ImagetNet Training Dataset Preprocessing #156

Open
StephenYangjz opened this issue Dec 1, 2024 · 6 comments
Open

ImagetNet Training Dataset Preprocessing #156

StephenYangjz opened this issue Dec 1, 2024 · 6 comments

Comments

@StephenYangjz
Copy link

Hi, I am trying to train the dc-ae using the default setup (imagenet). I saw that imagenet here is being loaded as a npy file:


class LatentImageNetDataProvider(BaseDataProvider):
    def __init__(self, cfg: LatentImageNetDataProviderConfig):
        super().__init__(cfg)
        self.cfg: LatentImageNetDataProviderConfig

    def build_datasets(self) -> tuple[Dataset, Optional[Dataset], Optional[Dataset]]:
        train_dataset = DatasetFolder(self.cfg.data_dir, np.load, [".npy"])
        return train_dataset, None, None

I am wondering how is this file prepared and would it be possible to share a minimal working example of the file? Thank you!

@chenjy2003
Copy link
Collaborator

Hi Stephen,

You can refer to the readme here to extract latent data.

- Generate and save latent:

@StephenYangjz
Copy link
Author

Hi @chenjy2003 thank you so much for the response. Would there be a easy way to fine-tune the autoencoder as well? I am thinking of training a dc-ae on the RUGD dataset, and im not sure if the pretrained autoencoder would work out of the box. Do you by any chance have any insights? Any pointers would be greatly appreciated! Thank you.

@chenjy2003
Copy link
Collaborator

Hi Stephen,

We tried some images from the RUGD dataset and observed that our autoencoders worked well. Here are some examples. The left part is the original image and the right part is the reconstructed image. You can also use this script to test other images.

creek_00001
park-1_00001
trail_00001
village_00003

@StephenYangjz
Copy link
Author

StephenYangjz commented Dec 4, 2024

Thank you so much for getting back @chenjy2003! May I also know what would be the command for finetuning a DiT w/ the pretrained autoencoder, from the imagenet pretrained DiT presented in the paper? I think the readme has the command only for the uvit but not the DiT. Thank you!

@han-cai
Copy link
Contributor

han-cai commented Dec 4, 2024

That's a good point. @chenjy2003, we should add the command to train DiT-XL on ImageNet 512x512.

@chenjy2003
Copy link
Collaborator

@StephenYangjz Thanks for your suggestion.

The training command for DiT-XL on ImageNet 512x512 is added here and here.

If you want to finetune from the imagenet pretrained checkpoint, you can add dit.pretrained_path=... to the command.

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

No branches or pull requests

3 participants