ilastik / ilastik4ij

ImageJ plugins to run ilastik workflows
MIT License
22 stars 17 forks source link

Exporting h5 file too big? #125

Open KClay98 opened 6 months ago

KClay98 commented 6 months ago

I have mp4 files (about 1.5 mins long) of worms moving in a dish. I want to measure speed and use animal tracking which shouldn't be much different than drosophila larvae behavior tracking. I was able to use a free online converter to make the mp4 into avi files and the FFmpeg plugin for ImageJ to open it. When I try to save it as hdf5 (either using the hdf5 plugin or the elastik for imageJ plugin), it outputs a file that is huge and way too big for elastik to read/process (between 5 and 1000mb). The example tutorials showed h5 files about 600kb, which is what I was expecting. I cannot seem to get my files in a readable format for elastik. How does everyone else convert videos of animals to readable formats for elastik? Here's the link to the mp4: https://drive.google.com/file/d/1bcFYG_FIv6ju6JXXwonF_1H33FXG08Si/view?usp=share_link

k-dominik commented 6 months ago

Dear @KClay98,

thank you for reaching out and providing example data! That makes it so much easier to reproduce.

First of all, it is expected to end up with much larger files after converting from mp4 video to an image format. Very hand-wavy: video compression can exploit similarities between time frames to reduce the amount of data that is needed to be saved. So for a given time frame, partial information from multiple ones might be combined. Whereas after conversion to an image format each time frame is on its own. Adding to that, formats typically used in bioimage analysis use only lossless compression (like hdf5). It is however no problem at all to use larger data in ilastik. You can make your life for the given task a bit easier though, but that depends of course, on your analysis goals. I had a quick look and did the following:

Hope this helps - good luck with the analysis. Furthermore, I think your question could be of interest to many users. The github issues are more for tracking bugs in the ilastik software. Usage questions get a wider audience on forum.image.sc.

Cheers