Skip to content

Track Record is developing a real-time face tracking system built on a Raspberry Pi. The aim is to create a standalone plug-and-play product that brings face tracking capabilities to a wide range of users.

License

Notifications You must be signed in to change notification settings

oscell/Track-Record

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

Team

Name Responsibility GUID
Oscar Meunier Network and Design engineer 2391076M
Sai Vamsi Karnam Development and Integration engineer 2805927K
Tara Duggan Electronics and Design engineer 2363956D
Rohith Kambampati Backend developer and programmer 2782679K

Track-Record is a face tracking system built on the Raspberry Pi 3B platform, using a Pi Camera Module and servo motors for real-time face detection and tracking. A GUI is also implemented which communicates via a server sending commands to the Raspberry Pi.

The full documentation can be found here.

Find us on Twitter and Instagram to stay up to date with any of the latest developements or email us at tracknrecordteam@gmail.com to get in touch.

Hardware

The following electronic components were used to build the project:

Software Dependencies

The following libraries were used throughout the project:

Installation and Usage

This project aims to build a standalone plug and play type product. Clip the camera of your choice to the platform, switch the power on and watch it track you. But wait there's more, you can build it on your own. Follow the instructions ahead.

Instructions

  • Step 1: Setting up the hardware

    • Install the OS and set up a display.*
    • Connect the Pi camera
    • Connect the motors using the PinOut diagram: Pan at Gpio 18, Tilt at Gpio 17
    • 3D print the models -- Check the Schematics and Solidworks directories or build your own model
  • Step 2: Software

    • Make sure to have the latest update for the GCC/G++ compiler on your Raspberry Pi OS.
    • Setup cmake on your Raspberry Pi.
    • Clone the repo, the libraries used are included with the git package.
    git clone https://github.com/oscell/Track-Record.git
    
    • Unpack the lib_package archive to /usr/include
    sudo tar -xf lib_package.tar.gz -C /usr/include
    • Create an executable in the main/build directory

      • Open a terminal and navigate to the main directory
      • Run the following commands to create the executable "tracknrecord"
      mkdir -p build && cd build
      cmake ..
      make
      • You should now see two executables named "tracknrecord" and "server" in the directory
    • Set executable permission to run on startup

      • Open a terminal and run the following commands
      mkdir /home/pi/.config/autostart
      nano /home/pi/.config/autostart/track.desktop
      • Copy or type the following text into the "track.desktop" file.
      • Replace the "directory" with the location of the executable named 'server.cpp' located in the main folder. (eg. home/pi/...)
      [Desktop Entry]
      Type=Application
      Name=Track
      Exec="directory"
      • Save the file using: Ctrl+X -> Y
  • Step 3:

    • Setup the GUI* as shown in section 2 of the footnotes.
  • Step 4:

    • Reboot the Pi from the terminal and it is ready to go.

      sudo reboot
    • The Pi should now be listening for commands.

    • Ensure the Pi and your personal machine are on the same network.

    • Open the GUI on your personal machine and click "start tracking".

    • To view the video feed, click the video feed button.


*Footnotes

Section 1: Additonal information

Section 2: GUI

This section should be built locally (not on the raspberry PI). It will be used to comunicate with the PI to send commands.

Dependencies

As previously with the raspi install cmake on your machine. The next step is to install Qt5 although this can be done simply on linux using the command:

sudo apt-get install qt5-default

To find the path of your Qt5 installation, set up the C++, cmake, and QT5 on your personal machine and run the following command in the terminal:

find / -iname Qt5Config.cmake 2>/dev/null

Once you have the path, you can update the /local/CMakeLists.txt file with the correct Qt5_DIR.

set(Qt5_DIR "/path/to/Qt5/lib/cmake/Qt5")

The comunication with the raspberry pi is done through a server. To find the IP adress of the raspery pi run in the raspberry pi terminal:

hostname -I

In /local/src/GUI/main.cpp change:

QString serverAddress = "127.0.0.1";

to

QString serverAddress = "<raspberry_pi_ip>"

Build

cd local/
mkdir -p build && cd build
cmake ..
make

Usage

On the Raspi

Before being able to run send command the server must be initialised on the raspi.

cd main/build/
./server 

On your local machine

Run the GUI.

 cd local/build/
./GUI1_0

It is comprised of a section for vieo feed input and 2 buttons.

Tracking button

This sends a signal to the client which toggles the tracknrecord executable depending on the state it is currently in.

Video feed

This toggles the user webcam to show how face detection and tracking works. The GUI should look like this:

GUI

Section 3: Testing

The test report and the code we used for tests is available on a different branch of this repo. It can be accessed using https://github.com/oscell/Track-Record/tree/tests/tests

Section 4: 3D printing material

The Solidworks assemblies are provided in Solidworks/. This will require version 2022 or above however. To print the latest version of the stand .stl files are available in Solidworks/Stls/.

Exploded view

Note: In out product demonstration the base used was the Base_old as we did not have time to 3D print such a large base.

Once assembled model looks like:

NormalVew

and in exploded view:

explodeView

About

Track Record is developing a real-time face tracking system built on a Raspberry Pi. The aim is to create a standalone plug-and-play product that brings face tracking capabilities to a wide range of users.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •