This is the code I wrote for my PhD project in university of Bristol. The code produced these results:
This is not meant to be used easily as I am the only contributer. I will work on making it more user-friendly but this is what I could do for now.
IMHO, the package is good in terms of these feaures,
- Getting 2D coordinates and orientations of a large amount of fish from a 2D video.
- Reconstructing the 3D locations from matched 2D coordinates from multiple views (with water refraction correction).
- Linking positions into trajectories, for both 2D and 3D data.
- Calculating spatial & temporal correlation functions.
- Download the code with command
git clone --recursive https://github.com/yangyushi/FishPy.git
. It is important to include the--recursive
option, so that theeigen
andpybind11
will be downloaded. - Change the content in
build.sh
accordingly, then execute./build.sh
to build the python modules. This step is hard. - [optional] Add the full path of folder
FishPy/lib
to thePYTHONPATH
, so that the module can be imported in Python. - [optional] Add the full path of folder
FishPy/bin
to thePATH
, to use the scripts inbin
folder.
- cplex (you need to download the source code and compile. Also you need to install its Python API.)
- opencv-python-headless
- numba
- pandas
- pillow
- joblib
- trackpy
- numpy
- scipy
- matplotlib
- tensorflow (optional)