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
I exported some analysis.h5 files from the SLEAP GUI from a slp file. Attempts to Import, Merge into Project or Open Project all fail to import the HDF5 file appropriately in the SLEAP GUI. While Import... SLEAP analysis HDF5 file works somewhat, the file has all the information it should need to pull the videos and generate the edges of the skeleton, but the GUI asks for the location of the video file and only keypoint positions are populated once the video is located. The other two options fail with a TypeError without an adaptor.
The expected behavior is for the SLEAP GUI to use the information from the analysis.h5 file to create a new SLEAP project file or to be able to merge into an existing SLEAP project and have a full skeleton set up. The keypoints are populated in each frame with a track but without the rest of the skeleton, even though the analysis.h5 file contains edge_inds and edge_names.
From the image below of the analysis.h5 file open in HDFView, all of the file parts are there that should be able to be used to open the file in SLEAP with the full skeleton intact and without having to locate the video file unless the video_path no longer exists. Additionally, users should be able to Merge into Project from HDF5 files if they contain all the information.
C:/Users/psych/SLEAP-Data/Analysis_h5s/Runway_experiment_1.analysis.h5 doesn't match ext for json or json.zip
Traceback (most recent call last):
File "C:\ProgramData\Anaconda2\envs\sleap133\lib\site-packages\sleap\gui\commands.py", line 289, in openProject
self.execute(OpenProject, filename=filename, first_open=first_open)
File "C:\ProgramData\Anaconda2\envs\sleap133\lib\site-packages\sleap\gui\commands.py", line 242, in execute
command().execute(context=self, params=kwargs)
File "C:\ProgramData\Anaconda2\envs\sleap133\lib\site-packages\sleap\gui\commands.py", line 138, in execute
self.do_with_signal(context, params)
File "C:\ProgramData\Anaconda2\envs\sleap133\lib\site-packages\sleap\gui\commands.py", line 162, in do_with_signal
cls.do_action(context, params)
File "C:\ProgramData\Anaconda2\envs\sleap133\lib\site-packages\sleap\gui\commands.py", line 727, in do_action
context.loadProjectFile(filename)
File "C:\ProgramData\Anaconda2\envs\sleap133\lib\site-packages\sleap\gui\commands.py", line 274, in loadProjectFile
self.execute(LoadProjectFile, filename=filename)
File "C:\ProgramData\Anaconda2\envs\sleap133\lib\site-packages\sleap\gui\commands.py", line 242, in execute
command().execute(context=self, params=kwargs)
File "C:\ProgramData\Anaconda2\envs\sleap133\lib\site-packages\sleap\gui\commands.py", line 136, in execute
okay = self.ask(context, params)
File "C:\ProgramData\Anaconda2\envs\sleap133\lib\site-packages\sleap\gui\commands.py", line 698, in ask
labels = Labels.load_file(filename, video_search=gui_video_callback)
File "C:\ProgramData\Anaconda2\envs\sleap133\lib\site-packages\sleap\io\dataset.py", line 1969, in load_file
filename, for_object="labels", video_search=video_search, *args, **kwargs
File "C:\ProgramData\Anaconda2\envs\sleap133\lib\site-packages\sleap\io\format\main.py", line 113, in read
return disp.read(filename, *args, **kwargs)
File "C:\ProgramData\Anaconda2\envs\sleap133\lib\site-packages\sleap\io\format\dispatch.py", line 59, in read
raise TypeError("No file format adaptor could read this file.")
TypeError: No file format adaptor could read this file.
Open Project... above ^
Merge into Project...
Happy SLEAPing! :)
C:/Users/psych/SLEAP-Data/Analysis_h5s/Runway_experiment_1.analysis.h5 doesn't match ext for json or json.zip
Traceback (most recent call last):
File "C:\ProgramData\Anaconda2\envs\sleap133\lib\site-packages\sleap\gui\commands.py", line 606, in mergeProject
self.execute(MergeProject, filenames=filenames)
File "C:\ProgramData\Anaconda2\envs\sleap133\lib\site-packages\sleap\gui\commands.py", line 242, in execute
command().execute(context=self, params=kwargs)
File "C:\ProgramData\Anaconda2\envs\sleap133\lib\site-packages\sleap\gui\commands.py", line 134, in execute
self.ask_and_do(context, params)
File "C:\ProgramData\Anaconda2\envs\sleap133\lib\site-packages\sleap\gui\commands.py", line 2843, in ask_and_do
new_labels = Labels.load_file(filename, video_search=gui_video_callback)
File "C:\ProgramData\Anaconda2\envs\sleap133\lib\site-packages\sleap\io\dataset.py", line 1969, in load_file
filename, for_object="labels", video_search=video_search, *args, **kwargs
File "C:\ProgramData\Anaconda2\envs\sleap133\lib\site-packages\sleap\io\format\main.py", line 113, in read
return disp.read(filename, *args, **kwargs)
File "C:\ProgramData\Anaconda2\envs\sleap133\lib\site-packages\sleap\io\format\dispatch.py", line 59, in read
raise TypeError("No file format adaptor could read this file.")
TypeError: No file format adaptor could read this file.
Screenshots
Image of the HDF5 file contents:
Image of SLEAP asking to find the video even though the HDF5 file contents has the video_path:
Image of the imported HDF5 file with only keypoints showing. While I cannot screen capture it, the setting for Show Edges is enabled with a check mark:
The skeleton shows no symmetry or edges. But the HDF5 file contains the information needed to create the full skeleton from edge_inds, edge_names, and node_names. Currently, it seems that only node_names is utilized.
How to reproduce
Go to 'sleap-label in sleap conda environment...'
Click on 'Import...SLEAP analysis HDF5 or Merge Project... or Open Project...'
Locate the analysis.h5 file.
Either locate the video file from the pop-up GUI prompt or see TypeError traceback in conda-CLI.
See partial skeleton without edges if importing works
The text was updated successfully, but these errors were encountered:
The Open and Merge into project have historically not been intended to be used to handle analysis files. In general, the lack of support around loading in analysis files is because these were intended to be used as the last step of working with SLEAP (once analysis was exported, you would not come back and make changes to the analysis). Although, by this issue and the other related issues, it seems there is some interest in modifying the data in the analysis and then piping the modified data back into SLEAP.
Indeed, using the analysis files to edit mismatched tracks (at least when there should be only one track, but SLEAP created one for the user-labeled instances and a separate one for the predicted instances) is far easier than using the GUI to go through each video to swap them. Cleaning and retracking did not work either, so editing the analysis files was my workaround.
I exported some analysis.h5 files from the SLEAP GUI from a slp file. Attempts to Import, Merge into Project or Open Project all fail to import the HDF5 file appropriately in the SLEAP GUI. While Import... SLEAP analysis HDF5 file works somewhat, the file has all the information it should need to pull the videos and generate the edges of the skeleton, but the GUI asks for the location of the video file and only keypoint positions are populated once the video is located. The other two options fail with a
TypeError
without an adaptor.The expected behavior is for the SLEAP GUI to use the information from the analysis.h5 file to create a new SLEAP project file or to be able to merge into an existing SLEAP project and have a full skeleton set up. The keypoints are populated in each frame with a track but without the rest of the skeleton, even though the analysis.h5 file contains
edge_inds
andedge_names
.From the image below of the analysis.h5 file open in HDFView, all of the file parts are there that should be able to be used to open the file in SLEAP with the full skeleton intact and without having to locate the video file unless the
video_path
no longer exists. Additionally, users should be able to Merge into Project from HDF5 files if they contain all the information.Your personal set up
Windows 10
Version(s): SLEAPv1.3.3, Python 3.7.12
SLEAP installation method (listed here):
Environment packages
Logs
Open Project... above ^
Merge into Project...
Screenshots
Image of the HDF5 file contents:
Image of SLEAP asking to find the video even though the HDF5 file contents has the
video_path
:Image of the imported HDF5 file with only keypoints showing. While I cannot screen capture it, the setting for
Show Edges
is enabled with a check mark:The skeleton shows no symmetry or edges. But the HDF5 file contains the information needed to create the full skeleton from
edge_inds
,edge_names
, andnode_names
. Currently, it seems that onlynode_names
is utilized.How to reproduce
sleap-label
in sleap conda environment...'TypeError
traceback in conda-CLI.The text was updated successfully, but these errors were encountered: