This project captures webcam video in the browser, detects loops (e.g., a pink or white thread) between two hands using computer vision (MediaPipe + OpenCV), and displays the result with a dummy login UI.
π§ Project Structure
loop-detector-app/
βββ backend/
β βββ app.py
β βββ auth.py
β βββ detect.py
β βββ requirements.txt
β βββ runtime.txt
β βββ Procfile
β βββ README.md
βββ frontend/
β βββ index.html
β βββ README.md
βββ deploy.sh
βββ README.md
The Loop Detector App backend is hosted on Render, ensuring easy deployment of the Flask API. It processes image frames, detects loops, and returns results in real-time.
To prevent the Render service from spinning down due to inactivity, we use AWS Lambda + Amazon EventBridge.
import requests
def lambda_handler(event, context):
url = "https://loop-detector-app-1.onrender.com/"
try:
response = requests.get(url)
return {"status": response.status_code, "message": "Ping successful"}
except Exception as e:
return {"error": str(e)}
keep-render-awakerate(15 minutes))β
Keeps the Render app active without manual intervention
β
Uses free-tier AWS Lambda, minimizing costs
β
Ensures smooth user experience without unexpected downtime
start frontend/index.html
cd frontend
python3 -m http.server 8000
Visit:
http://localhost:8000
This software is proprietary.
Unauthorized use, reproduction, or redistribution is prohibited without written permission from the author.
Β© 2025 Aimee L. Ramirez. Developer identity: @aimeelramirez. All rights reserved.