Giter Club home page Giter Club logo

Comments (4)

weijiaheng avatar weijiaheng commented on May 10, 2024 1

Hi

Thanks for the great catching and your detailed post! We have fixed this "double processing" in our latest commit.

Briefly speaking, in the file customize_img_folder.py, we removed the data preprocessing code when transform=None to avoid double preprocessing. In this case, Docta will simply append features by changing each image from <PIL.Image.Image> to the numpy array. Thus, the revised code will process & normalize the image data for only once when transform=None (default value).

Please feel free to let us know if you have any additional concerns!

Best,
Jiaheng

from docta.

zwzhu-d avatar zwzhu-d commented on May 10, 2024 1

Yes, the CIFAR data is not double-processed. The transforms in the CIFAR dataloader are left for future extensions. Thank you for the good catching.

from docta.

bakachan19 avatar bakachan19 commented on May 10, 2024

Hi @weijiaheng.
Thank you for your reply and for helping me clear my doubts.

I also went over again the CIFAR10 preprocessing cause I thought there was the same double processing issue also there.
But I missed the following:

self.feature = self.data

and here self.data is not normalized yet (since the normalization is applied by the dataloader and not by the dataset)
and then it just undergoes the preprocessing of CLIP with:
model_embedding, _, preprocess = open_clip.create_model_and_transforms(self.cfg.embedding_model)
and
CustomizedDataset(..., preprocess = preprocess) in line:

dataset_list += [CustomizedDataset(feature=self.dataset.feature, label=self.dataset.label, preprocess=preprocess)]

Thank you once again for your help.
Have an amazing day.

from docta.

bakachan19 avatar bakachan19 commented on May 10, 2024

Thank you for the clarification @zwzhu-d and @weijiaheng.
It was extremely useful.

from docta.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.