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
When I run the inference on the same videos prior to the clipchamp editing (still converted with the ffmpeg command above) using the same models from the clipchamp edited training data set, it creates a prediciton.slp file as expected.
When I try to predict on these clipchamp edited videos, SLEAP throws the below error:
raise KeyError(f"Unable to load frame {idx} from {self}.")
KeyError: "Unable to load frame 0 from MediaVideo(filename='only_subjects_brighter_mp4s/11_12_23_24.1_reconverted.mp4', grayscale=False, bgr=True, dataset='', input_format='channels_last')."
OS: Linux
LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: RedHatEnterprise
Description: Red Hat Enterprise Linux release 8.10 (Ootpa)
Release: 8.10
Codename: Ootpa
Video: only_subjects_brighter_mp4s/11_12_23_24.1_reconverted.mp4
2025-05-27 11:12:09.122172: 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: AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2025-05-27 11:12:22.406519: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1525] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 78920 MB memory: -> device: 0, name: NVIDIA A100-SXM4-80GB, pci bus id: 0000:07:00.0, compute capability: 8.0
Traceback (most recent call last):
File "/blue/npadillacoreano/mcum/conda/envs/sleap/bin/sleap-track", line 33, in <module>
sys.exit(load_entry_point('sleap==1.3.3', 'console_scripts', 'sleap-track')())
File "/blue/npadillacoreano/mcum/conda/envs/sleap/lib/python3.7/site-packages/sleap/nn/inference.py", line 5424, in main
labels_pr = predictor.predict(provider)
File "/blue/npadillacoreano/mcum/conda/envs/sleap/lib/python3.7/site-packages/sleap/nn/inference.py", line 526, in predict
self._make_labeled_frames_from_generator(generator, data)
File "/blue/npadillacoreano/mcum/conda/envs/sleap/lib/python3.7/site-packages/sleap/nn/inference.py", line 2633, in _make_labeled_frames_from_generator
for ex in generator:
File "/blue/npadillacoreano/mcum/conda/envs/sleap/lib/python3.7/site-packages/sleap/nn/inference.py", line 449, in _predict_generator
n_total = len(data_provider)
File "/blue/npadillacoreano/mcum/conda/envs/sleap/lib/python3.7/site-packages/sleap/nn/data/providers.py", line 350, in __len__
return len(self.video)
File "/blue/npadillacoreano/mcum/conda/envs/sleap/lib/python3.7/site-packages/sleap/io/video.py", line 1082, in __len__
return self.frames
File "/blue/npadillacoreano/mcum/conda/envs/sleap/lib/python3.7/site-packages/sleap/io/video.py", line 1046, in __getattr__
return getattr(self.backend, item)
File "/blue/npadillacoreano/mcum/conda/envs/sleap/lib/python3.7/site-packages/sleap/io/video.py", line 443, in frames
return int(self.__frames_float)
File "/blue/npadillacoreano/mcum/conda/envs/sleap/lib/python3.7/site-packages/sleap/io/video.py", line 404, in __frames_float
return self.__reader.get(cv2.CAP_PROP_FRAME_COUNT)
File "/blue/npadillacoreano/mcum/conda/envs/sleap/lib/python3.7/site-packages/sleap/io/video.py", line 396, in __reader
np.alltrue(self.test_frame[..., 0] == self.test_frame[..., -1])
File "/blue/npadillacoreano/mcum/conda/envs/sleap/lib/python3.7/site-packages/sleap/io/video.py", line 411, in test_frame
self._test_frame_ = self.get_frame(0, grayscale=False)
File "/blue/npadillacoreano/mcum/conda/envs/sleap/lib/python3.7/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 0 from MediaVideo(filename='only_subjects_brighter_mp4s/11_12_23_24.1_reconverted.mp4', grayscale=False, bgr=True, dataset='', input_format='channels_last')."
The model seems fine but the video only_subjects_brighter_mp4s/11_12_23_24.1_reconverted.mp4 has a corrupted frame (frame index 0). Since you have the original videos, I would make some copies of them, then try editing them again or using another software.
Hello, I am having some issues with running inferences on some of my videos.
I used microsoft clipchamp to brighten some of my videos, and then used the ffmpeg command listed on the sleap.ai website copied below.
The labeled frames from the edited videos (saved in a pkg.slp format) trained a model with no errors.
However these new videos will not be predicted on when I run sleap-track using the following command in a bash terminal:
When I run the inference on the same videos prior to the clipchamp editing (still converted with the ffmpeg command above) using the same models from the clipchamp edited training data set, it creates a prediciton.slp file as expected.
When I try to predict on these clipchamp edited videos, SLEAP throws the below error:
LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: RedHatEnterprise
Description: Red Hat Enterprise Linux release 8.10 (Ootpa)
Release: 8.10
Codename: Ootpa
Environment packages
Logs
error-logsleap-diagnostic
The text was updated successfully, but these errors were encountered: