Overview of the Face detector
masterhttps://github.com/cs-giung/face-detection-pytorch.repository·master·Indexed 21 days ago
https://github.com/joonson/syncnet_pythonAn audio-to-video synchronization network for removing temporal lags between audio and visual streams and identifying speakers in multi-face videos. Includes a face detector adapted from face-detection-pytorch and a three-stage pipeline for face detection/tracking, sync offset estimation, and visualization.
https://github.com/cs-giung/face-detection-pytorch.SyncNet can be installed using Conda environments. The code is designed to automatically detect and use a CUDA GPU if available, falling back to CPU if no GPU is detected.
To install with GPU (CUDA) support:
conda env create -f environment.ymlTo install for CPU only:
conda env create -f environment-cpu.ymlconda env create -f environment.ymlBefore running the demo or the pipeline, you must download the pretrained models using the provided shell script:
sh download_model.shsh download_model.shThe full synchronization pipeline consists of three distinct stages: face detection/tracking, sync offset estimation, and visualization. You must run these scripts sequentially.
Arguments for all scripts:
--videofile: Path to the input video file.--reference: A unique name for the video run (used for organizing output).--data_dir: The base directory where outputs will be stored.python run_pipeline.py --videofile /path/to/video.mp4 --reference name_of_video --data_dir /path/to/outputpython run_syncnet.py --videofile /path/to/video.mp4 --reference name_of_video --data_dir /path/to/outputpython run_visualise.py --videofile /path/to/video.mp4 --reference name_of_video --data_dir /path/to/outputOnce completed, the results are stored in $DATA_DIR:
$DATA_DIR/pycrop/$REFERENCE/*.avi$DATA_DIR/pyavi/$REFERENCE/video_out.avipython run_pipeline.py --videofile /path/to/video.mp4 --reference name_of_video --data_dir /path/to/output
python run_syncnet.py --videofile /path/to/video.mp4 --reference name_of_video --data_dir /path/to/output
python run_visualise.py --videofile /path/to/video.mp4 --reference name_of_video --data_dir /path/to/outputTo run a quick demonstration of the SyncNet synchronization network, use the demo_syncnet.py script. You must provide a video file and a temporary directory for processing.
Arguments:
--videofile: Path to the input video file.--tmp_dir: Path to a directory used for temporary files.Expected Output: The script should output values similar to these (exact values may vary by platform):
AV offsetMin distConfidencepython demo_syncnet.py --videofile data/example.avi --tmp_dir /path/to/temp/directory