# Combination Pattern Method Using Deep Learning for Pill Classification
## 2 Related Studies  
This section introduces the proposed method and presents a review of related works. In the present study, we employed a deep learning-based object-recognition model to identify pills with complex shapes. Object recognition, primarily a branch of computer vision and image processing, is concerned with the simultaneous classification and localization of objects within an image. DetectorNet [18] is a pioneering algorithm in deep learning-based object detection, marking this task's first implementation of a Convolutional Neural Network (CNN) model. One of the landmark developments in object-detection technology is the region-based CNN (R-CNN), which has laid the foundation for several subsequent models. For instance, the Spatial Pyramid Pooling Network (SPNet) [19], Fast R-CNN [20, 21], and YOLO [22]. CNNs are composed of convolutional and pooling layers that are used to efficiently process input images. It performs tasks such as classification and object detection by recognizing and learning local patterns in images [23]. [PERSON]. [24] proposed a CNN-based classification model and conducted a comparative experiment for classifying images trained in ImageNet. In [25], a fine-grained pill identification based on images captured by hand-held devices was conducted using a deep convolutional network (DCN). [PERSON]. [26] proposed a CNN for classifying images taken under various conditions in the ImageNet Large-Scale Visual Recognition Challenge 2014 (ILSVRC14). [PERSON]. [27] focused on a content-based image-retrieval (CBIR) system that retrieves similar images from an extensive database when provided with a query image. The R-CNN offers an ideal structure for accurately localizing objects. An R-CNN splits input images into candidate areas and performs a pooling process to generate images of the same size for those areas. These images are then input to the CNN model for the extraction of feature values. Classification is performed using a support vector machine (SVM) for each class. The R-CNN series include representative algorithmssuch as Fast R-CNN [20], Faster R-CNN [21], and Mask R-CNN [28]. Although R-CNNs yield satisfactory performance in object-detection tasks, they present disadvantages including a slow processing speed, complex structure, and high computational cost, as the CNN is individually trained in each candidate area. YOLO is a popular object-detection algorithm that processes entire images with one forward pass and predicts the bounding box coordinates and class probabilities for multiple objects [29; 30]. This algorithm is capable of faster learning than R-CNN using the same quantity of training data, as well as detecting objects in real time at a rate of up to 65 fps. YOLO divides input images into grids, places multiple bounding boxes in each grid cell, and then predicts the detection probabilities associated with these boxes. YOLOv5, the latest algorithm of the YOLO series, exhibits a higher accuracy and smaller model size with significantly enhanced object-detection speed and performance. The YOLOv5, similar to the YOLO algorithm, predicts the locations and classes of bounding boxes; in addition, it can simultaneously process all the images and detect objects of various sizes more accurately, [31; 32]. However, previous object-detection studies have focused on real-time detection, and the accuracy of pill identification has not yet been considered. In pill-identification research, extracting distinctive features for classification primarily focuses on characteristics such as color, shape, texture, and imprinted characters on the pill. A study by [33] used Local Feature Regions (LFR), a method derived from color histograms, to obtain effective image-retrieval results. Another research initiative by [34] developed an automated pill-recognition system based on color histogram approaches, incorporating three attributes--shape, color, and texture of the pill imprint. Their empirical outcomes displayed a matching accuracy of 73% against a dataset of 13,000 legitimate pill images.