Open dyollb opened 1 year ago
Merging #57 (dc79f5f) into main (9e176d7) will increase coverage by
1.36%
. The diff coverage is67.88%
.
@@ Coverage Diff @@
## main #57 +/- ##
==========================================
+ Coverage 53.90% 55.27% +1.36%
==========================================
Files 20 22 +2
Lines 1228 1328 +100
Branches 218 237 +19
==========================================
+ Hits 662 734 +72
- Misses 530 545 +15
- Partials 36 49 +13
Flag | Coverage Δ | |
---|---|---|
unittests | 55.27% <67.88%> (+1.36%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
src/segmantic/transforms/detect.py | 74.21% <ø> (ø) |
|
src/segmantic/transforms/ensemble.py | 100.00% <ø> (ø) |
|
src/segmantic/transforms/io.py | 86.30% <ø> (ø) |
|
src/segmantic/seg/monai_unet.py | 20.77% <50.00%> (+0.12%) |
:arrow_up: |
src/segmantic/seg/boundary_loss.py | 52.08% <52.08%> (ø) |
|
src/segmantic/transforms/distance.py | 81.35% <81.35%> (ø) |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
What do these changes do?
DistanceTransform
transform to compute (boundary) distance. The boundary distance can be used to compute a boundary/distance loss.The boundary loss currently integrates (sum) over boundary deviation (XOR(A_gt, A_pred)), see b):
While the pre-computation is on the CPU (using
scipy.ndimage.distance_transform_cdt
), the loss is evaluated using simple operations usingtorch.Tensor
s.Related issue/s
How to test
The distance transform is tested in
tests/transforms/test_distance.py
.The boundary loss should be tested
Checklist
pytest tests