Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssertionError when running run_test.py with DSEC-Detection dataset #8

Open
trexob1t opened this issue Aug 13, 2024 · 3 comments
Open

Comments

@trexob1t
Copy link

trexob1t commented Aug 13, 2024

When attempting to run the run_test.py script, an AssertionError is encountered. I followed the guidelines provided in the DSEC-Detection to download, so I am uncertain why this error is occurring.

Command executed

CUDA_VISIBLE_DEVICES=$DEVICE python scripts/run_test.py --config config/dagr-s-dsec.yaml --use_image --img_net resnet50 --checkpoint data/dagr_s_50.pth --batch_size 4 --dataset_directory $DSEC_ROOT --output_directory $LOG_DIR

Error message

  File "scripts/run_test.py", line 67, in <module>
    metrics = run_test_with_visualization(test_loader, ema.ema, dataset=args.dataset)
  File "/dagr/dagr/src/dagr/utils/testing.py", line 28, in run_test_with_visualization
    for i, data in enumerate(tqdm.tqdm(loader, desc=f"Testing {name}")):
  File "/miniconda3/envs/dagr/lib/python3.8/site-packages/tqdm/std.py", line 1181, in __iter__
    for obj in iterable:
  File "/miniconda3/envs/dagr/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 631, in __next__
    data = self._next_data()
  File "/miniconda3/envs/dagr/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 675, in _next_data
    data = self._dataset_fetcher.fetch(index)  # may raise StopIteration
  File "/miniconda3/envs/dagr/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/miniconda3/envs/dagr/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 51, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/dagr/dagr/src/dagr/data/dsec_data.py", line 144, in __getitem__
    detections_1 = self.dataset.get_tracks(image_index_1, mask=track_masks, directory_name=dataset.root.name)
  File "/dagr/dagr/libs/dsec-det/src/dsec_det/dataset.py", line 110, in get_tracks
    i_0, i_1 = self.get_index_window(index, len(img_idx_to_track_idx), sync=self.sync)
  File "/dagr/dagr/libs/dsec-det/src/dsec_det/dataset.py", line 101, in get_index_window
    assert 0 <= index < num_idx - 1
AssertionError
@trexob1t trexob1t changed the title Problems running the run_test.py AssertionError when running run_test.py with DSEC-Detection dataset Aug 13, 2024
@youkangGG
Copy link

Same error on my machine :(

@lpyQaQ
Copy link

lpyQaQ commented Sep 28, 2024

I can run "run_test.py" successfully. However, I meet the same error when I try to run "count_flops.py".
Have you solve this problem?

@trexob1t
Copy link
Author

@lpyQaQ unfortunately, I haven’t solved the problem. Since I only needed an event-based detection model, I switched to AEGNN, which worked out of the box for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants