Skip to content

Commit 8a54b96

Browse files
committed
docs: overhaul README with supported expressions table and quickstart
1 parent d13cc1e commit 8a54b96

1 file changed

Lines changed: 48 additions & 33 deletions

File tree

README.md

Lines changed: 48 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,74 @@
1-
## Edge Vision Mathifyer
2-
## Edge Vision + Math Engine (Quickstart Bundle)
1+
# Edge Vision + Math Engine
32

4-
This bundle contains two self-contained projects:
3+
[![CI](https://github.com/smakde/Edge-Vision-Mathifyer/actions/workflows/ci.yml/badge.svg)](https://github.com/smakde/Edge-Vision-Mathifyer/actions/workflows/ci.yml)
4+
[![Python 3.12](https://img.shields.io/badge/python-3.12-blue.svg)](https://www.python.org/downloads/)
5+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
56

6-
1. **edge-vision/** — Real-time, privacy-preserving computer vision demo on local hardware with OpenCV.
7-
- Streamlit UI that plays a sample video, measures FPS, and (optionally) uses a TFLite model if you add one.
8-
2. **math-engine/** — SymPy + NumPy solver for calculus/combinatorics/probability, with a Streamlit UI and Monte Carlo verification.
7+
Two self-contained projects in one repo:
98

10-
> Tip: Use two terminals (or tabs) to run both UIs.
9+
- **Math Engine** — symbolic solver with step-by-step explanations and Monte Carlo verification (SymPy + NumPy + SciPy)
10+
- **Edge Vision** — multi-algorithm computer vision demo running 4 CV pipelines side-by-side on local video (OpenCV)
1111

1212
---
1313

14-
## 0) Create Python env (recommended)
14+
## Math Engine
1515

16+
Symbolic solver supporting integrals, derivatives, limits, combinatorics, and probability — with LaTeX output and Monte Carlo cross-checks.
17+
18+
### Quickstart
1619
```bash
17-
python3 -m venv .venv && source .venv/bin/activate
18-
# Windows: .venv\Scripts\activate
20+
cd math-engine
21+
pip install -r requirements.txt
22+
streamlit run streamlit_app.py
1923
```
2024

25+
### Supported expressions
26+
27+
| Type | Example |
28+
|------|---------|
29+
| Indefinite integral | `integral(sin(x)^2, x)` |
30+
| Definite integral | `integral(x^2, x, 0, 1)` |
31+
| Derivative | `diff(exp(x)*log(x), x)` |
32+
| nth-order derivative | `diff(x^5, x, 3)` |
33+
| Limit | `limit(sin(x)/x, x, 0)` |
34+
| Limit at infinity | `limit((1 + 1/x)**x, x, oo)` |
35+
| Combinations | `C(52, 5)` |
36+
| Permutations | `P(5, 2)` |
37+
| Factorial | `factorial(10)` |
38+
| Dice probability | `P(sum_{i=1..3} die() >= 10)` |
39+
| Binomial CDF | `P(binomial(10, 0.3) >= 4)` |
40+
| Normal tail | `P(normal(0, 1) > 1.96)` |
41+
42+
All probability results include exact + Monte Carlo verification with 95% CI.
43+
2144
---
2245

23-
## 1) Edge Vision — Run
46+
## Edge Vision
47+
48+
Runs 4 CV algorithms simultaneously on a local video, with per-algorithm controls and processing metrics.
2449

50+
### Algorithms
51+
- **Canny edges** — tunable low/high thresholds, edge density metric
52+
- **Sobel gradient** — magnitude map, mean gradient metric
53+
- **Contour detection** — Otsu threshold + contour filtering by area
54+
- **CLAHE equalisation** — adaptive histogram equalisation, contrast before/after
55+
56+
### Quickstart
2557
```bash
2658
cd edge-vision
2759
pip install -r requirements.txt
28-
# Run Streamlit dashboard (plays sample video and shows FPS)
2960
streamlit run apps/streamlit_app.py
3061
```
31-
- Add your model at `edge-vision/models/model.tflite` (optional). If present, the app will try to run TFLite inference.
32-
- Otherwise, it will fall back to a simple OpenCV edge detector as a placeholder.
3362

34-
CLI benchmark (optional):
35-
```bash
36-
python tools/benchmark.py --video data/sample.mp4
37-
```
63+
Add your own video at `edge-vision/data/sample.mp4` or use the included sample.
3864

3965
---
4066

41-
## 2) Math Engine — Run
67+
## Tests
4268

4369
```bash
44-
cd math-engine
45-
pip install -r requirements.txt
46-
streamlit run streamlit_app.py
70+
pip install pytest pytest-cov scipy opencv-python-headless sympy numpy
71+
PYTHONPATH=math-engine:edge-vision pytest math-engine/tests/ edge-vision/tests/ -v
4772
```
4873

49-
Examples in the UI:
50-
- Calculus: `integral(sin(x)^2, x)`
51-
- Probability: `P(sum_{i=1..3} die() >= 10)`
52-
- Combinatorics: `C(10,3)`
53-
54-
---
55-
56-
## Notes
57-
58-
- `tflite-runtime` is platform-specific; we do **not** auto-install it. If you need it, install for your device (Raspberry Pi/ARM, etc.).
59-
- Everything runs locally and offline. Replace `data/sample.mp4` with your own footage for edge-vision.
74+
38 tests — 21 engine (integrals, derivatives, limits, combinatorics, probability) + 17 CV pipeline (shape, dtype, edge cases).

0 commit comments

Comments
 (0)