File size: 841 Bytes
e5af2ce
 
 
 
 
 
 
 
 
 
 
 
5815df3
 
e5af2ce
 
 
 
 
 
 
 
5815df3
e5af2ce
5815df3
 
 
 
 
e5af2ce
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
title: LoRA Preprocess UI
emoji: πŸ§‘β€πŸŽ¨
colorFrom: indigo
colorTo: gray
sdk: gradio
sdk_version: 4.21.0
python_version: "3.10"
app_file: app.py
pinned: false
---

# LoRA Preprocess UI (Gradio)

Upload ~8 photos (selfies + body), get aligned/clean/face-neutral variants and `captions.jsonl` for LoRA fine-tuning.

## Features
- Face detection & aligned crops (OpenCV SSD)
- Background removal (rembg u2netp)
- Face-only neutralized variant to avoid memorizing clothes/jewelry
- Optional Florence-2 captioning (set `FLORENCE_URL`, `FLORENCE_KEY` env vars)
- Outputs saved under `outputs/preprocessed/` inside the container

## Run locally
```
pip install -r requirements.txt
python3 app.py
```

## Env vars (optional)
- `FLORENCE_URL`: endpoint that returns JSON with `caption`/`text`
- `FLORENCE_KEY`: bearer token for that endpoint