UgurcanDogan commited on
Commit
e209eb4
·
verified ·
1 Parent(s): 7dfe1d4

model card and SHA256SUMS

Browse files
Files changed (2) hide show
  1. README.md +34 -0
  2. SHA256SUMS.txt +2 -0
README.md ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: onnx
4
+ tags: [medical-imaging, ct, segmentation, totalsegmentator, nnunet, webgpu, onnxruntime-web]
5
+ ---
6
+
7
+ # TotalSegmentator `total` (3 mm and 1.5 mm organs), ONNX rewritten for WebGPU
8
+
9
+ Weights of **TotalSegmentator** (Wasserthal J, et al. *TotalSegmentator: Robust Segmentation of 104 Anatomic Structures in CT Images.*
10
+ Radiol Artif Intell. 2023;5(5):e230024; https://github.com/wasserth/TotalSegmentator, Apache-2.0), taken from the ONNX export
11
+ **TS-Portable** (https://huggingface.co/sigjhl/ts-portable, revision `6f2de64246c72c2078d84a54567cfe19c8120562`, `fp32/`, Apache-2.0).
12
+ This repository redistributes them under the same licence with the graph rewritten so that ONNX Runtime Web's WebGPU execution provider
13
+ runs them fast. Weights are unchanged except for reordering. Used by the image station of Nuclear Medicine Explained
14
+ (https://nuclearmedicineexplained.com), where the CT is segmented entirely in the user's browser and never uploaded.
15
+
16
+ **For research and education only. Not a medical device.**
17
+
18
+ ## Changes (script: `araclar/yardimci/onnx_convtranspose_webgpu.py --conv2d --bas`)
19
+ 1. `ConvTranspose` (kernel = stride = 2, no padding) → `MatMul` + reshape/transpose (non-overlapping 3D depth-to-space).
20
+ 2. 3D `Conv` → one 2D `Conv` over depth slices concatenated along channels (onnxruntime-web 1.31 runs 3D conv with a naive kernel).
21
+ 3. Output head: `Softmax` over classes, then the probabilities of the classes listed in input `secili` (int64), the background, and the
22
+ maximum over the classes in input `diger` (int64) → output `olasilik` [1, S + 2, Z, Y, X]. Batch size is fixed to 1.
23
+
24
+ ## Verification
25
+ ONNX Runtime (CPU), random input, original vs rewritten logits: max |Δ| 3.7e-4 (scale 129, 3 mm) and 4.7e-5 (scale 27, 1.5 mm),
26
+ arg-max agreement 100 %; output head vs NumPy softmax/selection: max |Δ| < 1e-6. In the browser (Apple M6, WebGPU), on TCIA
27
+ PSMA-PET-CT-Lesions v2 CTs (CC BY 4.0): voxel agreement with the WebAssembly path 99.999 %, organ Dice 0.9994-1.0; against the
28
+ TotalSegmentator 1.5 mm CLI: liver 0.984, aorta 0.949, spleen 0.969, kidneys 0.955, bladder 0.972, heart 0.964.
29
+
30
+ ## Files (SHA-256)
31
+ ```
32
+ 57a9bf3ff76e7d5a8d8be546f8d493133a6cebb29a40001c0073c958d35d1435 total_3mm_297_webgpu2d_bas.onnx
33
+ a7e48c6213157d14858c9b0520d0cd75d5a3237f52c78f103cdc0ab7f8793aa2 total_1p5mm_291_organs_webgpu2d_bas.onnx
34
+ ```
SHA256SUMS.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ 57a9bf3ff76e7d5a8d8be546f8d493133a6cebb29a40001c0073c958d35d1435 total_3mm_297_webgpu2d_bas.onnx
2
+ a7e48c6213157d14858c9b0520d0cd75d5a3237f52c78f103cdc0ab7f8793aa2 total_1p5mm_291_organs_webgpu2d_bas.onnx