Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Pyconkr 2018-upload


Published on

Pycon presentation

Published in: Science
  • Be the first to comment

  • Be the first to like this

Pyconkr 2018-upload

  1. 1. Understanding particle therapy data analysis and extension to scientific method KyungDon Choi MEDICIS-PROMED Early Stage Researcher (ESR) University of Pavia, Physics department Ph.D candidate
  2. 2. Index • Short description of Medical physics and its history • Particle therapy and importance of calculation • Fast Recalculation on GPU (FRoG) • What is modeling? • Deductive and inductive model • Extrapolation • Validation and limitations of modeling • Importance of domain knowledge and scientific method • Part 1 : Python based recalculation program research • Part 2 : Scientific data analysis
  3. 3. • Part 1 : Python based recalculation program research
  4. 4. What is medical physics? Definition: The study of the effects of ionizing radiation on the body and the methods for protecting people from the undesirable effects of the radiation. By the free dictionary Symbol of Ionizing Radiation
  5. 5. History of Medical Physics Wilhelm Conrad Röntgen Discovery of X-ray : 1895 Marie Skłodowska Curie Discovery of Radium : 1898 X-ray for injured soldiers in WWI Radium was used for cancer treatment Sir Godfrey Newbold Hounsfield Development of CT : 1979 Benedict Cassen Start of imaging in nuclear medicine: 1951 History of medical imaging
  6. 6. History of Medical Physics Wilhelm Conrad Röntgen Röntgenotherapy : 1900 Niels Finsen Phototherapy : 1986 Marie Skłodowska Curie Radium therapy : 1900~1915 History of therapy Brachytherapy External Beam Radiotherapy Unsealed source radiotherapy
  7. 7. Particle therapy • Using Hadron instead of photon • Less side effect due to physical charateristics • More expensive • Accurate but sensitive Proton Radiotherapy for Childhood Tumors: an Overview of Early Clinical Results Barbara Rombi et al. FRoG - A new calculation engine for physical and biological dose investigations with proton and carbon ion beams at CNAO KyungDon Choi et al (Drafted)
  8. 8. Risk of Particle therapy Conventional radiotherapy : Range is not critical • Linear Energy Transfer (LET) is not high due to range • Large numbers of fraction decrease the single fraction effect Hadrontherapy: Range is critical • Target area LET varies sensitively due to the range uncertainty • Small numbers of fraction increase the single fraction effect • Range issue is one of the hot topic in hadrontherapy How can we overcome this?
  9. 9. FRoG platform One of the solution is accurate calculation before treatment • Forward calculation for both CNAO and HIT • Aiming to match MC (FLUKA) predictions • Fast calculation with maximized GPU use • Research and clinical dose model calculation
  10. 10. FRoG workflow
  11. 11. ΔDv (%) FROG ΔD98 ΔD50 ΔD2 Total (10) 0.8±0.9 0.7±0.2 -1.0±0.4 No Range Shifter (5) 1.2±0.2 1.0±0.2 -1.1±0.2 Range Shifter (5) 0.4±1.4 0.3±0.2 -1.0±0.5 • 10 Head & Neck patients (5 with and 5 without Range Shifter) • FLUKA considered as the reference for patient calculations Within ~1% Good accuracy with Range Shifter Proton 96.5% Head Case Carbon 99.5% Prostate Case Gamma index in 3mm/2% criteria FRoG Validation
  12. 12. • Pydicom: A module for reading medical format • Pycuda: core calculation module for fast speed • Numpy and matplotlib: Matrix and display • PyQt4: User interface • Other modules are used for technical use Python modules used for FRoG
  13. 13. Python modules used for FRoG • DICOM (Digital Imaging and Communications in Medicine) format : standard for handling, storing, printing, and transmitting information in medical imaging. It includes a file format definition and a network communications protocol. Pydicom : python module that allows to read dicom files. This is one of the most important module in medical application.
  14. 14. Python modules used for FRoG
  15. 15. • 4 types of dicom files are required: CT files, RT_Dose, RT_Struct, RT_Plan – there are more dicom types such as MRI and etc. • CT files: CT image slice, Image size, Image Position Patient, Pixel Spacing, Patient position, location of image and etc Data in Dicom files CT slice Image Image SizeImage Position Patient
  16. 16. • RT_Dose: 3D dose matrix, Image size, Image Position Patient, Pixel spacing Data in Dicom files 3D Dose matrix Image Image SizeImage Position Patient
  17. 17. Data in Dicom files • RT_Struct: Contours of Target and Organs Target Contour Temporomandibular joint
  18. 18. • RT_Plan: information about dose delivery position for each energy, scan spot position, numbers of particles to deliver, isocenter position (Beam center position), beam angle and etc Data in Dicom files On-line estimations of delivered radiation doses in three- dimensional conformal radiotherapy treatments of carcinoma uterine cervix patients in linear accelerator Suman Kumar Putha et al MSPT : Motion Simulator for Proton Therapy Paul Morel
  19. 19. Python modules used for FRoG PyCUDA gives you easy, Pythonic access to Nvidia’s CUDA parallel computation API. import pycuda.driver as cuda import pycuda.autoinit from pycuda.compiler import SourceModule import numpy a = numpy.random.randn(4,4) a = a.astype(numpy.float32) a_gpu = cuda.mem_alloc(a.nbytes) cuda.memcpy_htod(a_gpu, a)
  20. 20. Python modules used for FRoG mod = SourceModule(""" __global__ void doublify(float *a) { int idx = threadIdx.x + threadIdx.y*4; a[idx] *= 2; } """) func = mod.get_function("doublify") func(a_gpu, block=(4,4,1)) a_doubled = numpy.empty_like(a) cuda.memcpy_dtoh(a_doubled, a_gpu) print a_doubled print a
  21. 21. • FRoG calculate based on RT_Plan information with different model • Commercial treatment planning system : Double Gaussian distribution • FLUKA simulation : Monte-Carlo based calculation • FRoG : Triple Gaussian distribution • Different model postulate different result • Monte-Carlo method is one of the highest accuracy but speed issue • FRoG achieved up to 300 times faster calculation time with good agreement Dicom data process
  22. 22. MEDICIS- PROMED European Union's Horizon 2020 research and innovation programme under grant agreement No. 642889
  23. 23. • Particle therapy is one of accurate radio therapy with low side effect • Some uncertainty of particle therapy can be handled with computational science • Good model postulate better realistic result • Python with GPU can perform fast calculation time Conclusion
  24. 24. • Part 2 : Scientific data analysis
  25. 25. Scientific activity, the aim of which is to make a particular part or feature of the world easier to understand, define, quantify, visualize, or simulate by referencing it to existing and usually commonly accepted knowledge. What is modeling? Lagrangian of Standard model Climate change model Climate Science Pam Knox, University of Georgia
  26. 26. • All data interpretation only can be done with models • Wrong model, wrong interpretation • Model validation is one of the hardest work in science Modeling and data analysis Free fall model and data Free fall model : S = ½ gt2 S = fall distance g = gravity acceleration constant t = time of fall Did we find the law of universe? We will find out later!!!
  27. 27. • Deductive method: A method of reasoning by which concrete applications or consequences are deducted from general principles or theorems are deduced from definitions and postulates Deductive and Inductive method Classical mechanics Fluid Mechanics Standard Model Etc……etc…..
  28. 28. • Inductive method: A method of reasoning by observed data and generalization. Deductive and Inductive method Support Vector Machine Neural Network Etc……etc…..
  29. 29. • Deductive method = physics and inductive method = statistics? No way!! Deductive and Inductive method Kepler’s lawJohannes Kepler 1571 - 1630 Tycho Brahe 1546 - 1601 Kepler’s law is made from accurate observation of Tycho Brahe Inductive method is as important as deductive method in physics
  30. 30. • process of estimating, beyond the original observation range, the value of a variable on the basis of its relationship with another variable. Extrapolation of model Extrapolation of deductive model c = 3*10E8
  31. 31. • Extrapolation of inductive model Extrapolation of model • Extrapolation is limited. This is why model validation is important
  32. 32. • Domain is one of the most important statement of scientific model • Due to extrapolation reason, importance of domain is even higher for inductive method Model validation : Limitation Scientific model is not the truth, it gives you the proper interpretation of observation
  33. 33. • This is the most important step for scientific model • Detailed steps are different in each different field of science. Model validation Deductive method Inductive method Validation Data – model validation Provide model validity Accuracy accurate approximated Domain knowledge requirement for modeling High Lower than deductive method Data interpretation Relatively obvious Not obvious
  34. 34. Model validation
  35. 35. Then why the scientific method? Archimedes of Syracuse 287 BC - 212 BC Poisonous mushrooms
  36. 36. Then why the scientific method? • Overfitting: More parameters than can justify data • Underfitting: less parameters than can justify data Example of underfitting Data cooking
  37. 37. • AI, Machine learning, Deep learning is not a brand new magic but one of the scientific method • Understanding of data and postulating phenomena is the very traditional work of scientists • Now a days, in some sector inductive method are abused and misunderstood due to lack of scientific knowledge • Before talking about trendy word, concentrate on scientific method – All trendy keyword are the subset of science Conclusion
  38. 38. Thank you for listening