thuml / Transfer-Learning-Library

Transfer Learning Library for Domain Adaptation, Task Adaptation, and Domain Generalization
http://transfer.thuml.ai
MIT License
3.39k stars 553 forks source link

Training the custom dataset using ImageList #238

Closed Nurungyi closed 4 months ago

Nurungyi commented 1 year ago

You gave the guideline for using custom dataset using ImageList like below

CLASStllib.vision.datasets.imagelist.ImageList(root, classes, data_list_file, transform=None, target_transform=None)

Regarding this, how can I train the datasets of two scenarios?

one is: source data (all labelled), target data (all unlabelled)

-> I am not sure about wether the below is correct format or not, source_dir/dog_xxx.png 0 source_dir/cat_123.png 1 target_dir/dog_xxy.png target_dir/cat_nsdf3.png

another is: source data (all labelled), target data (half labelled, and harf unabelled)

-> I am not sure about wether the below is correct format or not, source_dir/dog_xxx.png 0 source_dir/cat_123.png 1 target_dir/dog_xxy.png 0 target_dir/cat_nsdf3.png

Can you give me the guideline about training the customdataset using ImageList?

thucbx99 commented 4 months ago

You can download the office31 dataset to see if your local structure matches it. To download the office31 dataset, you can just run some method such as DANN on it. And our code will automatically download it for you.