You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's a great job. But I got an error when running scripts/visualize_detections.py. I don't know if the code version needs to be updated.
Traceback (most recent call last):
File "scripts/visualize_detections.py", line 8, in <module>
from dsec_det.io import extract_from_h5_by_timewindow, extract_image_by_index, load_start_and_end_time
ImportError: cannot import name 'extract_image_by_index' from 'dsec_det.io' (/workspace/jb/dagr/libs/dsec-det/src/dsec_det/io.py)
The text was updated successfully, but these errors were encountered:
Same problem here. I tried to implement the missing functions as below for your reference. (Note that i only tested on the sample data and the function may be wrong)
in io.py:
defextract_image_by_index(image_list, idx):
# use cv2 to read and return imagereturncv2.imread(str(image_list[idx]))
defload_start_and_end_time(dsec_directory):
withh5py.File(str(dsec_directory.events.event_file), 'r') ash5f:
t_offset=h5f['t_offset'][()]
t=h5f['events/t']
returnt[0] +t_offset, t[-1] +t_offset
It's a great job. But I got an error when running scripts/visualize_detections.py. I don't know if the code version needs to be updated.
The text was updated successfully, but these errors were encountered: