Giter VIP home page Giter VIP logo

Comments (9)

yuxumin avatar yuxumin commented on August 25, 2024 2

@JANEKKO Hi,
First, create a dataset class for your own data in the form of ShapeNet-55 dataset class here, if you align the output for __getitem__ function with other dataset in this repo, you can save the time to modify the code in runner.py.
The config file for dataset class should be define in the cfgs/dataset_configs. For example, ShapeNet55_meta_config. It will be loaded and used when initialize the dataset class if you specify the _base_ in model config, like PoinTr_on_ShapeNet55.

Second, you can create a model config folder. For example. a config folder for ShapeNet55 here. And put the meta config for PoinTr into this folder. (Do not forget to modify the dataset config in this yaml file)

Last, you can test the pretrain PoinTr by change the config file to the newly create one.

from pointr.

yuxumin avatar yuxumin commented on August 25, 2024 1

@blukaz Have you initialized your dataset class in the `datatsets/__init__.py'? For example, here

from pointr.

blukaz avatar blukaz commented on August 25, 2024 1

Here is are some additional steps for others who are trying to train the PoinTr model on their own (custom) dataset:

  • add this line in the ".datasets/init.py" script: import datasets.CUSTOMDATASETNAME
  • add the support for your dataset in the ".tools/runner.py" script: take a look at line 82 (def run_net) and line 178 (def validate) in the code
  • optional: if you need support for ".ply" files then you have to add this in ".datasets/io.py" script
  • important: don't forget to center and normalize your point cloud data

from pointr.

JANEKKO avatar JANEKKO commented on August 25, 2024

from pointr.

yuxumin avatar yuxumin commented on August 25, 2024

@JANEKKO feel free to reopen the issue if you find something difficult to cope with.

from pointr.

blukaz avatar blukaz commented on August 25, 2024

Hi yuxumin,

Thanks for the insights, but I get the following error:
Traceback (most recent call last): File "main.py", line 68, in <module> main() File "main.py", line 64, in main run_net(args, config, train_writer, val_writer) File "/content/drive/MyDrive/ColabNotebooks/PoinTr_setup/PoinTr/tools/runner.py", line 17, in run_net (train_sampler, train_dataloader), (_, test_dataloader) = builder.dataset_builder(args, config.dataset.train), \ File "/content/drive/MyDrive/ColabNotebooks/PoinTr_setup/PoinTr/tools/builder.py", line 14, in dataset_builder dataset = build_dataset_from_cfg(config._base_, config.others) File "/content/drive/MyDrive/ColabNotebooks/PoinTr_setup/PoinTr/datasets/build.py", line 16, in build_dataset_from_cfg return DATASETS.build(cfg, default_args = default_args) File "/content/drive/MyDrive/ColabNotebooks/PoinTr_setup/PoinTr/utils/registry.py", line 148, in build return self.build_func(*args, **kwargs, registry=self) File "/content/drive/MyDrive/ColabNotebooks/PoinTr_setup/PoinTr/utils/registry.py", line 282, in build_from_cfg f'{obj_type} is not in the {registry.name} registry') KeyError: 'SIW is not in the dataset registry'

It seems that my custom dataset doesn't get loaded into the registry:
Registry(name=dataset, items={'KITTI': <class 'datasets.KITTIDataset.KITTI'>, 'PCN': <class 'datasets.PCNDataset.PCN'>, 'ShapeNet': <class 'datasets.ShapeNet55Dataset.ShapeNet'>})

I tried to debug it in the registry.py script, but I couldn't figure out what the problem is. In line 270 it merges the new config successfully and then gets kicked out at 278.

Note: I've added the dataset config file, model config file and the python script in the datasets folder.

Thanks in advance!

from pointr.

blukaz avatar blukaz commented on August 25, 2024

@yuxumin Thanks! That did the job

from pointr.

zura-false avatar zura-false commented on August 25, 2024

Here is are some additional steps for others who are trying to train the PoinTr model on their own (custom) dataset:

  • add this line in the ".datasets/init.py" script: import datasets.CUSTOMDATASETNAME
  • add the support for your dataset in the ".tools/runner.py" script: take a look at line 82 (def run_net) and line 178 (def validate) in the code
  • optional: if you need support for ".ply" files then you have to add this in ".datasets/io.py" script
  • important: don't forget to center and normalize your point cloud data

Excuse me, have you tried training this model on a dataset of large outdoor buildings

from pointr.

JANEKKO avatar JANEKKO commented on August 25, 2024

from pointr.

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.