# Efficient FPGA Implementation of Automatic Nuclei Detection in Histopathology Images
## 3 Results
### Parameter Configuration  
A few parameters for the proposed architecture must be defined before generating bit file for the hardware [1]. The parameters are application dataset dependent. The Gaussian filter size \(M\) depends on the amount of noise in the input image and minimum nuclei size to detect. Filter size cannot be more than the size of smaller nuclei expect to detect, otherwise it blurs the nucleus. The rest of the parameters, like gLoG filter size, threshold value, MS clustering bandwidth are to be set according to possible nuclei size range in application dataset. In this experiment, the parameters are not fine-tuned to a dataset, but for the same parameter configuration the proposed hardware should give similar results with software (MATLAB) implementation. To check the proposed hardware flexibility with parameters across a different dataset, experiments are done on two sets of parameters. Parameter configuration of two sets are shown in Table 2. The hardware provided similar results as MATLAB [10] with respect to each set of parameters.  
The architecture performance is evaluated by comparing its execution time and accuracy with MATLAB for 256 \(\times\) 256 size images. Before generating the bit-file for the hardware, the parameters have to be configured according to application and input image data should be initialized into ROM IP block using.hex/.mif file format. As the input is red channel data (complemented) of H&E stained  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter** & **Set 1** & **Set 2** \\ \hline Gaussian filter size & 7 \(\times\) 7 & 8 \(\times\) 8 \\ gLoG size & 25 \(\times\) 25 & 49 \(\times\) 49 \\ Threshold & 155 & 150 \\ MS bandwidth & 8 & 6 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Configured parameters table.  
Figure 12: Simplified schematic of DE2i-150 FPGA development board Architecture (refer to [8] for more detailed schematic).  
images, MATLAB is used to generate the.hex/.mif file with red channel data. The resources utilized by the architecture for 256 \(\times\) 256 size image on the FPGA (for set-1 parameters configuration) is presented in Table 3. MATLAB is running on AMD Athlon II CPU (Advanced Micro Devices, Inc., Austin, TX, USA) at 2.90 GHz with 4 GB RAM. To compare the results, the detected nuclei coordinates in the FPGA are read out and marked on the MATLAB results. Figure 13 shows the nuclei detection results using both hardware and MATLAB.  
The execution time on FPGA measured using counter register, it increments for every millisecond (i.e., the execution time is in millisecond precision) and final execution time is displayed through available 15 LEDs on the board. The average execution time over 10 different input images on both hardware and MATLAB are presented in Table 4.  
The accurate detection of nuclei in the input image depends on the parameters mentioned above. Therefore, in this paper the accuracy of proposed hardware evaluated with respect to the results from the MATLAB (software) version (2017b, MathWorks, Natick, MA, USA) [10]. It is observed in Figure 13 that both versions give similar results for the same parameters configuration. Finding the optimized  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Platform** & **Clock Frequency** & **Execution Time (in sec)** \\ \hline MATLAB (on CPU) & 2.90 GHz & 1.694 \\ Proposed implementation & 100 MHz & 1.108 \\ \hline \hline \end{tabular}
\end{table}
Table 4: Performance comparison.  
Figure 13: Results of Nuclei detection with set 1 parameters configuration on both MATLAB and hardware, (**a**) input color image, (**b**) output detected nuclei indicating on complement red channel input image, blue color ‘+’ indicates the nuclei detected using hardware, red circle ‘o’ indicates the nuclei detected using MATLAB.  
parameters to compare the accuracy of detection is beyond the scope of this paper as this paper is focused more on FPGA implementation.