Repository navigation
Releases
Releases · smk762/argus-retina
v0.3.0
Added
- Faces, phase 3 of argus-cortex#88 (#10):
ghcr.io/smk762/argus-retina-faces.POST /facesreturns InsightFacebuffalo_lboxes, ArcFace embeddings and pose, and MiVOLO age and gender. Clustering and the under-18 rule stay in the caller. The weights are mounted, not baked in (buffalo_lis not redistributed; the MiVOLO ONNX comes fromargus-curator mivolo-convert). The image ships CUDA 12 and cuDNN 9 (NVIDIA's pip wheels), so it needs an NVIDIA driver for CUDA 12 (525 or newer); if a session can't get the CUDA provider, the load fails instead of running on the CPU. About 1 GB resident and 1.5 GB at peak. Each CUDA session's arena is capped (FACES_GPU_MEM_LIMIT_MB, default 1024). The resident is not pinned and asks to be dropped after 10 minutes idle; ONNX Runtime does not return the arena on unload, so iris should stop the container.docker compose --profile gpustarts it on:8135. - Synthetic-image score:
ghcr.io/smk762/argus-retina-synthetic.POST /syntheticreturns Community Forensics' probability that an image was generated ({"synthetic": 0.91}), and no label. The caller keeps the cutoff. Weights are the MIT ViT-S/16-384 fromOwensLab/commfor-model-384at Hub commit6076002, baked in and checked by sha256. CPU.docker compose upstarts it on:8136. - C2PA reader:
ghcr.io/smk762/argus-retina-c2pa.POST /c2pareturns a Content Credentials manifest's claims andc2pa-python's validation state (Trusted,Valid,Invalid), orpresent: falsewhen the file is unsigned. No weights. CPU.docker compose upstarts it on:8137. - SingGuard and faces register with argus-iris at startup (argus-cortex 0.15).
create_app(..., coordinator=)keeps the image'sgpu-tenant.yamlregistered for the server's lifetime (argus_cortex.gpu.aregistered: at startup, every few minutes,DELETE /tenants/<tenant>on shutdown), sendingARGUS_ADMIN_TOKENfor the admin routes. The broker finds the container through its node agent and calls the published port.ARGUS_GPU_BROKER_URLandARGUS_GPU_BROKER_TOKENare all it takes; without them nothing is sent, and a down broker never delays startup.
Changed
- argus-cortex 0.15: the GPU images pin
argus-cortex[remote,gpu,yaml]==0.15.0(was 0.10.0) and the package>=0.15,<0.16(was>=0.8). The broker URL alone now selects the broker: compose no longer defaultsARGUS_GPU_COORDINATORtonone(set it tononeto ignore a URL), the Dockerfiles dropARGUS_GPU_TENANT_MANIFEST(cortex finds/app/gpu-tenant.yamlitself), and the lock-file warning follows the same choice. - The SingGuard and faces residents name their container (
singguard,faces: compose's services), which is how the broker places a registered resident.
Fixed
- A resident stays servable after an unload or a lease failure (#24). A CPU
unload()returns false and leaves the model loaded. Arelease()that raises is logged after the state is alreadyunloaded, so a CUDA error cannot leave a dropped model looking loaded. A refused GPU lease during a request is recorded on/health; an absent model staysunloaded, and a later request that gets a lease clears the reason.
v0.2.1
Fixed
- A GPU model that failed to load tries again on the next request (#19, #20).
/api/guard/checkand/inferrefused
with a503whenever the resident wasn'tready, so an out-of-memory load on a GPU image stayed inerroruntil
/admin/wakeor a restart, even thoughrun()retries it. They now let a GPU resident inerrorthrough to
run()(Resident.accepting);ready, and with it the HEALTHCHECK, still reports the failure. A CPU image that
failed to load stays a503. - SingGuard logs a warning at startup when the GPU lease's lock-file fallback would be refused (the lock file can't
be created or opened by the image's non-root user), naming the path, instead of only failing a check later. - The README documents the lock-file fallback (#18): create
ARGUS_GPU_LOCK_DIRmode 1777, with a tmpfiles.d rule so
it survives reboots.
v0.2.0
Added
- SingGuard, phase 2 of argus-cortex#88 (#9):
ghcr.io/smk762/argus-retina-singguard, one SingGuard-4b for the
suite in place of argus-cull'ssingguard/service and agent-composer's guard route.POST /api/guard/checktakes
whatargus_cortex.moderation.SingGuardClientsends, so callers change only a URL: image checks, text-only checks
(input_role), and agent-composer'sconversation;thinkingisfast,fast-slow,sloworcascade, as cull
served them. Moved from cull: the parsing (an unreadable<answer>is unsafe with no rule; no verdict is a500,
never a pass) and slow's prefilled first step. From composer: control tokens and[role]:markers in the caller's
text and policy are made plain, so they can't forge a verdict or a turn. Images are shrunk to 1536 px first. - The weights are fetched, not baked in. SingGuard-4b and its base are Apache-2.0, but 8.9 GB: the first start
downloads them at a pinned Hub commit into the/models/singguardvolume and checks every file's sha256; later
starts need no network. 4-bit bitsandbytes by default (about 3.5 GB of VRAM),SINGGUARD_QUANT=bf16for full
precision. - GPU residents.
Resident(device="gpu")reportsgpuand its memory on/healthand serves argus-cortex's
/admin/unload,/admin/evict(an unload here) and/admin/wake, behindARGUS_ADMIN_TOKENwhen set, with409
while a check runs. After an unload the next request loads the model again, and the HEALTHCHECK counts an unloaded
GPU model as healthy.images/singguard/gpu-tenant.yamldeclares theguardkind and the resident for argus-iris. - GPU leases. SingGuard takes a
guardlease from argus-iris's broker (argus_cortex.gpu, the host's
ARGUS_GPU_*settings) around its startup load and around each check, including a reload after an unload, so iris
can make room first./admin/waketakes none: iris calls it after making room. A lease that can't be had is a503. docker compose --profile gpu up -dstarts SingGuard on:8134.
Changed
- The
devextra needsargus-cortex>=0.8(argus_cortex.auth) and Pillow.
Fixed
- Audit findings (#14). SingGuard reads the first line's verdict as a whole word after any
Safety:label, so
Safety: Unsafeis unsafe andsafety concernis no verdict (a prefix match onsaferead both as safe). A reply
about an image with no prompt keeps its assistant role, with the image on a user turn of its own. A refused startup
lease leaves a GPU model unloaded rather than inerror, and a GPU load that failed is tried again on the next
request, so a busy GPU at boot no longer means a 503 until iris wakes it.
Security
- SingGuard's image moves to transformers 5.22.2, accelerate 1.15.0 and Pillow 13.0.0, clearing the 66 Dependabot
alerts onimages/singguard/requirements.txt(Pillow decoder overflows and decompression-bomb bypasses,
transformers and accelerate path traversal and code-execution advisories). Checked on a 3090 against the pinned
weights: it loads in 4-bit, every thinking mode gives the expected verdicts, and unload and wake work.
v0.1.1
Fixed
- Audit findings (#8).
decode_bgrturns an empty or corrupt part (cv2.error) intoUnreadableImage(422)
instead of a 500. Decoded images are capped atARGUS_RETINA_MAX_PIXELS(default 2**27) through
OPENCV_IO_MAX_IMAGE_PIXELS, set before cv2 is imported, plus a check after decoding. The watermark weights guard
joins continuation lines and checks every instruction, case-insensitively. The nudenet and ultralytics imports
carry a reasonednosemgrep: agpl-importmarker, and a test keeps the markers and the AGPL licence field. - Release review (#11). A non-positive or overflowing
ARGUS_RETINA_MAX_PIXELSfails at import with a clear
error instead of OpenCV aborting the process; an OpenCV out-of-memory error stays a 500, not a 422. The watermark
weights guard drops comment lines before joining continuations and knows more weight formats and fetchers. The
README listsARGUS_RETINA_MAX_PIXELS.
v0.1.0
Added
- Phase 1 (argus-cortex#88, #79): NudeNet 640m and EraX-NSFW, moved from argus-cull's sidecars. One image per
model,ghcr.io/smk762/argus-retina-nudenetandghcr.io/smk762/argus-retina-erax, on one shared server
(argus_retina.sidecar, from cull'ssidecar-common):POST /inferin NudeNet's shape, as cull's sidecars served it. A file that isn't an image is now a422
(it was a500), and/inferanswers503while the model loads.GET /healthanswers argus-cortex'sResidentHealth(model_state,busy,idle_s), plus the model and its
settings (whatNudeNetClient.info()reads) and theversionand sourcecommit(AGPL section 13). The model
loads on a background thread, so/healthanswersloadingrather than the port staying closed.- Each image runs as a non-root user on the CPU, has a HEALTHCHECK that waits for the model, and declares
itself to argus-iris inimages/<model>/gpu-tenant.yaml(CPU only, no VRAM).
- NudeNet's own 640m weights, sha256
04fe3d77…34eb, fetched withgh(make weights) because GitHub serves
release assets to anonymous clients as a login page. Cull used a third-party mirror: the same weights with the ONNX
IR version lowered from 10 to 9. - Watermark detector (argus-cortex#88), moved from argus-cull's
watermark/sidecar:ghcr.io/smk762/argus-retina-watermark, for
curator'scrops.detect. The image has no weights. Mount them at/models/watermark.pt: fancyfeast's YOLO11x states no licence,
so it is never redistributed.make watermark-weightsfetches it pinned by Space commit and sha256. mnemic's CC-BY-4.0 YOLOv8s
was tried in its place and caught 15 of 32 watermarked images against the YOLO11x's 28 at curator's 0.4 cutoff. Boxes are whole pixels
now, as EraX's are (cull's sidecar rounded them to 0.1). - OCR (#5):
ghcr.io/smk762/argus-retina-ocr, RapidOCR with PaddleOCR's PP-OCRv6 small (Apache-2.0, ONNX on the CPU),
for checking the text a caption claims to read (argus-lens reconcile)./inferanswers one detection per line of
text,{"class": "text", "score", "box", "text"}, in reading order. The three models are pinned to RapidOCR's v3.10.0
release by sha256 and never downloaded at runtime. Chosen over docTR, EasyOCR and Florence-2: on 31 photos with
hand-checked text it found 48 of 69 phrases at about 0.4 s per image, and unlike Florence-2 it never wrote text
that isn't there. compose.yamlruns all four on loopback (:8130to:8133). CI builds every image on every PR; av*tag pushes
them and creates the GitHub Release. Nothing goes to PyPI.