README: MeshAugmentor and its prebuilt libraries
Browse files- README.md +2 -1
- training/README.md +9 -3
README.md
CHANGED
|
@@ -73,7 +73,8 @@ not see detector errors; judge the result by eye.
|
|
| 73 |
|
| 74 |
- `rectify.py` β the pipeline; `ecglib/` β its building blocks; `models/` β the four ONNX networks;
|
| 75 |
`examples/` β the photos above; `app.py` β the web demo (Gradio).
|
| 76 |
-
- `training/` β synthetic data generators and training scripts of the networks (see `training/README.md`)
|
|
|
|
| 77 |
|
| 78 |
## License
|
| 79 |
|
|
|
|
| 73 |
|
| 74 |
- `rectify.py` β the pipeline; `ecglib/` β its building blocks; `models/` β the four ONNX networks;
|
| 75 |
`examples/` β the photos above; `app.py` β the web demo (Gradio).
|
| 76 |
+
- `training/` β synthetic data generators and training scripts of the networks (see `training/README.md`);
|
| 77 |
+
photos are rendered with [MeshAugmentor](https://github.com/pashaalex/mesh_augmentor).
|
| 78 |
|
| 79 |
## License
|
| 80 |
|
training/README.md
CHANGED
|
@@ -11,13 +11,18 @@ run on CPU, the window networks and the mask need a CUDA GPU.
|
|
| 11 |
| `mask.onnx` | `python3 build_masks.py` (6 000 + 500 pages) | `train_mask.py` (40 epochs, exports ONNX) |
|
| 12 |
| `lattice.onnx` | generated on the fly (`lattice_points.py`) | `train_lattice.py` (30 000 steps, exports ONNX) |
|
| 13 |
|
| 14 |
-
Setup
|
| 15 |
|
| 16 |
```
|
| 17 |
pip install -r requirements.txt
|
| 18 |
-
make -C renderer # C++ renderer -> renderer/mesh_render.so
|
| 19 |
```
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
The seeds, sizes and hyper-parameters are those of the published models. The published models were
|
| 22 |
trained on an earlier version of these generators that drew ECG traces from recorded ECGs and used
|
| 23 |
another hand-writing font; everything else is unchanged. Bitwise reproducibility of GPU training is
|
|
@@ -25,7 +30,8 @@ not expected.
|
|
| 25 |
|
| 26 |
## Files
|
| 27 |
|
| 28 |
-
- `renderer/` β C++ ray-tracing mesh renderer (thin lens, distortion, disk light, shadows) and its
|
|
|
|
| 29 |
- `sheet_geometry.py` β developable sheet: profile curve with cylinder / wave / ridge / crease / curl / fold components.
|
| 30 |
- `ecg_synth.py` β synthetic 12-lead ECG (five Gaussian waves per lead, no data files).
|
| 31 |
- `ecg_paper.py` β flat ECG sheet texture (grids, paper, ECG traces, text, stains).
|
|
|
|
| 11 |
| `mask.onnx` | `python3 build_masks.py` (6 000 + 500 pages) | `train_mask.py` (40 epochs, exports ONNX) |
|
| 12 |
| `lattice.onnx` | generated on the fly (`lattice_points.py`) | `train_lattice.py` (30 000 steps, exports ONNX) |
|
| 13 |
|
| 14 |
+
Setup:
|
| 15 |
|
| 16 |
```
|
| 17 |
pip install -r requirements.txt
|
| 18 |
+
make -C renderer # C++ renderer -> renderer/mesh_render.so (Linux)
|
| 19 |
```
|
| 20 |
|
| 21 |
+
The renderer is [MeshAugmentor](https://github.com/pashaalex/mesh_augmentor). Instead of building it,
|
| 22 |
+
take the prebuilt library from its [release 0.1.0](https://github.com/pashaalex/mesh_augmentor/releases/tag/0.1.0)
|
| 23 |
+
and put the files from `mesh_augmentor/_lib/` into `renderer/`: `mesh_render.so` (Linux) or
|
| 24 |
+
`mesh_render.dll` with the three MinGW runtime DLLs next to it (Windows).
|
| 25 |
+
|
| 26 |
The seeds, sizes and hyper-parameters are those of the published models. The published models were
|
| 27 |
trained on an earlier version of these generators that drew ECG traces from recorded ECGs and used
|
| 28 |
another hand-writing font; everything else is unchanged. Bitwise reproducibility of GPU training is
|
|
|
|
| 30 |
|
| 31 |
## Files
|
| 32 |
|
| 33 |
+
- `renderer/` β C++ ray-tracing mesh renderer from MeshAugmentor (thin lens, distortion, disk light, shadows) and its
|
| 34 |
+
ctypes binding.
|
| 35 |
- `sheet_geometry.py` β developable sheet: profile curve with cylinder / wave / ridge / crease / curl / fold components.
|
| 36 |
- `ecg_synth.py` β synthetic 12-lead ECG (five Gaussian waves per lead, no data files).
|
| 37 |
- `ecg_paper.py` β flat ECG sheet texture (grids, paper, ECG traces, text, stains).
|