









































Studia grazie alle numerose risorse presenti su Docsity
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
Questa pagina non è visibile nell’anteprima
Non perderti parti importanti!










































Side 1
We need a lot of information from the images: segmentation, registration, diagnostics. The images have many variations and complexity èno analytical solution. For this, the ML helps as a solution to these problems.
The algorithm does the image processing, from which we get information. This information gave restrictions on the ML, etc. From the processing we get a feature and can segment the image to define areas.
Supervised learning is divided into generative (determining distribution behind the data) and discriminative (only division relevant) models. There is no general answeras to when one is the better choice over theother
From data x, close state y. Discrete space = classification, continuous space = regression. For the solution we have:
Problem : Overfitting. Therefore, the performance on a test set is important with evaluation by a loss function. But minimizing the risk alone is not enough to è make regularization sterm important. Big regulator = believe more in regulator, smaller = believe more in data + risk.
For this, two ways: Engineering path = Choose loss and regulator based on the problem. Optimization path = ERM can be turned into convex problem a lot of èpotential.
Side 2
Important convex functions are negative entropy, non-normalized negative entropy, and hinge loss. In the case of convex sets, parts of it can be viewed with slicing (quasi-convex).
In order to ensure convex behavior, one does:
Mengenoperationen
Funktionsoperationen
The Taylor series development 1st order can be considered as a global lower limit of a function. This allows the minimum to be determined. However, if the function is not smooth and has angular transitions, subgradients are used. These exist even in non-differentiable places. Important feature: A convex function is at least subdifferentiable everywhere.
Here, the maximum non-binding hyper-separation line is maximized. This works well with linearly separable data. In general, however, the data is not always exactly linearly separable. Therefore, Slack variables are used and allow the margin to be exceeded.
However, since the Slack variables can go against infinity otherwise, a regulation is inserted. As a result, a good classification is found and one is willing to pay the price for the others.
The condition can be changed to Xi and inserted into the main condition. This gives you a similar optimization trick as with the Hingeloss (max(0.1-x)).
To select the loss function you can use the binary loss. However, this is non-convex,which is why a convex upper limit can be used (hinge).
We want to localize our function. For this we have our model, which can calculate a function value and the gradient for each given point and a lower limit of the function. Importantly, Taylor has a global lower limit for our function. Through the tangents, we know where our function does not run along. Lowest intersection = new lower limit.
Side 4
The disappearing gradient occurs because the further we do the backpropagation, the smaller the changes become. The changes should be large at best, but become less from layer to layer to the front. As a result, the neurons in the first layers learn much more slowly than the neurons of later layers. The product from many such derivative stermes reduces the product exponentially. Especially with Sigmoid, where the maximum of the derivative is 0.25.
ReLU has the property that it can prevent the disappearing gradient.max(0,x) and the derivation leads to constant learning. As a result, it can achieve a very good regularization in comparison. The learning success can be seen in the respective layers.
Here we exploit a convolutional matrix that focuses only on certain information for our given matrix and can extract it.
Furthermore, nonlinearities are used and max-pooling allows the size of the layers to be redefined.
We are interested here in the distributions of the class. Bayes is used for this and we look at all possible cases under assumptionsas to how data can be generated from it. Assumptions that cover multiple paths that are consistent with the data are more plausible and appropriate.
The predictions can be all possible values. Every decision closes one of these paths. The data can be many cases. Each observation closes one of these possible cases.
And start again at 1., until evaluation satisfied.
We know that there are 4 balls in one pocket. They can be either blue or white. The assumption is 3 white and 1 blue. We observe that the first draw is blue. So the others can be white. After that, we draw a white ball and expand our model accordingly at all nodes according to our assumption. Given the observed data, only a few paths are possible, rest can be eliminated.
Subsequently, the paths of the possible cases are determined. Representations are normalized to probabilities, because better representation.
Side 5
Design the model based on the given data. Bayes then converts the prior information to posterior-W. The order of the data does not matter, as the model is not yet relevant to it. Each posterior-W is a prior for the next observation and vice versa.
But Bayes is only optimal for the model, not for theworld. Therefore, the model must be monitored, as errors can occur.
As a metric they often used the Area under curve-Score (AUC). In comparison with dermatologists NN differ in their result. If there are cases where its difficult to classify the case, the programmer can use a case differentiation to classify it to one class and do further investigations. A NN must ŐĞŶĞƌĂůŝnjĞǁĞůůĂŶĚĚŽĞƐŶ͛ƚĚŝĨĨĞƌƚŚĞƐĂŵĞ as a doctor has the possibility to.
CAI is a field of research and practice, where medical interventions (=Eingriffe/Maßnahmen) are supported by computerbased tools and methodologies. It got more popular because the operations are moving from an open standard to a closed (minimalinvasiv) one.
Well known venues are MICCAI , CARS (Computer Assisted Radiology and Surgery). Some journals are International Journal of CARS , Medical Image Analysis , and IEEE Transactions on Medical Imaging.
CAI is used in a huge variety of fields like
x Localization (instruments, patients) x Planning (of interventions, invasive) x Simulation and training system x Robotics x Clinical evaluation
Furthermore, its used for many kinds of intervention like
x Neuro x Orthopaedic x Spinal x Cardiovascular x Thoracic
Specifications
x Time-constraint : AI must be efficient. It must fulfill the job as fast as possible and ĚŽĞƐŶ͛ƚ make mistakes. x Knowledge of procedural data: The generalization of data must be known x Dynamic or environment : AI must be robust for its usage in a dynamic situation. Not every patient has the same conditions x FLEXIBILITY : o Missing input data: not all kind of sensors are being used continuously. AI must be flexible in these situations o Online and continuous learning: important for the property of being robust o Uncertainty handling: BIG DEAL o Risk aversion: a false decision could lead to the death of the patient
The motivation is coming from the idea of a navigation for minimally invasive procedures. They use flexible instruments with non-linear paths. The big difference between an open and minimally invasive procedure is the view. The minimally invasive approach has no line-of-sight on the surroundings.
Here we use two kinds of data: CAD models ( simulations ) and real x-ray images. We mix the real data with the simulations (= Domain adaption/shift). With this we can reach better results instead of using only one. Otherwise, the NN would perform bad on real data.
Design (pose estimation and end-to-end)
x Using a custom loss function for individual contributions form translation, orientation, and image projection o Often seen in papers: custom loss functions x CNN has 5 convolutions, 2 fully connections, ReLU x Stochastic gradient descent x Xavier initialization
The process of automization/assistance/visualizations requires the instrument pose. It allows the flexibility of gear and robotic manipulation amplification.
An example of reality is the daVinci Surgical Robot. The image is RGB a has manually annotated circles with joint positions. The annotations of the tool positions are calculated with a probabilistic map (one per tool, one per joint).
x Combine the recognition and pose estimation into a single step/network (end-to-end network) x Full problem ( where is which tool ) Î use probability maps for each tool and joint x Decompose to tool classification and pose estimation o Recognition is Classification (is there a tool of type m) ܲ ሺܶ (^) ሻ o Pose with probability map (where is the joint n of Tool m) ܲ ሺܬ^ ^ ȁܶ (^) ሻ o Using independence:
ܲ^ ሺܶ^ ଵǡ ǥ ǡ ܶெǡ ܬଵ^ ଵǡ ǥ ܬଵ^ ேǡ ǥ ܬெ^ ଵ^ ǡ ǥ ǡ ܬெ^ ேሻ^ ൌ ෑ ܲ ሺ ܶሻ
ෑ ෑ ܲ ሺܬ^ ^ ȁܶ (^) ሻ
o As the loss function, we use the cross entropy. Because the prediction and ground truth will coincide o The cross entropy is a measure for the quality of a probabilistic model x CNN design: 5 convolutions, 5 deconvolutions (U-shape)
The computer-assisted surgery represents a new type of generation for surgeries. It helps the transition from open surgeries to computer-assisted, minimal invasive operations. Besides that, it also helps in the field of quantize analysis and the understanding what is really happening. SPM offers a unique way to quantize and evaluate surgeries.
There are many different applications :
x The Education of surgeons x The planning of a surgery x Situation awareness: what is happening x Efficiency and quality of care
The field of SPM can be differentiated in 5 fields: Modelling, Acquisition of Data, Analysis , Application and Validation-Evaluation. But SPM is represented primally in the analysis-field. The most applications are in endoscopic-laparoscopic surgery and Neurosurgery and is often an intra-operative assistance and evaluation of tools/systems.
This is the go-to example because this surgery has the most development for robotics and imaging. The old ways used a multidimensional time series for the tool presence signals which where used. For the presence they used a Hidden Markov Model (no deep learning) to elaborate the timestamp of the surgery. The usage of the tools by the surgeons is highly related with the phase of the surgery.
Summary (take home)
x Presence of Surgical tools highly related with phase x Tools are physical representation of the functions performed by surgeons
There are many problems in the detection of the tools:
x Lighting x Changes of perspective x No equal distribution of showing the tool (some were always used, other not)
In competition you always must have Sampling, Architecture and Smoothing
x The Imbalance ratio per label (IRpL) measures individual label imbalance
x = 1.0 for the majority (häufigstes) label, > 1.0 for other labels
Take home message
x Although, we can use CNN off the shelf, but we must not disregard the basic ML assumptions. x Understanding of the problem can help in better model formulation. o E.g., ZIBNet design for endoscopic videos. x Ensemble always triumphs in competitions
Each Pixel has a Label. They can be summarized as regions with different rules:
Segmentation helps in different medical fields:
x Visualization x Planning (input - > Segmentation - > 3D Model Extraction - > Trajectory Planning x Monitoring o i.e., Volume and Shape of an organ x Variation of Organs, computational anatomy, functional MRI/CT
There are many quality metrics to consider: First the metric about the Model to Ground Truth
x Dice coefficient: ܥ ൌ ଶ ȁሺȁȁାתȁொொȁȁሻ ൌ (^) ଶ் ାଶ்^ ிାிே x Jaccard coefficient: ܥௗ ൌ ȁ ȁתொொȁȁ (Oversegmentation to Undersegmentation)
x Volume overlap: ܥை௩ ൌ (^) ୪୬ȁሺȁתȁொǡȁொȁȁሻ
Distance to surface:
x Mean surface distance (Chamfer distance): ݀ ሺܭǡ ܮሻ^ ൌ ଵ σ^ ୀଵหȁܭሺ݇^ ሻ^ െ ܮሺ݈^ ሻȁห x Mean symmetric surface distance: ݀ ሺܭǡ ܮሻ ൌ ௗሺǡሻା ଶௗሺǡሻ x Hausdorff distance: ݀ ுሺܺ ǡ ܻ ሻ ൌ ሼ ௫א ௬^ א ݀ ሺݔǡ^ ݕሻ^ ǡ^ ௬א ௫^ א ݀ ሺݔǡ^ ݕሻሽ
But metrics are not good alone because they are objective and quantitative- not qualitative
Automated Cardiac Diagnosis
Segment ventricular endo-/epicardium, classify heart. To improve computerized cardiac analysis
Brain Tumor Segmentation
Segmentation of brain tumors, predict overall survival, uncertainty segmentation. To detect, monitoring and analysis
Thoracic Organs at Risk in CT Images
Organs at risk segmentation, lung cancer. To radiation therapy planning
COVID-19-20 Segment lung lesions of COVID-19. Detect pulmonary embolism
Artefact detection in video endoscopy
Artefact detection with localization and labeling. Region segmentation for precise boundary. Diagnosis and treatment in hollow organs
Pre-processing
x Cropping: remove all unnecessary input e.g. Air x Resampling: resample all image to the median spacing x Normalization: based in dataset statistics + clip for [0.5, 99.5] percentiles x Data-augmentations: Rotation, scaling, elastic deformations, gamma correction and flips
Loss
x ܮ௧௧ ൌ ܮௗ ܮா (Cross-Entropy not well for borders, Dice better)
Postprocessing
x Only use the largest connected component and remove all others
Cascade
x min. 4 times more input voxels as can be processed form the 3D Unet=> use a 2D Unet x Feed the output of 2D Unet as additional input to the 3D Unet, but erode/dilate segmentation randomly
Convolutions encode translation invariance Î efficiency and scalability. Major problem : the receptive field depends on kernel size and number of convolutional layers Î Convolutions are locality sensitive and lack global understanding.
Why Transformer? Efficient and Self-Attention is a simple and scalable way to learn the inductive biases. Problem with that: very expensive for high dimensional inputs
Self-Attention
x Basic Building Block of Transformers x Build 3 distinct representations x Then use the equation: ݊݅ݐ݊݁ݐݐܣ ሺܳ ǡ ܭǡ ܸ ሻ ൌ ݔܽ݉ݐ݂ݏ ൬ொ
ඥௗೖ^ ൰^ ݒ x Multiple times, different Blocks
x Use multiple Transformer Blocks o Multi-ŚĞĂĚƚƚĞŶƚŝŽŶ͕EŽƌŵĂůŝnjĂƚŝŽŶ>ĂLJĞƌƐĂŶĚD>W͛Ɛ x Transformer scale very well for large amounts of data, but quadratic in the input length n. o For an Image n = H x W! x Vision Transformer: picture is divided in patches o Transformer says, where the patch does belong o Only cares about global context Î Lacks local details for segmentation x Î Swin Transformer build hierarchical feature map o Transfer learning possible but maybe not totally usable
x For preoperative planning x For 3D printing x Problem: CNNs do pixelwise segmentation o Counter-measures: o CRFs (still pixelwise) o Post processing (graph cut, ASM, etc..)
x ASM = Statistical Shape Model (SSM) + Appearance Model (AM) x SSM: landmark vector describes the organ x AM: learn an appearance (local gradient) at each point of a landmark vector
x Steps/border Î Augmentation for training (Random fields/Markov fields) x Transformer biggest potential in the feature (when trained in different domains)
You evaluate the model on out-of-distribution (OOD) inputs which do not belong to any of the existing classes. This shows if the confidence of i.i.d. inputs is bigger than o.o.d. inputs.
Some measurements are Max confidence or the Entropy
ImageNet-C
Typically we assume training and test are i.i.d. from the same distribution. In practice, this rule is often violated for test data and distributions shift. In ImageNet-C you vary the input by simulate different types of corruption with varying intensity
Calibration measures how well predicted confidence (probability of correctness) aligns with the observed accuracy. From this graph you can calculate the Expected Calibration Error (ECE):
x Computed as the average gap between accuracy and predicted probability for S buckets (bar) x ŽĞƐŶŽƚƌĞĨůĞĐƚ͞ƌĞĨŝŶĞŵĞŶƚ͟ x Varies depending on bucket (bar) size
Negative Log-Likelihood (NLL)
x Can overemphasize tail probabilities (= rare cases)
Brier Score:
x Quadratic penalty (bounded range [0,1] unlike log) x Inadequate for very rare or very frequent events
In Bayesian learning we appeal to approximate posterior inference
Idea: learn distributions over the parameters. We need a prior and a family of distributions to approximate the true posterior.
But Variational Inference occurs and turns inference into optimization. The variational parameters v has to be fit to be close (in Kullback-Leibler) to the exact posterior. Take gradients for SGD of the loss. The negative loss is the evidence lower bound of the log-Likelihood of the posterior.
The standard Neural Networks are Overconfident Î fail silently.
Pitfalls of Bayesian Neural Networks
^ƚĂŶĚĂƌĚŶŽƌŵĂůƉƌŝŽƌŝƐƚŚĞĚĞĨĂƵůƚ͘Ƶƚŝƚ͛ƐŶŽƚ great:
x Bad statistical properties o ĚŽĞƐŶ͛ƚƵƐĞŝŶĨŽƌŵĂƚŝŽŶĂďŽƵƚƚŚĞŶĞƚǁŽƌŬƐƚƌƵĐƚƵƌĞ͕ƵŶŝƚ - wise or layer-wise o the more data, all hidden units contribute infinitesimally to each input o not clear, how to improve the prior for specific properties x It has bad optimization properties o Sensitive to parameterization o Too strong a regularizer. The gradient signal of prior dominates o Cold posterior effect = sharpe the posterior for better results by T
Idea: Use Dropout during Inference
Similar to using a Bernoulli prior in BNN
x Very simple to use x No extra parameters x Easy to fool
Idea: modify softmax probabilities post-hoc
ሺݕȁݔሻ ൌ
σ ቀ
Ensembles are consistently among the best performing methods, especially under dataset shift.
Loss Landscape
Variational Bayesian methods are effective at averaging uncertainty within a single mode , but fail to explore the diversity of multiple modes
x Variational methods capture local uncertainty around a mode x Ensembles identify different modes but ignore local uncertainty and might not pick the best point for each mode x Different modes diverge over time through different trajectories x Model moves a long one possible way Î different models with different results possible