denisecailab / ezTrack

Free, platform independent, behavior tracking software.
GNU General Public License v3.0
118 stars 41 forks source link

video_dict issues when calling functions out of jupyter code #6

Closed Leandroscholz closed 4 years ago

Leandroscholz commented 4 years ago

Hi everyone from @DeniseCaiLab,

Your tool is really interesting and quite useful, congratulations!

I have started using it to automate some of the tracking tasks we have in our lab and I noticed there are a few issues when calling ezTrack functions on scripts out of the notebooks you provide. I don't have a detailed description of the issues as of now, because I just debugged it quickly to have some results. However, if you want to start working on it before I give more details, below are some information:

1) please take a look operations with video_dict['dpath'] and video_dict['file'] as I had some issues while communitacing between functions. For example, trackLocation should use os.path.join(os.path.normpath(video_dict['dpath']), video_dict['file']) instead of video_dict['dpath']) to load the image. Also, please let me know if you really have the same issues or I am the only facing these issues.

2) batch_LoadFiles does not work in the notebook. it gives an empty list when using the LocationTracking_BatchProcess.ipynb, key name 'ftype' value should be with a dot e.g,'.avi'

I hope you find these comments useful. Cheers,

ZachPenn commented 4 years ago

Hi,

All of the visualization features of ezTrack are currently entirely dependent upon being run within Jupyter and will present problems if trying to be implemented outside of Jupyter. Non-visualization components of the code should be fine.

I'll check out the other things you note but without further details it's a bit tricky.

trackLocation uses video_dict['fpath'], not 'dpath', which is defined the way you suggest, but earlier when the video is loaded: video_dict['fpath'] = os.path.join(os.path.normpath(video_dict['dpath']), video_dict['file']), under function LoadAndCrop.

I'll look into the issue with file extension but for batch_LoadFiles but there should not be a "." included in the extension.