trajectorytools midline package

Skip to first unread message

Carolyn Tett

Feb 29, 2024, 2:37:07 AMFeb 29
to users group
Hi all,

I'm new to using, and I think my future projects will greatly benefit from what functions I've discovered so far; however, an important function of the trajectory data I am used to are the midline or "posture" data for the fish I am tracking. I've tried using the various fishmidline python classes here but I think several of the python objects (i.e. video_object.npy, blobs_collection.npy files) are no longer produced from the current versions.

Is there an updated fishmidline python package that anyone knows about? Or is there some type of raw data I could pull from from which I could obtain fish midline data?

PS I followed the other midline software recommended on the FAQs page (SLEAP and DeepLabCut), but neither are quite ideal for the hundreds of hours of video my projects produce.



Mar 1, 2024, 6:08:46 AMMar 1
to users group
Hi Carolyn,

You are right, nowadays is completely outdated. Updating and inlcuding it in the main software is on our "To Do" list but unfurtunatelly not a priority right now.

If you want to work with blob's contours (numpy arrays), you can do so by loading the list of blobs and accessing them like this:

from idtrackerai import ListOfBlobs

list_of_blobs = ListOfBlobs.load("session_whatever/preprocessing/list_of_blobs.pickle")

# iterate over the main list
for frame, blobs_in_frame in enumerate(list_of_blobs.blobs_in_video):
for blob in blobs_in_frame:
do_something(frame, blob.contour)

# or iterate over a flattened view of the list
for blob in list_of_blobs.all_blobs:

I hope I have time to work a bit on this and include this "midline" project to the main idtrackerai now that I know there is at least one user intersted.



Mar 9, 2024, 12:18:03 PMMar 9
to users group
Hi Carolyn and all,

I finally updated the Fish Midline repository. It won't be merged into the main software since this repo is intended to work with fish data and we can't guarantee good results with other species. Feel free to check it, it's no longer an installable package but a short script that you can use to get your own results. I hope it's helpful for your research.

Reply all
Reply to author
0 new messages