sleap-convert currently does not support converting from .slp to .h5 back to .slp
Bug description
Hello, I am currently working in a pipeline with not the best quality videos so there is a lot of proofreading needed. Currently the most efficient way to fix these issues is to convert the .slp file to an analysis .h5 file. However we would like to convert back to a slp file to be able to do a final proofreading of the tracking. When converting back to a slp file there are a number of issues that come up.
- the prediction scores are all set to 1.0 for all frames.
- all previously hand labeled frames are lost. Everything is assumed to be a predicted instance.
- the skeleton is not transferred over so the edges are lost (not a huge deal mostly cosmetic)
Expected behaviour
No loss in information converting between files would be super helpful. I dont know if it is possible to have a separate export --format option in the sleap-convert command that would retain relevant information.
Your personal set up
- OS: ubuntu 22.04
- Version(s): v1.2.8
- SLEAP installation method (listed here):
- [ x] Conda from package
- [ ] Conda from source
- [ ] pip package
- [ ] M1 Macs
Environment packages
# paste output of `pip freeze` or `conda list` here
absl-py==0.15.0 astunparse==1.6.3 attrs==21.2.0 backports.zoneinfo==0.2.1 cached-property @ file:///home/conda/feedstock_root/build_artifacts/cached_property_1615209429212/work cachetools==4.2.4 cattrs==1.1.1 certifi==2021.10.8 charset-normalizer==2.0.12 clang==5.0 colorama==0.4.5 commonmark==0.9.1 cycler==0.11.0 efficientnet==1.0.0 flatbuffers==1.12 fonttools==4.37.1 gast==0.4.0 google-auth==1.35.0 google-auth-oauthlib==0.4.6 google-pasta==0.2.0 grpcio==1.44.0 h5py @ file:///home/conda/feedstock_root/build_artifacts/h5py_1604753641401/work hdmf==3.4.2 idna==3.3 image-classifiers==1.0.0 imageio==2.15.0 imgaug==0.4.0 imgstore==0.2.9 importlib-metadata==4.11.1 importlib-resources==5.9.0 joblib==1.1.0 jsmin==3.0.1 jsonpickle==1.2 jsonschema==4.16.0 keras==2.6.0 Keras-Applications==1.0.8 Keras-Preprocessing==1.1.2 kiwisolver==1.4.4 Markdown==3.3.6 matplotlib==3.5.3 ndx-pose==0.1.1 networkx==2.6.3 numpy @ file:///home/conda/feedstock_root/build_artifacts/numpy_1649281349439/work oauthlib==3.2.0 olefile @ file:///home/conda/feedstock_root/build_artifacts/olefile_1602866521163/work opencv-python @ git+https://github.com/talmolab/wrap_opencv-python-headless.git@ede49f6a23a73033216339f29515e59d594ba921 opencv-python-headless==4.5.5.62 opt-einsum==3.3.0 packaging @ file:///home/conda/feedstock_root/build_artifacts/packaging_1637239678211/work pandas==1.3.5 Pillow @ file:///home/conda/feedstock_root/build_artifacts/pillow_1636558793805/work pkgutil_resolve_name==1.3.10 protobuf==3.19.4 psutil==5.9.2 pyasn1==0.4.8 pyasn1-modules==0.2.8 Pygments==2.13.0 pykalman==0.9.5 pynwb==2.1.0 pyparsing @ file:///home/conda/feedstock_root/build_artifacts/pyparsing_1652235407899/work pyrsistent==0.18.1 PySide2==5.14.1 python-dateutil @ file:///home/conda/feedstock_root/build_artifacts/python-dateutil_1626286286081/work python-rapidjson==1.8 pytz @ file:///home/conda/feedstock_root/build_artifacts/pytz_1666198565857/work pytz-deprecation-shim==0.1.0.post0 PyWavelets==1.3.0 PyYAML==6.0 pyzmq==23.2.1 qimage2ndarray==1.9.0 QtPy @ file:///home/conda/feedstock_root/build_artifacts/qtpy_1664834420615/work requests==2.27.1 requests-oauthlib==1.3.1 rich==10.16.1 rsa==4.8 ruamel.yaml==0.17.21 ruamel.yaml.clib==0.2.6 scikit-image==0.19.3 scikit-learn==1.0.2 scikit-video==1.1.11 scipy @ file:///home/conda/feedstock_root/build_artifacts/scipy_1637806658031/work seaborn==0.12.0 segmentation-models==1.0.1 setuptools-scm==6.4.2 Shapely @ file:///home/conda/feedstock_root/build_artifacts/shapely_1628205363317/work shiboken2==5.14.1 six @ file:///home/conda/feedstock_root/build_artifacts/six_1590081179328/work sleap==1.2.8 tensorboard==2.6.0 tensorboard-data-server==0.6.1 tensorboard-plugin-wit==1.8.1 tensorflow==2.6.3 tensorflow-estimator==2.6.0 termcolor==1.1.0 threadpoolctl==3.1.0 tifffile==2021.11.2 tomli==2.0.1 typing-extensions==3.10.0.2 tzdata==2022.2 tzlocal==4.2 urllib3==1.26.8 Werkzeug==2.0.3 wrapt==1.12.1 zipp==3.7.0
Logs
# paste relevant logs here, if any
Screenshots
Original slp file:

Converted from h5:

How to reproduce
sleap-convert path/to/file.slp -o path/to/file.h5 --format analysis
sleap-convert path/to/file.h5 -o path/to/newfile.slp --video path/to/video.mp4
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
There have been a few duplicate creations of this issue, but there are some differences between each mention - so we'll leave all of them open for now as related.
Related:
- #1466
- #1746