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 · 6 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.

@Hatins
Copy link

Hatins commented Oct 16, 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?

Hi, I'd like to ask you which model (ResNet18/Resnet50) do you test? and if you have got the same results provided in the paper?

@lpyQaQ
Copy link

lpyQaQ commented Oct 16, 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?

Hi, I'd like to ask you which model (ResNet18/Resnet50) do you test? and if you have got the same results provided in the paper?

I tested resnet50. And I got results as below.
屏幕截图 2024-10-16 214030

@Hatins
Copy link

Hatins commented Oct 17, 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?

Hi, I'd like to ask you which model (ResNet18/Resnet50) do you test? and if you have got the same results provided in the paper?

I tested resnet50. And I got results as below. 屏幕截图 2024-10-16 214030

Hi, @lpyQaQ , very thanks for your ripid reply, but it seems that the results are much lower than the results in the paper?

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

4 participants