bae705aa97
- Add NFC ePassport roadmap (ICAO 9303, eIDAS) - Add TensorFlow.js edge face detection (BlazeFace) - Add structured audit logger (GDPR-compliant) - Risk scoring support Part of KYC Apple Native UX v1.1.0
4.4 KiB
4.4 KiB
QUIXZOOM Capture Pipeline
Datainsamlings- och AI-bearbetningspipeline för QUIXZOOM Field Intelligence Network.
Arkitektur
iPhone Camera
│
▼
Capture App (iOS)
│
▼
Upload API (Node.js/Express)
│
▼
Cloudflare R2 (Object Storage)
│
├── originals/ # Originalbilder
├── metadata/ # JSON-metadata per bild
├── thumbnails/ # Genererade thumbnails
└── datasets/ # Träningsdataset
│
▼
AI Preprocessing Worker
├── Blur detection
├── Duplicate detection
├── OCR (Tesseract)
├── Object detection (COCO-SSD)
├── Scene classification
├── Quality scoring
└── Thumbnail generation
│
▼
Taxonomy Tagger
├── Physical layer
├── Operational layer
├── Economic layer
├── Institutional layer
├── Social layer
└── Temporal layer
│
▼
Feature Store / Dataset Builder
│
▼
Training Sets (JSONL-format)
Snabbstart
1. Installation
git clone https://github.com/quixzoom/capture-pipeline.git
cd capture-pipeline
npm install
2. Konfiguration
cp .env.example .env
# Redigera .env med dina värden
3. Starta server
npm start
4. Starta workers
# Terminal 1: AI preprocessing
npm run worker:ai
# Terminal 2: Taxonomy tagger
npm run worker:taxonomy
API Endpoints
Upload
POST /api/upload
Content-Type: multipart/form-data
Form fields:
- image: Bildfil (JPEG/PNG)
- latitude: GPS latitud
- longitude: GPS longitud
- accuracy: GPS noggrannhet (meter)
- altitude: Höjd över havet
- compassHeading: Kompassriktning (grader)
- gyroscope: Gyroskop-data (JSON)
- accelerometer: Accelerometer-data (JSON)
- deviceModel: Telefonmodell
- deviceOS: OS-version
- appVersion: App-version
- contributorId: Zoomer-ID
- missionId: Uppdrags-ID
Status
GET /api/upload/status/:captureId
Dataset
GET /api/dataset/:version
GET /api/datasets
Admin
GET /api/stats
GET /api/queue/status
Metadata Schema
Varje bild sparas med följande metadata:
{
"captureId": "uuid",
"uploadedAt": "ISO-8601",
"processedAt": "ISO-8601",
"exif": {},
"gps": {
"latitude": 0.0,
"longitude": 0.0,
"altitude": 0.0,
"accuracy": 0.0
},
"sensors": {
"compassHeading": 0.0,
"gyroscope": {},
"accelerometer": {},
"deviceOrientation": ""
},
"device": {
"model": "",
"os": "",
"appVersion": "",
"camera": ""
},
"environment": {
"weather": "",
"temperature": 0.0,
"sunPosition": "",
"timeOfDay": ""
},
"file": {
"originalName": "",
"mimeType": "",
"size": 0,
"checksum": "",
"dimensions": {
"width": 0,
"height": 0
}
},
"aiAnalysis": {
"status": "pending|processing|completed|failed",
"blurScore": {},
"qualityScore": {},
"objectsDetected": [],
"ocrText": {},
"sceneClassification": {},
"duplicates": []
},
"taxonomy": {
"physical": {},
"operational": {},
"economic": {},
"institutional": {},
"social": {},
"temporal": {},
"confidence": 0
}
}
Taxonomi
Sex-lagers modell baserad på Landvex Urban Intelligence Framework:
| Lager | Fråga | Exempel |
|---|---|---|
| Physical | Vad finns här? | Byggnader, vägar, fordon, människor |
| Operational | Vad sker? | Trafik, affärer öppna, konstruktion |
| Economic | Hur finansieras detta? | Familjeföretag, kedjor, informell ekonomi |
| Institutional | Vilka regler styr detta? | Zonindelning, skyltar, tillstånd |
| Social | Vilka nätverk upprätthåller detta? | Turister, migranter, lokala gemenskaper |
| Temporal | Hur förändras detta över tid? | Rusningstrafik, säsonger, cykler |
Miljövariabler
| Variabel | Beskrivning | Standardvärde |
|---|---|---|
NODE_ENV |
Miljö | development |
PORT |
Serverport | 3000 |
R2_ENDPOINT |
Cloudflare R2 endpoint | - |
R2_ACCESS_KEY_ID |
R2 access key | - |
R2_SECRET_ACCESS_KEY |
R2 secret key | - |
R2_BUCKET_NAME |
R2 bucket name | quixzoom-capture |
REDIS_HOST |
Redis host | localhost |
REDIS_PORT |
Redis port | 6379 |
REDIS_PASSWORD |
Redis password | - |
Licens
MIT © LandveX Inc.