Algorithms/Segment/Training not work
xuchao-25824839 opened this issue · 0 comments
xuchao-25824839 commented
Expected Behavior
Traning done then output model
Current Behavior
- [\d+].xml is no valid DICOM
- ValueError: could not broadcast input array from shape (332,360,360) into shape (512,512,512)
Possible Solution
Steps to Reproduce
- export COMPOSE_FILE=local.yml && docker-compose up
- docker exec -it concept-to-clinic_prediction_1 bash
- python
import matplotlib
matplotlib.use('Agg')
from src.algorithms.segment.src.data_generation import prepare_training_data
prepare_training_data()
from src.algorithms.segment.src.training import train
train()
output
ERROR:root:69.xml is no valid DICOM
Traceback (most recent call last):
File "", line 1, in
File "/app/src/algorithms/segment/src/training.py", line 78, in train
:CUBOID_IMAGE_SHAPE[2]]
ValueError: could not broadcast input array from shape (332,360,360) into shape (512,512,512)
Context (Environment)
Detailed Description
FIY concept-to-clinic/docs/design-doc.html
Training
In order to train the segmentation model, the following steps are necessary:
- Download the LIDC dataset.
- Put it in
tests/assets/test_image_data/full
optionally using a symbolic link - pylidc wraps the LIDC dataset and provides information
such as annotated nodules, visualization methods etc. You must create a.pylidrc
file that specifies
the path to your local LIDC dataset like so - Run prepare_training_data
to generate the binary segmentation masks inprediction/src/algorithms/segment/assets
. - Finally, to train the model run:
from src.algorithms.segment.src.training import train train()
Possible Implementation
Checklist before submitting
- I have confirmed this using the officially supported Docker Compose setup using the
local.yml
configuration and ensured that I built the containers again and they reflect the most recent version of the project at theHEAD
commit on themaster
branch - I have searched through the other currently open issues and am confident this is not a duplicate of an existing bug
- I provided a minimal code snippet or list of steps that reproduces the bug.
- I provided screenshots where appropriate
- I filled out all the relevant sections of this template