talmolab / sleap

A deep learning framework for multi-animal pose tracking.
https://sleap.ai
Other
436 stars 97 forks source link

sleap inference not executing on one of 12 video files due to error to load specific frame of video #2030

Open tbashaw712 opened 1 day ago

tbashaw712 commented 1 day ago

Bug description

sleap inference not executing on one of 12 video files due to error to load specific frame of video (2nd to last frame in video) ## Expected behaviour with other videos of the same type, this works fine ## Actual behaviour

Your personal set up

Device name Manakin Processor AMD Ryzen Threadripper PRO 5945WX 12-Cores 4.10 GHz Installed RAM 32.0 GB (31.9 GB usable) Device ID 5450F73A-1918-4B75-8A22-0DA137F52DD5 Product ID 00355-60717-55677-AAOEM System type 64-bit operating system, x64-based processor

conda from package

Environment packages ``` # paste output of `pip freeze` or `conda list` here ```
Logs Command line call: sleap-track C:/Users/Eric/Desktop/NOVEL OBJECT/sleap analysis/multibird_labels.v002.slp --video.index 12 --frames 0 -m C:/Users/Eric/Desktop/NOVEL OBJECT/sleap analysis\models\10birds_1000frames241121_142415.single_instance.n=1000\training_config.json --tracking.tracker none -o C:/Users/Eric/Desktop/NOVEL OBJECT/sleap analysis\predictions\multibird_labels.v002.slp.241121_153617.predictions.slp --verbosity json --no-empty-frames Started inference at: 2024-11-21 15:36:21.958242 Args: { 'data_path': 'C:/Users/Eric/Desktop/NOVEL OBJECT/sleap analysis/multibird_labels.v002.slp', 'models': [ 'C:/Users/Eric/Desktop/NOVEL OBJECT/sleap analysis\\models\\10birds_1000frames241121_142415.single_instance.n=1000\\training_config.json' ], 'frames': '0', 'only_labeled_frames': False, 'only_suggested_frames': False, 'output': 'C:/Users/Eric/Desktop/NOVEL OBJECT/sleap analysis\\predictions\\multibird_labels.v002.slp.241121_153617.predictions.slp', 'no_empty_frames': True, 'verbosity': 'json', 'video.dataset': None, 'video.input_format': 'channels_last', 'video.index': '12', 'cpu': False, 'first_gpu': False, 2024-11-21 15:36:23.087040: I tensorflow/core/platform/cpu_feature_guard.cc:151] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX AVX2 To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 'last_gpu': False, 'gpu': 'auto', 'max_edge_length_ratio': 0.25, 'dist_penalty_weight': 1.0, 'batch_size': 4, 'open_in_gui': False, 2024-11-21 15:36:23.462231: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1525] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 6038 MB memory: -> device: 0, name: NVIDIA T1000 8GB, pci bus id: 0000:61:00.0, compute capability: 7.5 'peak_threshold': 0.2, 'max_instances': None, 'tracking.tracker': 'none', 'tracking.max_tracking': None, 'tracking.max_tracks': None, 'tracking.target_instance_count': None, Traceback (most recent call last): File "C:\Users\Eric\anaconda3\envs\sleap\Scripts\sleap-track-script.py", line 33, in sys.exit(load_entry_point('sleap==1.3.3', 'console_scripts', 'sleap-track')()) File "C:\Users\Eric\anaconda3\envs\sleap\lib\site-packages\sleap\nn\inference.py", line 5424, in main labels_pr = predictor.predict(provider) File "C:\Users\Eric\anaconda3\envs\sleap\lib\site-packages\sleap\nn\inference.py", line 526, in predict self._make_labeled_frames_from_generator(generator, data) File "C:\Users\Eric\anaconda3\envs\sleap\lib\site-packages\sleap\nn\inference.py", line 1583, in _make_labeled_frames_from_generator for ex in generator: File "C:\Users\Eric\anaconda3\envs\sleap\lib\site-packages\sleap\nn\inference.py", line 455, in _predict_generator for ex in self.pipeline.make_dataset(): File "C:\Users\Eric\anaconda3\envs\sleap\lib\site-packages\sleap\nn\data\pipelines.py", line 282, in make_dataset ds = self.providers[0].make_dataset() File "C:\Users\Eric\anaconda3\envs\sleap\lib\site-packages\sleap\nn\data\providers.py", line 398, in make_dataset self.video.get_frame(self.video.last_frame_idx) File "C:\Users\Eric\anaconda3\envs\sleap\lib\site-packages\sleap\io\video.py", line 1104, in get_frame return self.backend.get_frame(idx) File "C:\Users\Eric\anaconda3\envs\sleap\lib\site-packages\sleap\io\video.py", line 496, in get_frame raise KeyError(f"Unable to load frame {idx} from {self}.") **KeyError: "Unable to load frame 109139 from MediaVideo(filename='C:/Users/Eric/Desktop/NOVEL OBJECT/novel object data/rd2bu70/video/rd2bu70_hr1_novelseedcup.mp4', grayscale=False, bgr=True, dataset='', input_format='')."** 'tracking.pre_cull_to_target': None, 'tracking.pre_cull_iou_threshold': None, 'tracking.post_connect_single_breaks': None, 'tracking.clean_instance_count': None, 'tracking.clean_iou_threshold': None, 'tracking.similarity': None, 'tracking.match': None, 'tracking.robust': None, Process return code: 1 ``` # paste relevant logs here, if any ```

Screenshots

How to reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error