Repository navigation
feat(documents): keep anytopdf's face and object plugins and ask them about a picture - #221
Merged
Merged
Conversation
… about a picture The base the per-feature threads build on: anytopdf.fetch keeps the faces, face-id and objects plugins beside the program, and anytopdf.analyze runs them, strict-sandboxed with no network, on one picture and returns Lens-shaped faces and objects. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HysPx1nJnWBK2JJKbmbqdZ
This was referenced Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub
62A4
strong>.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Before: Lens kept only the anytopdf program and always ran it with
--no-plugins, so it couldn't use anytopdf's face or object detection.After: when Lens fetches anytopdf 0.4.0, it keeps the faces, face-id and objects plugins beside the program. A new
anytopdf.analyze(cfg, picture, models)returns what those plugins find in one picture as Lens-shaped results:{"kind": "face" | "object", "label", "box": [x, y, w, h] fractions, "score", "attributes"}. Nothing calls it yet. Each later feature (objects, faces) uses it in its own PR.How:
analyzerunsanytopdf --no-config --plugin-sandbox strict convert … --dump-graphin a temp directory, with no network (netguard.nowhere_env).ANYTOPDF_*variable is stripped except the models Lens names, such asANYTOPDF_OBJECTS_MODEL.Motivation and Context
This is the base for the next anytopdf integration steps. Tested against the real v0.4.0 release,
analyzeon the bus photo with Lens'syolox_s.onnxreturns 1 bus and 4 people with their boxes, matching Lens's own YOLOX.Types of changes
!in the title)Checklist:
test_its_plugins_look_at_a_picturechecks the fake's results, the sandbox flags and the stripped environment.analyze. It passed against v0.4.0.docs/accordingly (docs/configuration.md#anytopdf).🤖 Generated with Claude Code
https://claude.ai/code/session_01HysPx1nJnWBK2JJKbmbqdZ
Generated by Claude Code