# Object Detection for Brain Cancer Detection and Localization
## 2 The Method
This helps the model develop more generalized rules and reduces the chances of misclassifying unseen patterns. Data augmentation plays a crucial role in improving the model's ability to generalize and perform well on unseen images. After acquiring the augmented brain MRIs, along with the corresponding information regarding cancer localization (i.e., the class) and bounding boxes, the next step is to develop a deep learning model. As stated in the introduction section, in this paper we utilize the YOLO model [9; 10; 11]. The YOLO model [12], which was introduced by [PERSON] et al. in 2016, serves as the pioneering one-stage deep learning detector. YOLO is specifically designed as an object detection model that performs both image classification and accurate object localization within the images. The distinctive feature of YOLO, setting it apart from other networks, is its self-contained pipeline that carries out the entire process independently. In YOLO, the input is an image, and the output consists of two components: a bounding box vector and the associated class prediction for each cell. During analysis, each image is divided into an S \(\times\) S grid of cells. If an object falls within the center of a cell, that cell is responsible for detecting the object. The bounding box prediction consists of five components: (x, y, w, h, confidence). The (x, y) coordinates represent the center of the bounding box relative to the cell's position in the grid. These coordinates are normalized to values between 0 and 1. The dimensions of the box (w, h) are also normalized to a range of [0, 1], relative to the image dimensions. In total, the predictions of the bounding boxes result in S \(\times\) S \(\times\) B \(\times\) 5 outputs, where B denotes the number of bounding boxes predicted per cell [13]. When compared to existing object detection models, YOLO has been demonstrated to be notably faster [14; 15]. This efficiency is primarily achieved because YOLO performs the recognition task in a single phase, without dividing it into multiple stages. Instead of having separate stages for region proposal and object classification, YOLO directly predicts bounding boxes, object probabilities, and classes of objects present in the input image. This streamlined approach contributes to the significant speed advantage of YOLO compared to other object detection models. We choose to utilize the YOLO model for several reasons when compared to other deep learning models for object detection. Despite the fact that YOLO may have more localization errors [16], it exhibits a lower tendency to identify false positives in the background of an image. Furthermore, YOLO is significantly faster than many other models [13; 17]. These factors contribute to YOLO being widely regarded as one of the top convolutional neural network models for object detection. It is important to note that there exist multiple versions of the YOLO model. For this paper, we consider and implement YOLOv8s ([[https://docs.ultralytics.com/](https://docs.ultralytics.com/)]([https://docs.ultralytics.com/](https://docs.ultralytics.com/)), accessed on 8 August 2023) using the PyTorch framework ([[https://pytorch.org/](https://pytorch.org/)]([https://pytorch.org/](https://pytorch.org/)), accessed on 8 August 2023). The reason why we chose the YOLOv8 model is the significant improvement over previous YOLO models in a number of ways, including the following:  
* Anchor-free detection. YOLOv8 does away with the use of anchor boxes, which were a key component of previous YOLO models. Anchor boxes are pre-defined bounding boxes that are used to classify objects in an image. However, anchor boxes can be restrictive, and they can make it difficult for the model to learn to detect objects that are not well-represented by the anchor boxes. YOLOv8 uses a new technique called anchor-free detection, which allows the model to learn to detect objects of any size and shape. * C3 convolutions. YOLOv8 uses a new type of convolution called C3 convolutions.