mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
fix: improve AI tool reliability for face detection and background removal (#25)
- Replace OpenCV Haar Cascades with MediaPipe for face detection, using short-range model first with full-range fallback for better accuracy - Add auto-orient to remove-background route for EXIF-rotated photos - Change default background removal model from u2net to birefnet-general-lite - Fix flaky test by setting SQLite busy_timeout before journal_mode pragma Co-authored-by: Siddharth Kumar Sah <siddharth123sk@gmail.com>
This commit is contained in:
committed by
GitHub
co-authored by
Siddharth Kumar Sah
parent
3c4562c9ce
commit
2eb77fe0f2
@@ -10,10 +10,7 @@ import { createWorkspace } from "../../lib/workspace.js";
|
||||
import { updateSingleFileProgress } from "../progress.js";
|
||||
import { registerToolProcessFn } from "../tool-factory.js";
|
||||
|
||||
/**
|
||||
* Face detection and blurring route.
|
||||
* Uses MediaPipe for detection, PIL for blurring.
|
||||
*/
|
||||
/** Face detection and blurring route. */
|
||||
export function registerBlurFaces(app: FastifyInstance) {
|
||||
app.post("/api/v1/tools/blur-faces", async (request: FastifyRequest, reply: FastifyReply) => {
|
||||
let fileBuffer: Buffer | null = null;
|
||||
|
||||
Reference in New Issue
Block a user