A full Face Analysis workshop in Python covers the following topic:
- Create full web app from scratch using Gradio UI in Python
- Processing Webcam input as Image and Video
- Create Face Orientation on Face (Image/Video/Webcam)
- Apply FaceDetect Algorithm
- Apply FaceMesh (Image and Video)
- Deploy full application to Hugging Face Space
https://github.com/prodramp/DeepWorks/tree/main/FaceProcessingWebcam
git clone https://github.com/prodramp/DeepWorks.git
cd DeepWorks/FaceProcessingWebcam/FaceAnalysisWebApp
conda create -n opencv_gradio python=3.8
conda activate opencv_gradio
pip install -r requirements.txt
建议所有环境配置问题直接问chatgpt比在网上找帖子排错高效。
然后继续在 PyCharm 中添加刚刚成功的Conda 环境opencv_gradio。
程序中不同版本gradio调用摄像头函数参数可能不同
如果安装的是gradio 4.39.0 原来程序的需要改为
webcam_image_in = gr.Image(label="Webcam Image Input")
webcam_video_in = gr.Video(label="Webcam Video Input")
requirements.txt 需要改为旧版mediapipe
mediapipe==0.10.10