MCPcopy Create free account
hub / github.com/alpha2phi/python-apps / detect_retinaface_anticov

Function detect_retinaface_anticov

serving-ml-models/backend/main.py:68–76  ·  view source on GitHub ↗
(file: UploadFile = File(...))

Source from the content-addressed store, hash-verified

66
67@app.post("/retinaface_anticov")
68def detect_retinaface_anticov(file: UploadFile = File(...)):
69 file_bytes = io.BytesIO(file.file.read())
70 # image = Image.open(file_bytes)
71 # name = f"/data/{str(uuid.uuid4())}.jpg"
72 # image.save(name)
73 processed_image = retinaface_anticov(file_bytes)
74 bytes_io = io.BytesIO()
75 processed_image.save(bytes_io, format="PNG")
76 return Response(bytes_io.getvalue(), media_type="image/png")
77
78
79if __name__ == "__main__":

Callers

nothing calls this directly

Calls 1

retinaface_anticovFunction · 0.90

Tested by

no test coverage detected