Dear users,
Some of you have been asking about the possibility of having the output trajectories as a .txt or .csv file. I've created a script to do so (see the file attached). To execute the script just use the following command:
python trajectories_to_csv.py path/to/folder/where/the/tracked/videos/are
The script will visit all the sub-folders in path/to/folder/where/the/tracked/videos/are looking for trajectories.npy and trajectories_wo_gaps.npy files. In case it finds one, it will create some .csv and .json files with the information contained in the trajectories.npy or trajectories_wo_gaps.npy file. The arrays in the trajectories.npy or trajectories_wo_gaps.npy dictionary will be converted to .csv. The rest of the keys in the dictionary will be stored in a .json file.
Let me know if you have any doubt about the execution of the script.
In the next update this functionality will be available directly from the
idtracker.ai GUI by setting the parameter CONVERT_TRAJECTORIES_DICT_TO_CSV_AND_JSON to True in the local_settings.py file. Also, if you are using the python-video-annotator to validate your trajectories, you will be able to save the new trajectories directly in a .csv file.
I will announce in the next weeks the new update (with some fixes and improvements in usability) and the instructions to update your
idtracker.ai.