Export pose data in .json format

Hi,

Is there a way to export pose data in .json format instead of .csv or .h5?

best,

Y

You’re welcome to do so, namely in this function is where csv and h5’s are saved, so you could modify the code to save in another format: https://github.com/AlexEMG/DeepLabCut/blob/ca93b3e7a69c674abb31bfaa812cb38940a5d598/deeplabcut/pose_estimation_tensorflow/predict_videos.py

1 Like

That should be straighforward, as the h5/csv files internally are pandas arrays and you can just export json: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_json.html

So just read it via Dataframe = pd.read_hdf(dataname,'df_with_missing') and then export it…