Memuat
Memuat
Want to go deeper?
Join one of our courses or ask us directly on WhatsApp.
Picked from the software, topic, and level of “Class U-Net Brain Tumor Segmentation #6: Evaluation of Dice & IoU, Segmentation Overlay, and Before-After Optimization Comparison”.
Other ways we can help with Python.
Learn with a mentor
Scheduled AI & Machine Learning courses with live guidance and a certificate.

Multi-Objective Optimization Course: NSGA-II, MOPSO & Hybrid Algorithms (Python)

ECG Arrhythmia Classification Course with Wavelet & Deep Learning (PyTorch)

ANFIS + PSO/GA Course for Non-Linear Time Series Forecasting (Python)
Have it built for you
No time to learn Python? Our team can do the project for you.

Python Machine Learning — Prediction Models, Customer Segmentation, Fraud Detection & AI Apps

AI Image Creation with Stable Diffusion — Unlimited Custom Visual Production
★ 4.9

AI Image & Video Creation with Leonardo AI — All-in-One Visuals for Business
★ 4.9
Get notified about new Python classes
At most one email a week. Unfollow anytime with one click.
The full narration of this video. The current sentence is highlighted while the video plays; click any sentence to jump there.
Here is the final result, the tumor boundary from the doctor is yellow, the baseline model result is red, and the PSO-optimized model is green, over the MRI image of an unseen patient. The DICE test data increased from 0.72 to 0.77. Let's start. Welcome to the final episode of the brain tumor segmentation series with the metaheuristic-optimized model. We have two models, the baseline model from episode 4 and the PSO-optimized model from episode 5. Now it's time to answer the research question. Does metaheuristic optimization really improve segmentation? We tested on 17 test patients whose data was never used during training or optimization.
Create an evaluation underscore sec.py file. We read the winning hyperparameters from the history file, then create two models. Baseline with 16 filters, and the optimized model with 18 filters and dropout 0.16. Each weight is loaded from the PT file we have already saved.
We predict all the test data, 674 slices, 202 of which have tumors. There are four metrics. DAIS and global IOU. DAIS per slice, which is the average DAIS for each tumor slice, which is more sensitive to small tumors. And false positive slices, the percentage of healthy slices incorrectly labeled as having a tumor by the model. The results show that global DAIS increased from 0.721 to 0.770, IOU from 0.563 to 0.626. DAIS per slice increased from 0.568 to 0.632, and false positives decreased from 5.7 to 3.2%. The improvement in test data is actually greater than in validation data. This indicates that the dropout from the optimized model makes the model more capable of generalization.
Now the box plot of DAIS per tumor slice distribution. The median of the optimized model is higher, and more importantly, the box is much tighter. In the baseline, a quarter of the slices have DAIS below 0.33, usually small tumors that are missed. The optimized model is more consistent. This kind of graph is very useful for the results chapter of the research.
Finally, the overlay on 4 test patients with the largest tumors. The top line is the ground root in yellow from the doctor, the middle line is the baseline in red, the bottom line is the optimized model in green, complete with DAIS per slice. Both models accurately detect the tumor, with DAIS ranging from 0.86 to 0.95. The optimized model follows the tumor boundary contours slightly better in 3 out of 4 examples.
Done, and the series is complete. We have built a complete research on brain tumor segmentation, MRI dataset with per-patient splitting, image and mask augmentation, units from 0, loss base IDAIS, hyperparameter optimization with PSO and grey wolf optimizer, up to DAIS and IOU evaluation on the test data. For further research, try a wider search space, per-patient cross-validation, or architectures like attention units. Thank you for following this series. Currently working on a thesis, dissertation, or AI research in the field of medical image segmentation? Cerdas Inovasi Digital helps with deep learning implementation, from UNET segmentation, hyperparameter optimization with PSO and grey wolf, up to DAIS, IOU evaluation, and result writing, as well as opening deep learning courses with PyTor. Want to master the entire series, from MRI brain datasets up to hyperoptimized UNET? All 6 episodes, complete with PDF step-by-step guides and source code, are available for premium tutorial subscribers. Subscribe starting from Rp69.000 per month Save 28% with the 12-month package, or one-time payment of Rp999.000 for lifetime access. Want a single class only? Buy single classes with lifetime access. Subscribe now on the premium page cerdasinovasidigital.com Contact us via WhatsApp, or visit cerdasinovasidigital.com Thank you for watching, See you in the next episode.
Type a question or keyword; we find the part of this episode that explains it and jump the video there.
Notes are saved with the current video time and are only visible to you.
Stuck on a step? Ask here; the instructor and other learners can answer.
No questions yet.

Cerdas Inovasi Digital Team
Software developers, BIM & 3D engineers, and AI practitioners
We build software, BIM models, games and AI automations for clients every day, and turn that hands-on work into step-by-step classes: every step is shown on screen and comes with a PDF guide you can keep.
See our clients →