Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

process_data.py 563 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  1. from .functions import *
  2. from .const_process_data import *
  3. t1, t2, flair, t1ce, seg = modalities_path(base_path)
  4. assert len(t1) == len(t2) == len(flair) == len(t1ce) == len(seg), 'Missing modalities in some patients'
  5. assert len(t1) == len(t2) == len(flair) == len(t1ce) == len(seg) > 0, 'The lists of paths are empty'
  6. num_samples: int = len(t1)
  7. data = load_raw_data(t1, t2, flair, t1ce, num_samples, input_shape)
  8. save_data(t1, t2, flair, t1ce, data)
  9. labels = load_raw_labels(seg, num_samples, input_shape, output_channels)
  10. save_label(labels, seg, file_type)
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...