Engineering Manual v1.0
CNF DEVELOPER HANDBOOK
Chaparrito NalgΓ³n Framework β pipeline architecture, subsystem contracts, metrics engine, API gateway, and certification workflow.
1. Purpose & Philosophy
The Chaparrito NalgΓ³n Framework (CNF) is a standardized, modular computer-vision pipeline for lower-body contour geometry extraction, denim fit analysis, cloth-body interaction modeling, SMPL-X mesh reconstruction, fit-grade scoring, and manufacturing pattern optimization.
CNF is designed to be:
- Deterministic β same input β same metrics
- Modular β each subsystem deploys independently
- Scalable β GPU/CPU separation
- Interoperable β JSON schemas, API bindings, microservice architecture
- Explainable β every metric is traceable to geometry
2. System Overview Guided Link: Technical Documentation β
CNF consists of six major layers:
1. IngestionUpload validation, object storage, event emission.
2. CV Core (GPU)Segmentation, pose lifting, SMPL-X fitting, cloth mesh.
3. Body MeshParametric shape + pose parameters, silhouette alignment.
4. Cloth MeshCanonical denim mesh warped by offset fields.
5. Metrics Engine (CPU)Curvature, projection, tension, FitBand.
6. API + StorageREST gateway, provenance logging, DB + object store.
3. Ingestion Layer Guided Link: Live Scanner β
- Accept user uploads or camera captures.
- Validate image resolution and format.
- Store raw image in object storage.
- Emit
NEW_SCANevent to orchestrator. - Assign
cnfcaseidand set initialscan_status.
4. CV Core (GPU) Guided Link: cv-pipeline.js β
- 4.1 Preprocessing: resize, normalize, estimate camera intrinsics.
- 4.2 Segmentation: person mask, jeans mask, seat region mask.
- 4.3 Pose Estimation: 2D keypoints β 3D skeleton via single-view lifting.
- 4.4 SMPL-X Body Mesh: fit shape parameters Ξ², fit pose parameters ΞΈ, align silhouette.
- 4.5 Cloth Mesh Reconstruction: canonical jeans mesh, offset field deformation, tension-aware refinement.
- 4.6 Depth/Normal Refinement: optional but recommended for curvature accuracy.
5. CNF Metrics Engine (CPU) Guided Link: 3D Viewer β
- 5.1 Seat Curvature Radius: cross-sections sampled at multiple vertical levels.
- 5.2 Projection Vector: distance from pelvic reference plane to posterior mesh.
- 5.3 Contour Stability: silhouette smoothness + left/right symmetry.
- 5.4 Cloth-Body Distance Fields: used for FitBand classification.
- 5.5 Tension Zones: wrinkle density + highlight intensity + seam displacement.
- 5.6 FitBand Classification: tight / regular / relaxed / Leviβs-compatible.
6. CNF Outputs (JSON Schemas) Guided Link: Technical Standard β
Every CNF case produces four standardized outputs:
cnffitgrade_reportβ seat grade, tier, score breakdown.cnfmeshspecβ mesh validity, vertex count, reconstruction accuracy.cnftensionheatmapβ tension zone intensities and classification.cnfcertlabelβ final label with pass/fail flags and seal ID.
7. API Gateway (v1.2) Guided Link: API Reference β
POST /api/cnf/scanGET /api/cnf/scan/{cnfcaseid}GET /api/cnf/fit-grade/{cnfcaseid}GET /api/cnf/mesh/{cnfcaseid}GET /api/cnf/tension/{cnfcaseid}GET /api/cnf/cert/{cnfcaseid}
Version header: X-CNF-Version: 1.2
Developer-ready OpenAPI contract:
8. Database Schema
cnf_userscnf_scanscnfmeshspecscnffitgrade_reportscnftensionheatmapscnfcertlabels
9. Microservice Architecture
- upload_api β ingestion and validation
- orchestrator β pipeline coordination
- cv_engine β GPU-based CV core
- metrics_engine β CNF metric computation
- api_gateway β REST/WebSocket exposure
10. Certification Workflow Guided Link: CNF Handbook β
- Stage 1: Scan ingestion β assign cnfcaseid, store raw image, trigger orchestrator.
- Stage 2: CV processing β segmentation, pose lifting, SMPL-X fitting, cloth mesh, optional depth refinement.
- Stage 3: Metric extraction β curvature, projection vector, distance fields, tension zones, FitBand.
- Stage 4: Fit-grade report β assign CNF grades A/B/C, evaluate Leviβs compatibility, set Mesh-Ready flag.
- Stage 5: Certification label β seat grade, stability, tension, FitBand, pass/fail, Master Mold candidate flag.
- Stage 6: Storage & API β store all artifacts, expose via
/api/cnf/scan/{id}. - Stage 7: Master Mold integration β high-grade cases promoted to template updates.
11. Developer Training
- Concept exam β CNF metrics, terminology, compliance tiers.
- Pipeline exam β CV stages, mesh reconstruction, metric extraction.
- Practical case evaluation β run end-to-end scan, verify outputs.
- Reviewer guidelines β analyst approval, provenance checks, override rules.
12. Roadmap
- v1.3 β multi-view fusion
- v1.4 β cloth simulation integration
- v2.0 β full 3D scanning alignment