dyollb / segmantic

Semantic segmentation and image-to-image translation based on AI
https://dyollb.github.io/segmantic/
MIT License
1 stars 3 forks source link

✨added cross-validation capabilities #46

Closed Konohana0608 closed 2 years ago

Konohana0608 commented 2 years ago

What do these changes do?

The changes should enable the user to run a cross validation. At the moment it is with the old implementation style using .json files. Will need to adapt the code to work with the newer .yamal files instead.

Related issue/s

How to test

Checklist

codecov[bot] commented 2 years ago

Codecov Report

Merging #46 (37c9799) into main (61a3762) will increase coverage by 0.82%. The diff coverage is 41.66%.

@@            Coverage Diff             @@
##             main      #46      +/-   ##
==========================================
+ Coverage   19.48%   20.30%   +0.82%     
==========================================
  Files          47       47              
  Lines        2392     2531     +139     
  Branches      395      419      +24     
==========================================
+ Hits          466      514      +48     
- Misses       1900     1990      +90     
- Partials       26       27       +1     
Flag Coverage Δ
unittests 20.30% <41.66%> (+0.82%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/segmantic/commands/monai_unet_cli.py 50.98% <12.50%> (-17.60%) :arrow_down:
src/segmantic/seg/monai_unet.py 22.08% <13.33%> (-3.65%) :arrow_down:
src/segmantic/seg/dataset.py 88.33% <90.32%> (+2.96%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 61a3762...37c9799. Read the comment docs.

dyollb commented 2 years ago

why don't you write a little test in tests/seg/test_dataset.py to make sure the dataset kfold splitting is doing what you expect?

Ps. the magic variable tmp_path: Path e.g. here is a temporary directory path, where you can create files and they will be cleaned up after the test has run. Ps2. this will also solve your coverage test failure with something that is meaningful.

dyollb commented 2 years ago

LGTM