Code Monkey home page Code Monkey logo

zeroflow's People

Contributors

kylevedder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

zeroflow's Issues

Got num_samples=0 error when trying to train the model

Thank you for your work.

Following the README and GETTING_STARTED document, I created the train and val supervision labels, and my dataset folder structure follows this:

|-argoverse2
    |-train
    |-train_sceneflow
    |-test
    |-val
    |-val_sceneflow

I mounted the folder to the container correctly as shown below:

root@Max-laptop-debian:/efs# ls
argoverse2
root@Max-laptop-debian:/efs# cd argoverse2/
root@Max-laptop-debian:/efs/argoverse2# ls
test  train  train_sceneflow  val  val_sceneflow

However, when I try to train the model using

python train_pl.py ./configs/fastflow3d/argo/nsfp_distilatation_speed_scaled_updated.py

I always got the num_samples=0 error below

Traceback (most recent call last):
  File "/project/train_pl.py", line 189, in <module>
    main()
  File "/project/train_pl.py", line 146, in main
    train_dataloader = make_train_dataloader(cfg)
  File "/project/train_pl.py", line 68, in make_train_dataloader
    return torch.utils.data.DataLoader(train_dataset,
  File "/miniconda/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 353, in __init__
    sampler = RandomSampler(dataset, generator=generator)  # type: ignore[arg-type]
  File "/miniconda/lib/python3.10/site-packages/torch/utils/data/sampler.py", line 107, in __init__
    raise ValueError("num_samples should be a positive integer "
ValueError: num_samples should be a positive integer value, but got num_samples=0

The paths inside nsfp_distilatation_speed_scaled_updated.py are:

train_sequence_dir = "/efs/argoverse2/train/"
train_flow_dir = "/efs/argoverse2/train_sceneflow/"

test_sequence_dir = "/efs/argoverse2/val/"
test_flow_dir = "/efs/argoverse2/val_sceneflow/"

I believe the problem is that the train path in the config file is incorrect. However, I am unable to find additional information in the document to solve my question. Would you mind pointing out what's wrong with it?

Questions on supervised traning part code and performance

Thanks for your work and open source,

When I read the code following, I'm wondering why set a assert here for z index must be 0? since Voxelization is 3D, z should not be 0?

def forward_single(self, before_pseudoimage: torch.Tensor,
after_pseudoimage: torch.Tensor,
point_offsets: torch.Tensor,
voxel_coords: torch.Tensor) -> torch.Tensor:
voxel_coords = voxel_coords.long()
assert (voxel_coords[:, 0] == 0).all(), "Z index must be 0"
# Voxel coords are Z, Y, X, and the pseudoimage is Channel, Y, X
# I have confirmed via visualization that these coordinates are correct.
after_voxel_vectors = after_pseudoimage[:, voxel_coords[:, 1],
voxel_coords[:, 2]].T
before_voxel_vectors = before_pseudoimage[:, voxel_coords[:, 1],
voxel_coords[:, 2]].T
concatenated_vectors = torch.cat(
[before_voxel_vectors, after_voxel_vectors, point_offsets], dim=1)
flow = self.decoder(concatenated_vectors)
return flow

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.