LOT 1 - Optimizare script build -Instalare mono comanda
This commit is contained in:
parent
5380c3fc63
commit
42ff22bf85
127 changed files with 16163 additions and 532 deletions
|
|
@ -78,6 +78,7 @@ cp ../.env.example .env
|
|||
| `/health` | GET | Health check |
|
||||
| `/analyze/video` | POST | Deepfake detection (fast, 16 frames) |
|
||||
| `/analyze/video/semantic` | POST | Semantic analysis (detailed, 144+ frames) |
|
||||
| `/v1/info` | GET | Service catalog metadata (used by catalog-api) |
|
||||
|
||||
### Example API Request
|
||||
|
||||
|
|
@ -125,8 +126,8 @@ Configured via environment variables (prefix: `VIDEO_ANALYSIS_`). These are typi
|
|||
|
||||
| Variable | Description |
|
||||
|----------|-------------|
|
||||
| `VIDEO_ANALYSIS_VLLM_BASE_URL` | vLLM server URL (e.g., `http://didiAI-video-vllm-buster:8000`) |
|
||||
| `VIDEO_ANALYSIS_VLLM_MODEL` | Model name (e.g., `l8cv/BusterX_plusplus`) |
|
||||
| `VIDEO_ANALYSIS_VLLM_BASE_URL` | vLLM server URL (e.g., `http://didiAI-video-vllm-buster:54500`) |
|
||||
| `VIDEO_ANALYSIS_VLLM_MODEL` | Served model name (e.g., `busterx`) |
|
||||
| `VIDEO_ANALYSIS_RUNS_DIR` | Directory for storing analysis artifacts (created/used at runtime) |
|
||||
|
||||
| `VIDEO_ANALYSIS_EXTERNAL_URL` | External URL for OpenAPI spec (e.g., `http://localhost:54600`) |
|
||||
|
|
@ -144,7 +145,7 @@ If you use the `api-nginx` profile, the nginx container can read these optional
|
|||
|
||||
### Optional Tuning Parameters
|
||||
|
||||
Configured via `deploy/config.yaml` (env vars override YAML):
|
||||
These default to the values below in `settings.py` and are overridden via the matching `VIDEO_ANALYSIS_*` environment variables (a `deploy/config.yaml` may optionally be supplied to override defaults, but none ships with the module):
|
||||
|
||||
| Parameter | Default | Description |
|
||||
|-----------|---------|-------------|
|
||||
|
|
@ -155,42 +156,24 @@ Configured via `deploy/config.yaml` (env vars override YAML):
|
|||
| `temperature` | `0.000001` | Sampling temperature |
|
||||
| `repetition_penalty` | `1.05` | Repetition penalty |
|
||||
|
||||
## ⚠️ Testing Recommendations
|
||||
## Semantic Analysis Pipeline
|
||||
|
||||
### Model Selection for Semantic Analysis
|
||||
Both endpoints use the **same** BusterX vLLM (`busterx` @ port `54500`):
|
||||
|
||||
**Current Setup:**
|
||||
- Both deepfake and semantic analysis use **BusterX** (7B parameters)
|
||||
- BusterX is optimized for deepfake detection
|
||||
- **Deepfake endpoint** — BusterX returns the `REAL` / `FAKE` / `UNCERTAIN` verdict + explanation.
|
||||
- **Semantic endpoint** — BusterX produces a per-chunk `description` for each temporal chunk. When `enable_aggregation=true`, those chunk descriptions are merged into a single narrative `final_summary` by the DIDI text LLM (Qwen3.5) via `http://didiAI-llm-api:14011` (set through `VIDEO_ANALYSIS_SEMANTIC_LLM_BASE_URL`).
|
||||
|
||||
**TODO: Test Semantic Analysis with Qwen3-VL-30B**
|
||||
|
||||
For better semantic understanding, consider testing with the larger **Qwen3-VL-30B** model (already running @ port 8102):
|
||||
BusterX is self-contained — Qwen2.5-VL is bundled inside the `l8cv/BusterX_plusplus` fine-tune, so no separate vision base model is loaded. There is no separate Qwen3-VL vision backend in this deployment; the only vision model the service talks to is BusterX.
|
||||
|
||||
```bash
|
||||
# Current (BusterX 7B)
|
||||
# Vision backend (deepfake + semantic chunk descriptions)
|
||||
VIDEO_ANALYSIS_VLLM_BASE_URL=http://didiAI-video-vllm-buster:54500
|
||||
VIDEO_ANALYSIS_VLLM_MODEL=busterx
|
||||
|
||||
# Alternative (Qwen3-VL 30B) - Better for semantic analysis
|
||||
VIDEO_ANALYSIS_VLLM_BASE_URL=http://didiAI-llm-vllm-vision:14002
|
||||
VIDEO_ANALYSIS_VLLM_MODEL=qwen3-vl
|
||||
# Text LLM used only to aggregate semantic chunks into a narrative summary
|
||||
VIDEO_ANALYSIS_SEMANTIC_LLM_BASE_URL=http://didiAI-llm-api:14011
|
||||
```
|
||||
|
||||
**Expected Improvements:**
|
||||
- ✅ More detailed scene descriptions (30B vs 7B)
|
||||
- ✅ Better understanding of complex actions
|
||||
- ✅ More coherent narrative synthesis
|
||||
- ✅ Higher quality semantic annotations
|
||||
|
||||
**Trade-offs:**
|
||||
- ⏱️ Slightly higher latency (~15-20s per chunk vs ~12s)
|
||||
- 📊 Better for semantic analysis, but keep BusterX for deepfake detection
|
||||
|
||||
**Recommendation:**
|
||||
- **Deepfake endpoint:** Keep using BusterX (specialized for forgery detection)
|
||||
- **Semantic endpoint:** Test with Qwen3-VL-30B for better results
|
||||
|
||||
## Deployment
|
||||
|
||||
```bash
|
||||
|
|
@ -258,8 +241,7 @@ modules/video-analysis/
|
|||
│ ├── docker-compose.yml # Docker services
|
||||
│ ├── Dockerfile # Container image
|
||||
│ ├── nginx.conf # Nginx reverse proxy config (optional)
|
||||
│ ├── nginx.conf.template # Template-based nginx config (optional)
|
||||
│ └── config.yaml # Tuning parameters
|
||||
│ └── nginx.conf.template # Template-based nginx config (optional)
|
||||
├── src/video_analysis/
|
||||
│ ├── __init__.py
|
||||
│ ├── app.py # FastAPI application
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue