We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
extract_faces()
1 parent eed25ec commit d9e8ce7Copy full SHA for d9e8ce7
examples/face_recognition/main.py
@@ -28,7 +28,12 @@ class FaceBase:
28
MAX_IMAGE_WIDTH = 1280
29
30
31
-@cocoindex.op.function(cache=True, behavior_version=1, gpu=True)
+@cocoindex.op.function(
32
+ cache=True,
33
+ behavior_version=1,
34
+ gpu=True,
35
+ related_arg_attr=(cocoindex.op.RelatedFieldAttribute.RECTS_BASE_IMAGE, "content"),
36
+)
37
def extract_faces(content: bytes) -> list[FaceBase]:
38
"""Extract the first pages of a PDF."""
39
orig_img = Image.open(io.BytesIO(content)).convert("RGB")
0 commit comments