This project tracks the movement of rats in open field videos using the Mask R-CNN repository and a Mask R-CNN model mask_rcnn_rat_cfg_0005.h5
The Open Field Maze(OFM) is a common method to study loco-motor ability and anxiety-like behavior in rats, and thus being used for various psychology research. Automating behavioral observations is necessary to enable researchers to study behavior in more reliable and consistent ways and allow experiments to be conducted in longer periods of time. Therefore, this project used the Mask-Region-based Convolutional Neural Network model (Mask-RCNN) to develop a reliable program that tracks rat movement in the OFM.
This project requires python 3.4, tensorflow version 1.14 (tensorflow 2.0 is not compatible with the Mask_RCNN library unfortunately), and Keras 2.3.1. We recommend using pip3 and venv to manage packages.
-
Clone this repository
-
Setup virtual environment
python3 -m venv venv source venv/bin/activate
-
Install dependencies
pip install -r requirements.txt
To run the open field video analyzer:
python analyze_video.py <path of video> <video name> <number of frames>
ex.
python analyze_video.py ./video/Video1.mp4 test1 20
First we'd like to thank the psychology department of Franklin and Marshall college for providing the video of OFM. We would also like to thank the authors who providing tutorials introducing how to use the mask R-CNN model in keras with tensorflow object detection platform
MIT License
Copyright (c) 2020 Noah Halle