(A) Images are streamed from the webcam to computer, running through the object detection module, which send feedback control signals to the optogenetic devices through Arduino Microcontroller board.
TraCon can achieve real-time animal detection and output statistic results for standard behavior tests, for example, open field test, elevated plus maze test, Morris water maze, social preference test, et. al.
Upon successful detection, we can define a spatial region that would trigger the optogenetic or a sensory stimulation. Here we used two-chamber real-time place preference for demonstration. We used this method in our previous research (Zhang, et al. 2018 Neuron)
Moreover, the spatial region can be either static, as used in two-chamber place preference test, or dynamic, which changes accordingly to the position of another animal.
TraCon toolbox is video-based and written in Python programming language (compatible with Python 2 and Python 3) that can work on Windows, Max OS and Linux system. Due to the low computation requirements, TraCon can run at a single core CPU only computer for real time object detection and feedback control. Considering most neuroscience labs have laser/LED components or customized sensory stimulation, TraCon toolbox can be easily integrated with existing laboratory rig to achieve automation.
This part is still under development. You may subscript to the mailing list to receive notification regarding the update: https://docs.google.com/spreadsheets/d/1bvRgqYsHoxdKriIWadSp18Iz_6pi-RCWazMIVA_AIbg/edit?usp=sharing
Or you may check the Youtube channel in the future: https://www.youtube.com/channel/UCMS8gQo8F_oKKvzGmNWnZBw?view_as=subscriber
Here we describe our Track-and-Control (TraCon) toolbox, a fully automatic system with real-time object detection and low latency closed-loop hardware feedback. We further demonstrate that the toolbox can be applied in a broad spectrum of behavior tests in the neuroscience field, including open field, cross maze, Morris water maze, real-time place preference, social interaction, and looming-induced defensive behavior tests. TraCon toolbox proved to be an efficient and easy-to-use method, and highly flexible for extension. Moreover, the toolbox is open source and compatible across OS platforms and each lab can easily integrate TraCon with their existing set up to achieve automation. And we hope TraCon toolbox would further accelerate our understanding of the functional architecture of the brain.
1.Python environment and OpenCV library for the object detection analysis. 2.Arduino board for TTL pulse train generation.
This instruction would go through every detail you might need to know while install the TraCon toolbox.
Installation instruction for windows users: This installation has been tested on Windows 10 and 7 system
- Download anaconda
- Chose the Python 3.7 version, 64-Bit Graphic Installer (486MB)
- After completion of the download, open the Anaconda3-2019.07-Windows-x86_64.exe installer file
- Follow the intuitive installation instruction and chose ‘Add Anaconda to the system PATH environment variable’ during the installation’ and ‘Register Anaconda as the system Python 3.7’
- Open Anaconda Prompt (Anaconda3)
- In the command line:
pip install opencv-contrib-python
- Open Anaconda Prompt (Anaconda3)
- Type in:
pip install pyserial
- Open Anaconda and run Spyder
- Open the python files downloaded from here
- Use the default setting of the system.
- Python - programming language
- OpenCV - Image processing library
- Pyserial - Serial Port Control
- Arduino - open-source and easy-to-use micro controller board
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
- Guang-Wei Zhang - Initial work - TraCon-Toolbox
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details
- Hat tip to anyone whose code was used
- Inspiration
- etc