Metadata-Version: 2.4
Name: abstract_identity
Version: 0.1.4
Summary: Identity pipeline for hugpy: char360 (video -> character face detection/clustering/360-view selection) + render (identity-render GPU service: Hunyuan3D-2mv mesh, Blender turntable, video_extract, video_characters_glb)
Author: putkoff
License: MIT
Project-URL: Homepage, https://abstractendeavors.com
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: abstract-flask>=0.0.0.1079
Requires-Dist: flask<4.0,>=3.0
Requires-Dist: hugpy-resources<0.2,>=0.1.17.29
Requires-Dist: pydantic<3.0,>=2.0
Provides-Extra: render
Requires-Dist: scenedetect[opencv]; extra == "render"
Requires-Dist: ultralytics; extra == "render"
Requires-Dist: insightface; extra == "render"
Requires-Dist: onnxruntime-gpu==1.18.1; extra == "render"
Requires-Dist: opencv-python; extra == "render"
Requires-Dist: numpy; extra == "render"
Requires-Dist: scikit-learn; extra == "render"
Requires-Dist: trimesh>=4; extra == "render"
Requires-Dist: yt-dlp[default]>=2026.3.13; extra == "render"
Requires-Dist: playwright<2,>=1.58; extra == "render"
Requires-Dist: Pillow; extra == "render"
Dynamic: license-file

# abstract-identity

Abstract Identity extracts character views from video and turns reference images into 3D identity assets. It provides the `char360` analysis command and the `identity-render` job service used by Hugpy Video.

## Installation

Install the render extra on the processing host. Configure compatible PyTorch and detection models for video analysis. Mesh generation also requires Hunyuan3D-2mv and its weights. Turntable rendering uses Blender and FFmpeg.

```sh
python -m pip install 'abstract-identity[render]'
```

## Quick start

Extract the characters in a local clip. The default stride processes each frame.

```sh
char360 scene.mp4 --outdir ./characters
```

Open `manifest.json` in the output directory to inspect tracks, grouped captures and representative views. Use `--stride N` to sample every Nth frame when full frame coverage is unnecessary.

## Render service

Run `identity-render` on the configured render host and open its studio (default port `9750`). Submit reference images or a video, follow the job and download the resulting GLB or turntable. Enter the render token in the studio when the service requires one.

The studio supports naming identities, choosing reference angles and creating additional renders from saved captures. Job files normally live under `~/identity-render/jobs/`. The identity library keeps capture files and its SQLite catalog under `~/identity-render/identities/`.

## Integration

Hugpy Video uses the render service for identity jobs. Python applications can import the analysis pipeline from `abstract_identity.char360` and the service from `abstract_identity.render`. Consult the distribution’s license and third-party notices when redistributing models or native components.

## Job lifecycle

Submit a render to `POST /jobs` and use the returned job ID to poll `GET /jobs/{job_id}`. Jobs can produce a mesh, a turntable or grouped character captures. Consult each job’s state and output list before requesting its artifacts. `GET /health` is suitable for checking whether the render service is reachable.
