Demo apps of C2C7 Cobb angle measure by AI presented in our paper (TBA).
Following two versions are available.
- Web app for easy use.
- Executable for more flexible uses.
- Open the web app
- Drop a lateral radiograph of cervical spine. Jpeg and PNG input is supported while dicom is not very well tested.
- Click the measure button.
- Wait for 5 - 30 seconds.
Input | Result |
---|---|
Command line programs.
- c2c7angle: Input one image and output one image.
- c2c7batch: Input a folder/directory, process all images in the input and output the results.
Executable varsion is coded in rust. Some functions are exported as wasm for the web app version.
The model needs to be compatible with WebGL backend.
- Use
torch.onnx.export
to export to ONNX model - Apply
resize_align_corners.py
to change resize mode to align_corners.pytorch_half_pixel
is not available in WebGL? - Apply onnx-simplifier to optimize away nodes unavailable in WebGL. e.g.
python -m onnxsim model.onnx simplefied.onnx --input-shape 2,1,768,768 --dynamic-input-shape
(Note to myself) Do not add the model to the repository. Keep the repo lean.
Weights can be found in google drive.
Download weights before running tests.
curl -L "https://drive.google.com/uc?export=download&id=1B1EeG38_WTZ42Qg-KlUpnThhEHJQDwkS" -o c2c7.onnx