Git Product home page Git Product logo

Comments (9)

yassouali avatar yassouali commented on September 12, 2024

Hi,

Are you talking generally or for a specific dataset ?
If you want to add you dataset, just create a new loader in dataloader/, the new class inherits from base_loader and you only need to implement _set_files (setting the paths of the images and the labels) and _load_data (where you load a specific pair of image / label depending on the argument passes), the data directory is up to you, check the examples of the implemented loaders.

For one of the four datasets, in read me I've detailed the files you'll need, if you have any more questions about a specific dataset, I can detail its files.

from pytorch-segmentation.

starkcn avatar starkcn commented on September 12, 2024

from pytorch-segmentation.

yassouali avatar yassouali commented on September 12, 2024

It is up to you how you load you dataset, for creating a loader you have two ways of doing things, creating a loader that takes an argument split (val and train), and then you create two dataloaders, one for each split, this is the way the provided datasets are implemented. Or you can only create one dataloader and then pass the argument val_split and this way, you'll get a train loader and a also the val loader (calling get_val_loader). Take a look into base_loader.py and base_datasets.py and one of the example loaders to see how this is implemented.

All in all, first is to create your dataloader, by implementing two functions _set_files and _load_data

from pytorch-segmentation.

starkcn avatar starkcn commented on September 12, 2024

i see,but i dont know the role of voc.txt、voc_context_classes-400.txt、voc_context_classes-59.txt.

from pytorch-segmentation.

yassouali avatar yassouali commented on September 12, 2024

Oh, you can just ignore them, they're not used, they only map the class indices to the class name for each dataset, can be somewhat useful when debugging or you'd like to know the class predicted.

from pytorch-segmentation.

starkcn avatar starkcn commented on September 12, 2024

your mean is,if i use this model to test my data,it will show me the label represented by the color.

from pytorch-segmentation.

yassouali avatar yassouali commented on September 12, 2024

Not really no, those files are not used at all, for the color palettes, their defined in utils/palette.py.

from pytorch-segmentation.

starkcn avatar starkcn commented on September 12, 2024

i see,thanks a lot!

from pytorch-segmentation.

soans1994 avatar soans1994 commented on September 12, 2024

@yassouali

sorry for reopening the issue, but i searched the closed issues regarding the custom dataloader. I am creating custom dataloader for camvid dataset like your voc loader implementation. i have the raw image and segment maps in png. The train, train_val, val, test texts must be created? what is the difference between train_val and val?

edit: i get error for created dataloader as
return getattr(module, config[name]['type'])(*args, **config[name]['args'])
AttributeError: module 'dataloaders' has no attribute 'camvid'

thank you

from pytorch-segmentation.

Related Issues (20)

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.