Relight any photo, lift objects out with a tap, and place them back like layers in a design tool — all on your phone.
Demo · Features · Architecture · Setup · Run the App · Roadmap · Contributing
If Halo is useful to you, consider starring the repo — it genuinely helps.
Relight a photo, tap an object to lift it out, drag it into place — all on-device touch, no desktop tools.
Most AI photo editing tools are either desktop-only, buried behind a full Photoshop-style workflow, or a single-trick app that only does one thing well. Halo does two things people actually want on mobile, and does them fast:
- Relight a flat photo with a draggable, depth-aware light source
- Lift out and move objects with a tap — smart segmentation + inpainting, no manual masking
No tutorials needed. Tap, drag, done.
| Feature | What it does | Why it matters |
|---|---|---|
| Relighting | Drag a virtual light source across the image and adjust intensity | Studio-quality lighting in seconds, no rig required |
| Smart segmentation | Point-based object selection powered by MobileSAM | Skip manual masking entirely |
| Inpainting | Reconstructs the background after object removal | Clean, natural results — no visible holes |
| Layered object placement | Extracted objects become movable, resizable layers | Reposition and resize like a real design tool |
| Mobile-first UI | Large touch targets, gesture-driven controls | Feels native, not like a ported desktop tool |
| FastAPI backend | Handles uploads, jobs, segmentation, relighting, downloads | AI logic stays decoupled from the app UI |
- Upload a photo from the mobile app.
- Choose relight or segment mode.
- For segmentation, tap the object you want to isolate.
- Run the model.
- The backend returns the extracted object and inpainted background.
- The object becomes a draggable, resizable layer.
- Accept the result and save, or keep editing.
Halo is split into a frontend app and a backend AI engine.
flowchart LR
A[Mobile / Expo App] --> B[Frontend UI]
B --> C[Image Upload]
C --> D[FastAPI Backend]
D --> E[DepthAnything V2]
D --> F[MobileSAM]
D --> G[LaMa Inpainting]
D --> H[Inpainted result + cropped object]
H --> B
B --> I[Final edited image / download]
- Built with React Native + Expo
- Handles image selection, touch gestures, relight controls, and object placement
- Makes requests to the backend API
- Displays the edited image and layered object overlays
- FastAPI server
- Receives uploaded images
- Runs segmentation and inpainting jobs
- Returns processed image output and cropped segments
- Exposes status and download routes for each job
- Depth estimation: Depth Anything V2
- Segmentation: MobileSAM
- Background completion: LaMa inpainting
- Relighting: custom depth-based light adjustment pipeline
This separation keeps the app simple and lets the heavy AI work live in one place.
Halo/
├── assets/
│ ├── logo.png
│ ├── banner.png
│ └── demo.gif
├── Backend/
│ ├── jobs/
│ ├── Masking/
│ │ ├── MobileSAM/
│ │ └── mobile_sam.pt
│ ├── main.py
│ ├── requirements.txt
│ └── server.py
├── Depth-Anything-V2/
│ ├── checkpoints/
│ ├── depth_anything_v2/
│ └── ...
├── Frontend/
│ ├── assets/
│ ├── src/
│ ├── App.js
│ ├── package.json
│ └── ...
├── README.md
└── .gitignore
- React Native
- Expo
- Expo Image Picker
- React Native Gesture Handling
- React Native Safe Area Context
- Expo Linear Gradient
- Python
- FastAPI
- Uvicorn
- OpenCV
- Pillow
- PyTorch
- TorchVision
- transformers / diffusers / timm
- MobileSAM for segmentation
- Depth Anything V2 for depth-aware editing
- LaMa for inpainting
- Custom relighting logic for interactive light placement
- Python 3.10 or 3.11
- Node.js 18+ and npm
- Expo CLI
- Git
- Android Studio or a physical phone with Expo Go
- A working camera/photos permission flow for mobile
git clone https://github.com/YOUR_USERNAME/halo.git
cd halocd Backend
python -m venv .venv
source .venv/bin/activate
# Windows PowerShell:
# .\.venv\Scripts\Activate.ps1
pip install -r requirements.txtcd ../Frontend
npm installThis project expects model assets to exist in the workspace.
The app expects the checkpoint at:
Depth-Anything-V2/checkpoints/depth_anything_v2_vitl.pth
If the folder is present but the checkpoint is missing, download the required Depth Anything V2 weights and place them there.
The backend loads:
Backend/Masking/mobile_sam.pt
It also expects the MobileSAM source repository under:
Backend/Masking/MobileSAM/
Make sure both are present before starting the backend.
If the model files are missing, the server may still start, but object segmentation and inpainting features will not work correctly.
From the project root:
cd Backend
source .venv/bin/activate
# Windows:
# .\.venv\Scripts\Activate.ps1
uvicorn server:app --host 0.0.0.0 --port 8000 --reloadHealth check:
http://localhost:8000/health
cd Frontend
npx expo startThen scan the QR code with Expo Go, or run it in an Android Studio emulator / iOS simulator.
The app already includes backend host probing logic for common local setups, including:
- Android emulator:
http://10.0.2.2:8000 - Genymotion:
http://10.0.3.2:8000 - Local LAN IP fallback
If you're testing from a phone on the same Wi-Fi network, the app should usually auto-detect the backend host.
Upload a photo, then drag the light source around the canvas. Halo estimates scene depth and adjusts the lighting effect so it feels realistic instead of flat.
Tap the object you want to isolate. MobileSAM understands that region and cuts it out; LaMa inpainting fills the gap it leaves behind so the result looks intentional, not edited.
Once processed, the object stays as a separate layer above the image — move, resize, and reposition it freely, just like a cut-out sticker over a background. It's never fused into the base image, so it stays fully editable.
| Endpoint | Description |
|---|---|
POST /upload |
Upload an image file |
POST /upload_base64 |
Upload a base64-encoded image |
GET /status/{job_id} |
Check job status |
POST /relight |
Apply relighting to a job |
POST /segment |
Start segmentation for selected points |
GET /download/{job_id}/{filename} |
Fetch processed images |
GET /health |
Backend health check |
Backend fails to start
- Check your Python version is compatible
- Confirm all pip packages installed successfully
- Verify the model checkpoints are present
- Make sure the correct virtual environment is active
Mobile app can't connect to the backend
- Confirm your phone and PC are on the same Wi-Fi network
- Confirm the backend is running on port
8000 - Check your firewall isn't blocking requests
- Confirm Expo is serving your app correctly
Segmentation gives poor results
- Choose a clear object boundary
- Make sure the object is clearly visible in the image
- Avoid tiny or fuzzy selections
- Use a higher-quality source image
Missing model files
If you see warnings around MobileSAM or Depth Anything on startup, verify the model directories and checkpoint paths exactly match the expected locations above.
- More selection tools (box select, lasso)
- Rotate handles for object placement
- Undo/redo support
- Export quality presets
- Cloud deployment for AI processing
- More advanced object-aware editing tools
Contributions are welcome — whether it's a bug fix, a new feature, or just improving the docs.
- Fork the repo
- Create a branch:
git checkout -b feature/your-feature - Commit your changes:
git commit -m "Add your feature" - Push and open a pull request
If you're planning something larger, open an issue first so we can talk through the approach.
This project is under the repository's license. See the included license file for full terms.
Built for real-world image editing, designed for touch.
⭐ Star this repo if Halo saved you a trip to Photoshop.



