Optimise the anonymised livestream pipeline
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Refactoring
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- python, raspberry-pi
- Ambito
- audio-video-rtc, embedded-iot, performance
Direzione di ricerca
Start with pyro_camera_api/services/anonymizer_rtsp.py and the existing FPSMeter logs. Measure decoder, model and encoder CPU, latency and FPS on a station, then evaluate the listed copy, box-timing, hardware codec and model-input options one at a time. Done means recording before-and-after measurements in the issue and merging useful changes while the stream stays real time with the new model.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Part of pyronear/roadmap#41 (Livestream anonymisation). Independent of the model work.
Context
The blurred livestream (pyro_camera_api/services/anonymizer_rtsp.py) works like this: one ffmpeg decodes the RTSP to raw BGR frames, a thread runs the model on the last frame (BGR to RGB, PIL, letterbox), and an encoder thread copies the last frame, paints the boxes and sends it to a second ffmpeg (x264 to SRT). It works, but it spends CPU on copies and conversions, and the new model may be heavier.
What has to be done
- Measure on a station: CPU per thread, latency, FPS of decoder, model and encoder (
FPSMeterlogs exist). - Fewer copies: give the raw frame to the model directly (NCNN can do BGR to RGB, no PIL), paint the boxes in place, avoid
frame.copy()andtobytes()on every frame. - Box timing: boxes are painted on the current frame, not on the frame they come from. A moving object can show for a few frames. Delay the encoder by one inference, or keep the boxes longer and make them bigger.
- Hardware decode and encode on the Pi (
h264_v4l2m2m), or use a smaller camera substream. - Smaller model input, or run the model one frame out of N.
- Measure again after each change, keep what helps.
Done when
- Before and after measurements are in this issue
- The useful optimisations are merged and the stream stays real time with the new model
- Lingua principale
- Python
- Stelle
- 20
- Fork
- 9
- Merge medio
- 4g 21h
- PR unite (30g)
- 12
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di pyronear/pyro-engine
-
fix(camera-api): ONNX anonymizer looks for model.onnx but the archive ships best.onnxForse già presa @frgfm l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
pyronear/pyro-engine#477 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
pyronear/pyro-engine#368 ·
I maintainer di solito rispondono entro 1 giorno
-
module: vision type: enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
pyronear/pyro-engine#466 ·
I maintainer di solito rispondono entro 1 giorno
-
module: vision type: enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 45/100
pyronear/pyro-engine#465 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 55/100
pyronear/pyro-engine#463 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di pyronear/pyro-engine
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
micropython/micropython#19906 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
FinanceFlash/unvibecode#597 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
TomAnthony/YourOwnWeigh#21 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG]: Compliance rules never see Unity Catalog views as viewsForse già presa @wagnercsantos l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
databrickslabs/ontos#1348 ·
I maintainer di solito rispondono entro 3 giorni
-
Deprecated datetime.utcnow() is called on every log line (DeprecationWarning on Python 3.12+)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 2 giorni