Skip to content

Commit

Permalink
Added array type transformation for subfunction preprocessing in orde…
Browse files Browse the repository at this point in the history
…r to reduce required disk space of batches
  • Loading branch information
muellerdo committed Oct 1, 2020
1 parent 1296de6 commit e31df88
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions miscnn/processing/preprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@ def prepare_sample_subfunctions(self, index, training):
# Run provided subfunctions on imaging data
for sf in self.subfunctions:
sf.preprocessing(sample, training=training)
# Transform array data types in order to save disk space
sample.img_data = np.array(sample.img_data, dtype=np.float32)
sample.seg_data = np.array(sample.seg_data, dtype=np.uint8)
# Backup sample as pickle to disk
self.data_io.backup_sample(sample)

Expand Down

0 comments on commit e31df88

Please sign in to comment.