Note: This repository has only been tested with python 3.12.
pip install -r requirements.txtpython main.py
main.py: The main script to run the pipeline with both the SHELL and GUI.global_vars.py: A global interrupt flag to stop the pipeline is defined here.capture/-
base.py: The base class for collecting raw frames.
-
camera.py: The class for collecting frames from a camera.
preprocess/-
base.py: The base class for preprocessing raw frames.
-
mp.py: The class for preprocessing frames with MediaPipe Face Mesh.
model/-
base.py: The base class for loading and using models.
-
step.py: The class for using theStepmodel.
-
physnet.py: The class for using thePhysNetmodel.
-
models/onnx/
-
-
step.onnx: The ONNX model for theStepmodel.
-
-
-
state.pkl: Pickled initial state parameters for theStepmodel.
-
-
-
physnet.onnx: The ONNX model for thePhysNetmodel.
-
display/-
base.py: The base class for saving the results.
-
log_only.py: The class for saving the results in a log file.
-
log_and_print.py: The class for saving the results in a log file and printing the results to the console.
- capture device index: An integer to specify the camera device to use. For example,
0for the first camera,1for the second camera, and so on. A path to a video file can also be specified, but reading from a video file is not yet implemented with frame rate control. Note: Only 30fps cameras are supported at present. - models:
StepandPhysNetare supported at present. -
Step: A model that takes one frame at a time as input. Frame size should be 36x36.
-
PhysNet: A model that takes 128 frames at a time as input. Frame size should be 32x32.
Models have been trained and packed to ONNX format. Find them at model/models.