# Classification of Breast Cancer in Mammograms with Deep Learning Adding a Fifth Class
## 3 Materials and Methods  
### Datasets  
In this work, the software Matlab(r) was used to analyze the databases of the Mammographic Image Analysis Society MIAS [37] and INbreast [35], widely studied in research regarding breast cancer [16; 20; 22; 33; 38].  
The MIAS database contains 161 cases with 322 images digitized in PGM format, of which 204 are normal, and 118 contain some findings; of the latter, 66 are benign and 52 malignant. This database provides the annotations organized in 7 columns, showing the name of the mammogram, the type of tissue, the class of anomaly, its severity (Benign/Malignant), the X and Y coordinates, and the radius of the finding.  
The INbreast database contains a total of 115 cases with 410 images in DICOM format, four mammograms per case from the left and right craniocandal (CC) and middle lateral oblique (MLO) views for both cases. The database authors provide an XML table with information on the contours of the findings and also another file in which it includes information on the laterality of the breast, the type of view, the date of acquisition, the name of the file, and the classifications of the American College of Radiology (ACR) and Breast Imaging Reporting and Data System (BI-RADS). Four more fields were added for classifying the finding in masses, microcalcifications, distortions, and asymmetry. Of the 410 mammograms, some mammograms have only masses, others have only MC, and others contain both types of lesions.  
When linking the INbreast and MIAS databases, we take the BI-RADS classification as a basis. The BI-RADS findings from 0 to 3 are classified as benign and 4 to 6 as malignant or suspects. We proposed five classes in the classification: benign or malignant masses, benign or malignant microcalcifications, and the normal classification; introduced to reduce false positives. In Figure 1, several regions of the \"normal\" type can be observed, extracted from the random areas of the mammary parenchyma and with fatty, glandular, and dense tissues.  
In the MIAS database, there are 330 annotations listed of FFDM mammograms with findings in this manner: fifteen benign calcifications, three malignant calcifications, 54 benign masses, 51 malignant masses, and 207 are mammograms taken as normal. The INbreast database provides information of 483 ROIs as follows: 225 calcifications with BIRADS category 1 to 3, which we handle as benign, 83 calcifications with category 4 to 6 taken as malignant, 37 masses with BIRADS category between classifications 1 and 3, and 71 masses diagnosed in BIRADS 4 to 6. The databases only report calcification clusters, and not all masses are listed; thus, we can select smaller groups or annotate each microcalcification separately. For this reason, we proceeded to record more visible microcalcifications and masses to feed the neural network for training and testing.  
Using the Matlab Image Labeler App, more regions with lesions were noted, including those with the \"normal\" classification; any position not marked by the databases and with different sizes was chosen. In the MIAS database, 123 lesions are recorded, while with the annotations carried out, 1829 regions were reached, 613 being lesions and 1194 standard  
Figure 1: Normal tissues of the mammary parenchyma.  
regions. From the INbreast database, we took 416 ROIs, and after making more annotations, we got 4189 ROIs, 543 from findings, and 3646 from areas with no lesions.