Merge commit 'd803bfe2b1fe7f5e219e50ac20d6801a0a58ac75' as 'vendor/ruvector'

This commit is contained in:
ruv
2026-02-28 14:39:40 -05:00
7854 changed files with 3522914 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
# Test Fixtures for ruvector-scipix
This directory contains test fixtures including sample images, expected outputs, and configuration files for unit and integration tests.
## Directory Structure
```
fixtures/
├── images/ # Test images
│ ├── simple/ # Simple equations
│ ├── complex/ # Complex expressions
│ ├── matrices/ # Matrix expressions
│ └── symbols/ # Special mathematical symbols
├── expected/ # Expected LaTeX outputs
├── configs/ # Test configuration files
└── README.md # This file
```
## Test Images
### Simple Equations
- `simple_addition.png` - Basic x + y
- `simple_fraction.png` - Simple fraction 1/2
- `quadratic.png` - Quadratic formula
### Complex Expressions
- `nested_fraction.png` - Nested fractions
- `integral.png` - Integral with limits
- `summation.png` - Summation notation
### Matrices
- `matrix_2x2.png` - 2x2 matrix
- `matrix_3x3.png` - 3x3 matrix
### Special Symbols
- `greek_letters.png` - Greek letters
- `operators.png` - Mathematical operators
## Expected Outputs
Each test image has a corresponding `.txt` file in the `expected/` directory containing the expected LaTeX output.
## Adding New Fixtures
1. Add the test image to the appropriate subdirectory
2. Create a corresponding expected output file
3. Update test cases in the unit tests to reference the new fixture
## Generating Test Images
You can use the synthetic data generator in `tests/testdata/synthetic_generator.rs` to create test images programmatically.
## Notes
- All test images should be in PNG format
- Expected outputs should use standard LaTeX notation
- Keep image sizes reasonable (< 1MB) for fast test execution

View File

@@ -0,0 +1,18 @@
[preprocessing]
target_dpi = 300
max_dimension = 4096
denoise_strength = 0.5
contrast_enhancement = true
auto_rotate = true
binarization_method = "adaptive"
[model]
model_path = "models/test_model.onnx"
device = "cpu"
batch_size = 4
confidence_threshold = 0.7
[output]
format = "latex"
include_confidence = true
include_geometry = false

View File

@@ -0,0 +1 @@
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

View File

@@ -0,0 +1 @@
x + y

View File

@@ -0,0 +1 @@
\frac{1}{2}