# A Transfer Learning Approach on the Optimization of Edge Detectors for Medical Images Using Particle Swarm Optimization

^{1}

^{2}

^{3}

^{*}

## Abstract

**:**

## 1. Introduction

#### Original Contribution

## 2. Materials and Methods

#### 2.1. Edge Detection

#### 2.2. Cellular Automata

#### 2.3. Cellular Automaton Model

#### 2.4. Particle Swarm Optimization

#### 2.5. PSO Optimizer

## 3. Results

#### 3.1. Experimental Setup

#### 3.1.1. Edge Detection Framework

- applying the CA rule with no additional processing—$CA-ED$;
- applying the CA rule followed by a post-processing step—$CA-E{D}_{post}$;
- pre-processing the input, followed by applying the CA rule and then the post-processing step—$CA-E{D}_{pre-post}$.

#### 3.1.2. Optimizer Setup

#### 3.1.3. Metrics

#### 3.1.4. Dataset

#### 3.2. Robustness Analysis

- an image from the optimization set is passed to the optimizer;
- the rule is optimized on this image for a set number of epochs;
- the next image is passed to the optimizer, and the global best is reset in order to avoid the particles getting stuck in local optima.

#### 3.2.1. Comparing $CA-ED$, $CA-E{D}_{pre}$ and $CA-E{D}_{pre-post}$

#### 3.2.2. $CA-E{D}_{pre-post}$ against the Canny Edge Detector

#### 3.2.3. Optimization Analysis

- a fixed number of images from the optimization set are passed to the optimizer;
- the rule is optimized on the batch for a set number of epochs by averaging the fitness computed for the individual images;
- the next batch is passed to the optimizer, and the global best is reset to avoid the particles getting stuck in local optima.

#### 3.2.4. Impact of Batch Size over the Optimization Process

#### 3.2.5. Evaluating the Difficulty of Edge Detection with Respect to Batch Size

## 4. Discussion

#### 4.1. Robustness Analysis

#### 4.1.1. Comparing $CA-ED$, $CA-E{D}_{pre}$, and $CA-E{D}_{pre-post}$

#### 4.1.2. $CA-E{D}_{pre-post}$ against the Canny Edge Detector

#### 4.2. Optimization Analysis

#### 4.2.1. Impact of Batch Size over the Optimization Process

#### 4.2.2. Evaluating the Difficulty of Edge Detection with Respect to Batch Size

## 5. Conclusions

## Author Contributions

## Funding

## Acknowledgments

## Conflicts of Interest

## References

- Wang, R. Edge Detection Using Convolutional Neural Network; Springer: Cham, Switzerland, 2016; Volume 9719, pp. 12–20. [Google Scholar]
- Khan, A.R.; Choudhury, P.P.; Dihidar, K.; Mitra, S.; Sarkar, P. VLSI architecture of a cellular automata machine. Comput. Math. Appl.
**1997**, 33, 79–94. [Google Scholar] [CrossRef][Green Version] - Dioșan, L.; Andreica, A.; Enescu, A. The Use of Simple Cellular Automata in Image Processing. Stud. Univ. Babes-Bolyai Inform.
**2017**, 62, 5–16. [Google Scholar] [CrossRef][Green Version] - Schiff, J.L. Cellular Automata: A Discrete View of the World (Wiley Series in Discrete Mathematics & Optimization); John Wiley & Sons: Hoboken, NJ, USA, 2011. [Google Scholar]
- Mohammed, J.; Nayak, D.R. An efficient edge detection technique by two dimensional rectangular cellular automata. In Proceedings of the International Conference on Information Communication and Embedded Systems (ICICES2014), Chennai, India, 27–28 February 2014. [Google Scholar]
- Angulo, K.; Gil, D.; Espitia, H. Method for Edges Detection in Digital Images through the Use of Cellular Automata; Springer: Cham, Switzerland, 2020; pp. 3–21. [Google Scholar]
- Mărginean, R.; Andreica, A.; Dioşan, L.; Bálint, Z. Butterfly Effect in Chaotic Image Segmentation. Entropy
**2020**, 22, 1028. [Google Scholar] [CrossRef] - Amrogowicz, S.; Zhao, Y.; Zhao, Y. An edge detection method using outer Totalistic Cellular Automata. Neurocomputing
**2016**, 214, 643–653. [Google Scholar] [CrossRef][Green Version] - Mohammad, H.M.; Sadeghi, S.; Rezvanian, A.; Meybodi, M.R. Cellular edge detection: Combining cellular automata and cellular learning automata. Int. J. Electron. Commun.
**2015**, 69, 1282–1290. [Google Scholar] - Uguz, S.; Sahin, U.; Sahin, F. Edge detection with fuzzy cellular automata transition function optimized by PSO. Comput. Electr. Eng.
**2015**, 43, 180–192. [Google Scholar] - Gonzalez, C.I.; Melin, P.; Castro, J.R.; Castillo, O.; Mendoza, O. Optimization of interval type-2 fuzzy systems for image edge detection. Appl. Soft Comput.
**2016**, 47, 631–643. [Google Scholar] [CrossRef] - Olivas, F.; Valdez, F.; Castillo, O.; Melin, P. Dynamic Parameter Adaptation in Particle Swarm Optimization Using Interval Type-2 Fuzzy Logic. Soft Comput.
**2016**, 20, 1057–1070. [Google Scholar] [CrossRef] - Vikhar, P.A. Evolutionary algorithms: A critical review and its future prospects. In Proceedings of the 2016 International Conference on Global Trends in Signal Processing, Information Computing and Communication (ICGTSPICC), Jalgaon, India, 22–24 December 2016; pp. 261–265. [Google Scholar]
- Kennedy, J.; Eberhart, R. Particle swarm optimization. In Proceedings of the ICNN’95—International Conference on Neural Networks, Perth, Australia, 27 November–1 December 1995; Volume 4, pp. 1942–1948. [Google Scholar]
- Weikert, D.; Mai, S.; Mostaghim, S. Particle Swarm Contour Search Algorithm. Entropy
**2020**, 22, 407. [Google Scholar] [CrossRef] [PubMed][Green Version] - Dumitru, D.; Andreica, A.; Dioşan, L.; Balint, Z. Evolutionary Curriculum Learning Approach for Transferable Cellular Automata Rule Optimization. In Proceedings of the 2020 Genetic and Evolutionary Computation Conference Companion, Cancun, Mexico, 8–12 July 2020. [Google Scholar]
- Dumitru, D.; Andreica, A.; Dioşan, L.; Bálint, Z. Robustness analysis of transferable cellular automata rules optimized for edge detection. Procedia Comput. Sci.
**2020**, 176, 713–722. [Google Scholar] [CrossRef] - Hersey, I. Textures: A Photographic Album for Artists and Designers by Phil Brodatz. Leonardo
**1968**, 1, 91–92. [Google Scholar] [CrossRef] - Vilalta, R.; Giraud-Carrier, C.; Brazdil, P.; Soares, C. Inductive Transfer. In Encyclopedia of Machine Learning; Sammut, C., Webb, G.I., Eds.; Springer US: Boston, MA, USA, 2010; pp. 545–548. [Google Scholar]
- Litjens, G.; Ciompi, F.; Wolterink, J.M.; de Vos, B.D.; Leiner, T.; Teuwen, J.; Išgum, I. State-of-the-Art Deep Learning in Cardiovascular Image Analysis. JACC Cardiovasc. Imaging
**2019**, 12, 1549–1565. [Google Scholar] [CrossRef] [PubMed] - Jain, R.; Kasturi, R.; Schunck, B.G. Edge Detection; Machine Vision; McGraw-Hill: New York, NY, USA, 1995; Volume 5, pp. 140–185. [Google Scholar]
- Ziou, D.; Tabbone, S. Edge Detection Techniques-An Overview. Pattern Recognit. Image Anal. C
**1998**, 8, 537–559. [Google Scholar] - Canny, J. A computational approach to edge detection. IEEE Trans. Pattern Anal. Mach. Intell.
**1986**, 679–698. [Google Scholar] [CrossRef] - Neumann, J.V. Theory of Self-Reproducing Automata; Burks, A.W., Ed.; University of Illinois Press: Urbana, IL, USA, 1966. [Google Scholar]
- Kari, J. Theory of Cellular Automata: A Survey. Theor. Comput. Sci.
**2005**, 334, 3–33. [Google Scholar] [CrossRef][Green Version] - Dice, L.R. Measures of the Amount of Ecologic Association Between Species. Ecology
**1945**, 26, 297–302. [Google Scholar] [CrossRef] - Van der Walt, S.; Schönberger, J.L.; Nunez-Iglesias, J.; Boulogne, F.; Warner, J.D.; Yager, N.; Gouillart, E.; Yu, T. scikit-image: Image processing in Python. PeerJ
**2014**, 2, e453. [Google Scholar] [CrossRef] [PubMed] - Xess, M.; Agnes, S.A. Analysis of Image Segmentation Methods Based on Performance Evaluation Parameters. Int. J. Comput. Eng. Res.
**2014**, 4, 68–75. [Google Scholar] - Zhou, W.; Bovik, A.C.; Sheikh, H.R.; Simoncelli, E.P. Image quality assessment: From error visibility to structural similarity. IEEE Trans. Image Process.
**2004**, 13, 600–612. [Google Scholar] - Sobel, I. An Isotropic 3x3 Image Gradient Operator. Present. Stanf. A.I. Proj.
**1968**, 2014, 2. [Google Scholar]

**Figure 1.**(

**a**) A visual representation of the Moore neighborhood with radius 1. (

**b**) A visual representation of the nine fundamental rules for a 2D cellular automaton with a Moore neighborhood.

**Figure 2.**(

**a**) Low intensity optimization set, and (

**b**) 6 representative images from the low intensity test set (Imaging-based, Non-invasive Diagnosis of Persistent Atrial Fibrillation (imATFIB) clinical study).

**Figure 3.**(

**a**) High intensity optimization set, and (

**b**) 6 representative images from the high intensity test set (imATFIB clinical study).

**Figure 4.**Average Peak signal-to-noise-ratio (PSNR) and Structural Similarity (SSIM) values with respect to the standard deviation of the Gaussian noise injected in the images for the low intensity dataset—(

**a**,

**b**), and for the high intensity dataset—(

**c**,

**d**).

**Figure 5.**Average PSNR and SSIM values with respect to the standard deviation of the Gaussian filter used for pre-processing for the low intensity dataset—(

**a**,

**b**), and for the high intensity dataset—(

**c**,

**d**).

**Figure 6.**Average PSNR and SSIM values with respect to the batch size on the test images (${\sigma}_{smooth}=1.5$) for the low intensity dataset—(

**a**,

**b**), and for the high intensity dataset—(

**c**,

**d**).

**Figure 7.**Average PSNR and SSIM values with respect to the standard deviation of the Gaussian filter used for pre-processing using different batch sizes, denoted as BS, for the low intensity dataset—(

**a**,

**b**), and for the high intensity dataset—(

**c**,

**d**).

**Figure 8.**PSNR and SSIM values for each image with respect to the mean gradient (${\sigma}_{smooth}=1.5$) for the low intensity dataset—(

**a**,

**b**), and for the high intensity dataset—(

**c**,

**d**).

**Table 1.**Correlation between the PSNR and SSIM values and the difficulty of the test images given by the mean gradient.

Pearson Correlation (Low Intensity Set) | Pearson Correlation (High Intensity Set) | |
---|---|---|

PSNR | −0.605 | −0.049 |

SSIM | −0.580 | 0.191 |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Dumitru, D.; Dioșan, L.; Andreica, A.; Bálint, Z. A Transfer Learning Approach on the Optimization of Edge Detectors for Medical Images Using Particle Swarm Optimization. *Entropy* **2021**, *23*, 414.
https://doi.org/10.3390/e23040414

**AMA Style**

Dumitru D, Dioșan L, Andreica A, Bálint Z. A Transfer Learning Approach on the Optimization of Edge Detectors for Medical Images Using Particle Swarm Optimization. *Entropy*. 2021; 23(4):414.
https://doi.org/10.3390/e23040414

**Chicago/Turabian Style**

Dumitru, Delia, Laura Dioșan, Anca Andreica, and Zoltán Bálint. 2021. "A Transfer Learning Approach on the Optimization of Edge Detectors for Medical Images Using Particle Swarm Optimization" *Entropy* 23, no. 4: 414.
https://doi.org/10.3390/e23040414