-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (54 loc) · 2.34 KB
/
Copy pathMakefile
File metadata and controls
62 lines (54 loc) · 2.34 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# ============================================================
# Makefile — SpatialScene3D project commands
# ============================================================
# Usage:
# make lint — format + type-check all Python files
# make test — run all pytest tests
# make demo — launch viser viewer on example scene
# make eval — run evaluation metrics
# make preprocess VIDEO=path/to/video.mp4 SCENE=scene1 — extract frames
# make clean — remove generated outputs
# ============================================================
.PHONY: lint test demo eval preprocess clean help
# Default: show help
help:
@echo ""
@echo " SpatialScene3D — 3D Scene Reconstruction from Monocular Video"
@echo " ======================================================="
@echo ""
@echo " make preprocess VIDEO=video.mp4 Extract + filter frames"
@echo " make demo SCENE=scene1 Launch interactive viewer"
@echo " make eval SCENE=scene1 Run evaluation metrics"
@echo " make lint Format + type-check code"
@echo " make test Run all tests"
@echo " make clean Remove generated outputs"
@echo ""
# --- Code Quality ---
lint:
black preprocess/ geometry/ semantics/ viewer/ eval/ tests/
isort preprocess/ geometry/ semantics/ viewer/ eval/ tests/
mypy preprocess/ geometry/ semantics/ viewer/ eval/ --ignore-missing-imports
# --- Tests ---
test:
pytest tests/ -v --tb=short
# --- Preprocessing ---
preprocess:
@if [ -z "$(VIDEO)" ]; then echo "Usage: make preprocess VIDEO=path/to/video.mp4 SCENE=scene1"; exit 1; fi
@if [ -z "$(SCENE)" ]; then echo "Usage: make preprocess VIDEO=path/to/video.mp4 SCENE=scene1"; exit 1; fi
python -m preprocess.extract_frames --video $(VIDEO) --output_dir data/$(SCENE)/frames
# --- Interactive Viewer ---
demo:
@if [ -z "$(SCENE)" ]; then echo "Usage: make demo SCENE=scene1"; exit 1; fi
python -m viewer.app --scene $(SCENE)
# --- Evaluation ---
eval:
@if [ -z "$(SCENE)" ]; then echo "Usage: make eval SCENE=scene1"; exit 1; fi
python -m eval.metrics --scene $(SCENE)
# --- Cleanup ---
clean:
rm -rf data/*/frames/
rm -rf data/*/colmap/
rm -rf data/*/masks/
rm -rf outputs/
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
find . -type f -name "*.pyc" -delete 2>/dev/null || true