MedGA is a novel evolutionary method based on Genetic Algorithms for the enhancemnet of bimodal biomedical images.
MedGA tackles the complexity of the enhancement problem by exploiting Genetic Algorithms (GAs) to improve the appearance and the visual quality of images characterized by a bimodal gray level intensity histogram, by strengthening their two underlying sub-distributions. This novel medical image enhancement technique is a promising solution suitable for medical expert systems.
A detailed description of MedGA, as well as a complete experimental comparison against state-of-the-art image enhancement techniques by using the dataset described below (Data), can be found in:
- Rundo L., Tangherloni A., Nobile M.S., Militello C., Besozzi D., Mauri G., and Cazzaniga P.: "MedGA: a novel evolutionary method for image enhancement in medical imaging systems", Expert Systems with Applications, 119, 387-399, 2019. doi: 10.1016/j.eswa.2018.11.013
MedGA has been applied as a preprocessing step of a novel evolutionary framework for image enhancement, segmentation, and quantification. This framework has been applied to different clinical scenarios involving bimodal MR image analysis, as described in:
- Rundo L., Tangherloni A., Cazzaniga P., Nobile M.S., Russo G., Gilardi M.C., Vitabile S., Mauri G., Besozzi D., and Militello, C.: "A novel framework for MR image segmentation and quantification by using MedGA", Computer Methods and Programs in Biomedicine, 2019. doi: 10.1016/j.cmpb.2019.04.016
MedGA has been developed in Python 2.7 and tested on Ubuntu Linux, MacOS X and Windows.
MedGA exploits the following libraries:
mpi4py, which provides bindings of the Message Passing Interface (MPI) specifications for Python.
The sequential version has been developed to analyze a single medical image, while the parallel version is based on a Master-Slave paradigm employing
mpi4py to leverage High-Performance Computing (HPC) resources.
The parallel version has been implementated to perform the enhancement of multiple images (or slices in the case of tomography image stack analysis) in a distributed fashion.
MPI (such as mpich on Linux OS, Open MPI on MacOS X, and MS-MPI on Windows) and
mpi4py are not strictly required. The sequential version of MedGA can be used to analyze a folder containing multiple images.
In oder to run MedGA, the following parameters must be provided:
-fto specify the input folder containing the images to process (in TIFF/TIF, PNG, JPEG/JPG format);
-ito specify the input image to process (in TIFF/TIF, PNG, JPEG/JPG format);
-i are mutually exclusive. If both of them are used, MedGA stops requiring either
Optional parameters could be provided:
-oto specify the output folder (default: output);
-pto specify the population size (number of individuals) of the GA (default: 100);
-gto specify the number of generations of the GA (default: 100);
-sto specify the selection strategy. The available strategies are: wheel, ranking, and tournament (default: tournament);
-cto specify the crossover rate (default: 0.9, i.e., 90%);
-mto specify the mutation rate (default: 0.01, i.e., 1%);
-kto specify the number of individuals used in each tournament. This parameter is used if and only if the tournament selection strategies is used (default: 20);
-eto specify the number of best individuals of the current generation that will survive in the next generation without modifications (default: 1);
-dto enable the distributed version of
-tto specify the number of cores exploited by distributed version of
-vto enable the verbose modality (default: False).
MedGA can be executed with the following command:
python MedGA.py -i fibroids/01.tiff python MedGA.py -f fibroids
The former will save the following files in the output/01 folder:
- fitness contains the fitness value of the best individual for each generation;
- information contains the GA settings used to perform the optimization. Note that the number of genes corresponds to the number of pixels composing the analyzed image;
- matrixBest contains the final best image as
- terms contains the values of the 3 different terms composing the fitness function for each generation;
- threshold contains the optimal threshold for each generation.
The images subfolder contains the original image, the best image after the GA initialization and the final best image.
The latter will save the described files and subfolder for each image in the fibroids folder.
python MedGA.py without specifying any parameter (or using
-h), all the above parameters will be listed.
MedGA was tested and validated on two MRI datasets: (i) uterine fibroids underwent Magnetic Resonance guided Focused Ultrasound Surgery (MRgFUS); (ii) brain metastases treated by using neuro-radiosurgery.
In general, MedGA is suitable for input images characterized by an undelying bimodal histogram (i.e., intensity level distribution). Possibly, these images might be previously masked and cropped images (according to a bounding region containing the Region of Interest).
MedGA is licensed under the terms of the GNU GPL v3.0