Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
53546c1
Pathing issues fix + extract_video_frame util using opencv2 so as to …
HarenDev Mar 10, 2026
b47237d
Changed extraction path
HarenDev Mar 10, 2026
e43078c
Path validation fixes
HarenDev Mar 10, 2026
1a05b28
Video resizing occurs on CPU now to avoid big memory pressure on GPU
HarenDev Mar 11, 2026
305ec9a
"Online Mode" Batching
HarenDev Mar 11, 2026
918578a
debloated the init_video endpoint by moving them to their own functio…
HarenDev Mar 11, 2026
7d76a9c
(more than likely temporary) Trying to fix regressions on co_tracker
HarenDev Mar 11, 2026
3336290
update requirements
HarenDev Mar 21, 2026
4e141ff
remove add_support_grid for offline cotracker
HarenDev Mar 21, 2026
db6ff1e
Preparations for disk-based saving of mask frames
HarenDev Mar 26, 2026
63a0ca1
Added distinction for 20 series and 30+ series gpus
HarenDev Mar 27, 2026
c301d56
Add stateful video mask propagation backend
HarenDev Apr 22, 2026
c4e1d36
Sync video masker UI with backend state
HarenDev Apr 22, 2026
2deb4bb
First pass on adding Tauri implementation
HarenDev Apr 28, 2026
979ddb2
config and readme updates
HarenDev Apr 28, 2026
5378901
adding better transparency in the frontend for jobs
HarenDev Apr 28, 2026
2735c5f
More frontend qol
HarenDev Apr 29, 2026
31a8414
Questionable commit (saving progress here for today, this commit was …
HarenDev Apr 29, 2026
db59e2a
good checkpoint
HarenDev Apr 29, 2026
cfa7463
Checkpoint: CoTracker Streaming + Enhanced Frontend features
HarenDev Apr 30, 2026
adbbeac
split the components from the api into proper subdirs for better acce…
HarenDev Apr 30, 2026
431f67c
Necessary adjustments and tightening of job-state management
HarenDev Apr 30, 2026
e201694
ditto
HarenDev Apr 30, 2026
be60aca
ditto2
HarenDev Apr 30, 2026
c6112b6
Reorganizing the cpp & cleaning requirements
HarenDev Apr 30, 2026
315502e
Workarounds for Tauri
HarenDev Apr 30, 2026
02826e1
Update README & Added sam2 as a git submodule
HarenDev Apr 30, 2026
47b7822
Frontend Organization Step
HarenDev May 1, 2026
868ed80
Tracked points are now properly fed to the propagation job plus better
HarenDev May 1, 2026
991396f
Removed Target XXX block, Recent Activity, and moved Sync Debug back to
HarenDev May 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/frontend-ng-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: frontend-ng-ci

on:
pull_request:
paths:
- 'frontend-ng/data-engine/**'
- '.github/workflows/frontend-ng-ci.yml'
push:
branches: [main]
paths:
- 'frontend-ng/data-engine/**'
- '.github/workflows/frontend-ng-ci.yml'

jobs:
frontend-ng:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend-ng/data-engine
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: frontend-ng/data-engine/package-lock.json
- run: npm ci
- run: npm run build
- run: npm run test -- --watch=false
- run: npm run lint
- run: npm run format:check
24 changes: 20 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
__pycache__/
*masks/
video/
bedroom/
*.py[cod]
.venv/
build/
*.log
/bedroom/
/video/
!/backend/video/
!/backend/video/**
/backend/video/__pycache__/
/.sam2_frame_cache/
/backend/.data_engine_frames/
/backend/.data_engine_windows/
/backend/cache/
/backend/saved/
/backend/tests/bedroom/
/backend/tests/apple/
*masks/
*_tracked_*.mp4
*_tracking_*.json
apple_*
*.log
!apple.mp4
.DS_Store
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "sam2"]
path = sam2
url = https://github.com/facebookresearch/sam2.git
Binary file removed DataEngine
Binary file not shown.
48 changes: 37 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,56 @@

A complete data annotation and tracking system with both Python (FastAPI) backend and C++ interface. Supports video object segmentation using SAM 2 and point tracking using CoTracker.

Use `git clone --recursive https://github.com/Rumarino-Team/data-engine.git` when cloning the repo

## Install Dependencies

1. Create Python virtual environment using venv or Anaconda
1. Create Python virtual environment using venv or Anaconda (mainly written and tested on Python 3.12.12)
2. If you didn't use `--recursive` when doing git clone, then run `git submodule update --init --recursive` to make sure `sam2` is downloaded
3. Run `pip install -e .` while in `sam2` directory
4. Run `pip install -e ".[notebooks]"` while in `sam2` directory
5. Return to the data engine directory and run `pip install -r requirements.txt`

2. Run `git clone https://github.com/facebookresearch/sam2.git && cd sam2` outside of this directory
## Using the Backend
1. source the venv or Anaconda (depending on your shell)
2. Run `fastapi dev backend/api.py` to use the API manually with hot reload, Run `fastapi run backend/api.py` to use the static API

3. Run `pip install -e .` while in `sam2` directory
Add the `--host xxx.xxx.xxx.xxx` and/or `--port xxxx` args to change its ip and port

4. Run `pip install -e ".[notebooks]"` while in `sam2` directory
## Testing the Python Backend
1. Run `python3 backend/tests/tester.py` to test the API automatically and see results under `backend/tests/`

5. Return to the data engine directory and run `pip install -r requirements.txt`
## Angular Web Frontend
Mainly for developing the frontend, for production its recommended to use the Tauri Desktop env instead

## Testing via Python
1. Change into `frontend-ng/data-engine`
2. Install dependencies with `bun install` or `npm install`
3. Start the frontend with `bun run start` or `npm run start`
4. Keep the Python backend running separately

1. Run `fastapi dev backend/api.py` to test the API manually with hot reload, or run `python3 backend/tests/tester.py` to test the API automatically and see results under `backend/tests/`
The frontend defaults to `http://127.0.0.1:8000` for backend requests and also exposes a compact API URL override in the top bar.

## Tauri Desktop Frontend

1. Change into `frontend-ng/data-engine`
2. Install JavaScript dependencies with `bun install` or `npm install`
3. Install the Rust toolchain and Tauri prerequisites for your OS
4. Start the Python backend separately
5. Run `bun run tauri:dev` or `npm run tauri:dev:npm` for the desktop dev workflow
6. Run `bun run tauri:build` or `npm run tauri:build:npm` to produce a packaged desktop build

The Tauri app only wraps the Angular frontend. It does not bundle or launch the Python backend.

## Testing via C++
Currently this part is behind the python api's backend implementation so it isnt recommended to use

1. Install `nlohmann_json` and `curl` dev packages via your package manager

2. Change into `/cpp-backend-bindings`
2. Run `mkdir build`

3. Run `cmake build` to generate CMake build files

4. Run `cmake --build build` to compile project
5. Run `./build/src/BackendInterfaceTests` while the venv is sourced to test backend code


5. Run `./build/src/BackendInterfaceTests` while the venv is sourced to test backend code
## Structure
TBA
Binary file removed apple.mp4
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/tests.cpp → backend-interface-cpp/src/tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const std::string BASE_URL = "http://localhost:8000";
const std::string BEDROOM_ZIP_URL =
"https://dl.fbaipublicfiles.com/segment_anything_2/assets/bedroom.zip";
const std::string BEDROOM_DIR = "tests/bedroom";
const std::string TRACKING_VIDEO_PATH = "apple.mp4"; // relative to repo root
const std::string TRACKING_VIDEO_PATH = "backend/tests/apple/apple.mp4"; // relative to repo root

void runVideoTests(BackendInterface& backend) {
std::cout
Expand Down
Loading
Loading