samiarja / ev_deep_motion_segmentation

Motion Segmentation for Neuromorphic Aerial Surveillance
https://samiarja.github.io/evairborne/
GNU Lesser General Public License v2.1
6 stars 0 forks source link

Error when running python main_fast_single_object.py #1

Open angelsb008 opened 4 months ago

angelsb008 commented 4 months ago

Hello! I have a trouble, when I tried run python main_fast_single_object.py with the default config, appear the next issue:

Generating masks for input video 100%|███████████████████████████████████████████████████████████████████████████████████| 53/53 [00:02<00:00, 19.18it/s] Running test-time adaptation to enhance flow-predicted masks Traceback (most recent call last): File "/home/angel/ev_deep_motion_segmentation/dino/eval_adaptation.py", line 31, in <module> import vision_transformer as vits File "/home/angel/ev_deep_motion_segmentation/dino/vision_transformer.py", line 24, in <module> from .utils import trunc_normal_ ImportError: attempted relative import with no known parent package Execution time for DMR: 1048.8221645355225 ms Overlay test-time adaptation masks on original images 98%|█████████████████████████████████████████████████████████████████████████████████▍ | 52/53 [00:02<00:00, 19.68it/s] Traceback (most recent call last): File "/home/angel/ev_deep_motion_segmentation/main_fast_single_object.py", line 279, in <module> input_image = Image.open(input_image_path) File "/home/angel/miniconda3/envs/ev_motion_segmentation/lib/python3.9/site-packages/PIL/Image.py", line 3431, in open fp = builtins.open(filename, "rb") FileNotFoundError: [Errno 2] No such file or directory: '/home/angel/ev_deep_motion_segmentation/output/EED_what_is_background/input_frames/EED_what_is_background_test_time_adapt.gif'

I tried fixed it, but I can't. This issue only happens with the default dataset: EED_what_is_background_events.es, because I can't run the main.py with another dataset. Also, how can I see the content of '.es' file?

I hope you can help me.

Thanks!

samiarja commented 2 weeks ago

Apologies for the late response. I just saw your issue.

I tested the script, and it runs smoothly on my end without any errors. It appears that your code is trying to access the file "input_frames/EED_what_is_background_test_time_adapt.gif" from the wrong directory, which shouldn't happen. This GIF file should be saved in the "tt_adapt" folder instead of "input_frames".

If you have moved any files within "output/EED_what_is_background", the simplest fix is to delete this folder and re-run the code. Alternatively, if you have modified any directories within the code, please refer back to the original implementation.

To view the contents of a .es file, you can access the event coordinates, polarities, and timestamps using the read_es_file function as follows: width, height, events = event_warping.read_es_file(f"./Dataset/{data}/{data}_{seq}_events.es")

Hope this helps