INTRODUCTION
Preclinical studies have long relied on traditional predetermined activity patterns to assess
behaviors such as affect, motivation, cognitive function, memory, motor coordination, etc. While these
historical approaches have led to countless discoveries, the evolution of behavioral paradigms has
yielded increasingly complex interpretations of the outcomes. Biased behavioral scoring (i.e. the need
for a priori knowledge of behaviors to score) overlooks potentially unique behaviors that may occur in
specific groups or subgroups within experiments. Moreover, manual behavioral scoring is highly
vulnerable to human error, biases, and low inter-rater reliability. Using unbiased pose estimation
techniques with open-source machine learning-based software such as DeepLabCut
1, 2
, and behavioral
mapping or clustering analysis with packages such as B-SOID
3
or VAME
4
have begun to shift
behavioral neuroscience into a new era of behavioral analysis and categorization. These techniques
are able to segment behaviors in an unbiased way, and eliminate inconsistencies due to human error
and inter-rater variability. To maximize the potential for these and other programs, experimenters must
be able to capture high resolution videos. Moreover, the ability to interface recording equipment with
real-time controllers for third-party data collection equipment, such as in vivo measurement of brain
activity (e.g. fiber photometry/miniscopes), optogenetic LED drivers, or MedAssociatesÒ chambers
unlocks the potential for closed-loop experiments, and very easy time-locking of video recordings with
data from these systems.
Here we introduce PiRATeMC (Pi-based Remote Acquisition Technology for Motion Capture),
an affordable, user-friendly, modular, open-source camera system that runs off a Raspberry Pi (RPi)
single-board computer and an accompanying 8-megapixel (MP) Camera Board (Sony IMX219 CMOS
sensor). These cameras can record high quality video under either infrared (IR) or white light. Moreover,
they offer far more flexibility in recording parameters than most commercially available camera
systems. The user can manually set recording parameters like frame size, frame rate (up to 120FPS),
white-balance (crucial for high-quality IR videos), brightness/contrast, ISO, saturation, bitrate, and
many more (details in Table 2 and Supplemental Table 2). Finally, the PiRATeMC system can easily
be controlled remotely via ssh (remote secure shell) over a local area network (LAN), and clusters of
cameras can be controlled synchronously with millisecond precision using ClusterSSH (easily installed
via the advanced packaging tools (apt) in Linux or Homebrew in MacOS), allowing either multi-angle
recording of single subjects (e.g. for 3D-DeepLabCut
5
), or an easy method of recording a large number
of behavioral sessions simultaneously. We provide step-by-step instructions to physically assemble the
camera and Raspberry Pi, as well as a cloned operating system (PiCamOS) that can be uploaded to
an SSD card (source code for building PiCamOS is also available). Lastly, we describe a simple data
management pipeline, whereby with minimal user modification of PiCamOS, a large number of
RPiCams can be controlled simultaneously, and deposit all recorded videos in the same ‘sink’ directory
.CC-BY-NC-ND 4.0 International licenseavailable under a
was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made
The copyright holder for this preprint (whichthis version posted July 30, 2021. ; https://doi.org/10.1101/2021.07.23.453577doi: bioRxiv preprint