Aras et. Implemntation Of Haar Cascade and Adaboost IMPLEMENTATION OF HAAR CASCADE AND ADABOOST ALGORITHMS IN PHOTO CLASSIFICATION ON SOCIAL NETWORKS Rezty Amalia Aras1*. Andi Hutami Endang2 Institute Technology and Business Kalla. Makassar. Indonesia Department of Bisnis Digital. ITB Kalla. Makassar. Indonesia1 Institute Technology and Business Kalla. Makassar. Indonesia2 E-mail address: Rezty@kallabs. id1, hutamiendang@kallabs. Received: 06. June, 2023 Revised: 08. June, 2023 Accepted: 28. June, 2023 ABSTRACT Instagram is one of the fastest social networks in recent years. Instagram is a popular social media for sharing images. For example, image searches on Instagram may use certain keywords, sometimes called hashtags. There are no rules for specifying hashtags when users upload images. As such, the specified hashtag may not be relevant to the uploaded image. There are photos whose content is dominated by selfies. The study was conducted using data from Instagram, using hashtags to refine searches. Next, classify from the search results. The survey has three categories: selfies, food, and travel. Results: Two of her classification algorithms. Haar Cascade and Adaboost, were used in this study. From the study results, we can conclude that the Haar cascade has a precision rate of 0. 7081/s and a detection error of 0. 8816/s, while Adaboost has a precision rate of 0. 7072/s and a detection error of 0. 8424/s. According to the recognition results, the two algorithms can recognize and classify photos with almost the same accuracy . 0392 second. Keywords: Classification. Instagram. Haar Casecade. Adaboost INTRODUCTION Artificial intelligence (AI) technology is now and will continue to influence various human lives throughout the world. In companies or organizations, the adoption of this technology is predicted to continue to increase because of the various benefits it provides to humans. technology itself has become the main driver of new technologies such as big data, chatbots, self-driving cars, robotics and the Internet of Things (IoT). Talking about AI, social media is a pioneer of AI that is very up to date. Instagram is one of them that applies AI. Instagram is one of the fastest-growing social media in recent years. Instagram is a popular social media for sharing images. Research results show that understanding a variety of factors improved predictions of photo popularity on social media sites (Abousaleh. Cheng. Yu, & Tsao, 2. For example, when searching for images on Instagram, you can use certain keywords or so-called hashtags. There are no rules for hashtags when users upload images. such, the specified hashtag may not be relevant to the uploaded image. I have an image where the majority of the content is a selfie face. As a result, the background image and the position Inspiration: Jurnal Teknologi Informasi dan Komunikasi Volume 13. Nomor 1. June 2023: 59 Ae 68 P-ISSN : 2088-6705 E-ISSN : 2621-5608 of the image are not fully conveyed (Priadana & Habibi, 2. Social media image filters have been researched to change the contrast and lighting of images, remove parts of faces, and more. Cover. prosthetic glasses or animal noses (Hedman. Skepetzis. Hernandez-Diaz. Bigun, & Alonso-Fernandez, 2. Instagram is currently believed by users who indulge the wishes of the user himself. Various photos that we encounter in one scroll on Instagram media. The use of hashtags narrows down in searches on Instagram. Hashtags make it easy for users to find what they want on Instagram. Photos uploaded on Instagram are generally selfies, food photos and photos of tourist attractions. This causes users to get less clear information from one photo object. In research (Priadana & Habibi, 2. stated We found that the method used resulted in 71. 48% accuracy in detecting human faces. Based on human face detection results. Haar Cascade method can filter selfie face images with an accuracy value of 64. Haar Cascade is one of the commonly used machine learning models as a basis for recognition In 1995. Freund and Schapire jointly proposed an algorithm he called the Adaboost algorithm. The basic idea of this algorithm was to combine many weak classifiers with a particular method into one strong classifier. Then Viola et al. Applies the Adaboost algorithm to face recognition. This is a convenient level of face recognition, allowing fast face recognition to meet practical needs (Li. Zeng. Li, & Yu, 2. THEORY Instagram According to some theories. Instagram is a photo and video sharing application that allows users to take photos and videos, apply filters and share them on various social Haar Cascade Haar's algorithm uses statistical methods to detect faces (Sangeetha. Miruthula. Kavimalar, & Aakash, 2. This method uses sample haarlike fetures (L. Zhang. Wang, & An, 2. This classification uses fixed-size . Haar's method of detecting faces is to use a sliding window technique measuring 24x24 on all images and determine whether the image has a part with a shape like a face or not. Haar also has the ability to scale for detection of faces larger or smaller than the image in the Each feature of an object such as a capture is determined by the shape of the object, including the coordinates of the object as well as the size of the object (Munawir et , 2. A cascading classifier is a series of level classifiers, each used to determine whether an image subwindow object has an object of interest. Level classifiers are created using the adaptive boosting algorithm (AdaBoos. This algorithm combines the power of many weak algorithms to produce a strong classifier. The weak classifier in this case is the Haar-like feature value. The AdaBoost type used is Gentle AdaBoost (Munawir et al. , 2. Aras et. Implemntation Of Haar Cascade and Adaboost Figure 1. Classifeier model casecade Haar Feature Haar features are features based on Haar wavelets. A Haar wavelet is a single square wave . ne high and one lo. In two dimensions, one is bright and one is dark. addition, it is said that the recognition of visual objects is improved by combining Each Haar feature consists of a combination of black and white squares (Munawir et al. , 2. Figure 2. Types of Feature Variations on Haar 3 types of box . feature (Zhao. U, & Luo, 2. Type two-rectangle feature . orisontal/vertika. Type three-rectangle feature Type four-rectangle feature The presence of hair features is determined by subtracting the dark pixel area from the average light area pixel. A feature is considered present if its delta value exceeds one or more bounding parks. The hairy feature is the difference between the sum of the grayscale values of the black box area and the white box area: cU) = ycIycycoyaAycoycaycayco ycIyceycaycycaycuyciycoyce Oe ycIycycoycOEaycnycyce ycIyceycaycycaycuyciycoyce . Description: where for boxes in the Haar-like feature can be calculated quickly using the "image integral". Inspiration: Jurnal Teknologi Informasi dan Komunikasi Volume 13. Nomor 1. June 2023: 59 Ae 68 P-ISSN : 2088-6705 E-ISSN : 2621-5608 Adaboost AdaBoost is a well-known ensemble learning method that provides an effective strategy for developing strong learners through iterative training of individual learners. AdaBoost was originally used to integrate classification and regression tree algorithms. AdaBoost implements ensemble prediction as follows: The training set is distributed using the initial weights. A basic learner is trained on the weighted dataset. The base learner and dataset weights are updated according to the performance of the base learner in the previous iteration round. Stop iterating if the stopping condition is met. Combine BaseLearners using weighted voting. The process of iterative weight updates allows subsequent learners to focus more on misclassified cases. Therefore, a combination of basic learners can correct the classification bias and may give good performance. (Hu. Zhang, & Zhang, 2. The following is a table of adaboost algorithms (Y. Zhang et al. , 2. Table 1. Adaboost Algorithm Training example set N = {(X1. , (X2. A(Xn. }, number of iterations T, and weak classifier algorithm Initialize the weight distribution for the training examples. D1. = 1/n For t = 1, 2 A T. Train the training data set using the weight distribution Dt to get a weak classifier Gt (X). 4 Estimate the classification error rate of Gt(X) in the training set At, and if At is less than 0. 5, proceed to the next step. Otherwise, the loop terminates (Gt (X) O f(X), where f(X) is a real function 1Oe yuA Calculate the weight of yayc . : ycayc = 2 yaycu yuA yc yc Next weight distribution : yayc 1 . = yayc . exp (Oeycayc yce. ) ycsyc . csyc ycnyc ycuycuycycoycaycoycnycycaycycnycuycu yceycaycaycycuy. Get the final classifier : sign (OcycNyc=1 ycayc yayc . ) METHOD The research carried out starts from determining the object of research, analyzing the problems that have occurred so far, namely the amount of Instagram social media data to be processed into one research object. Furthermore, the formulation of problems and research objectives is carried out. At the initial research stage, the results of photo analysis on Instagram can be classified using a classification algorithm. In this study, haar casecade and adaboost were used. Furthermore, data collection is carried out. At this stage the data on Instagram with selfie objects, food objects and tourist attractions. Next, system design is carried out. The system design used in this study is php programming language. Website-based application for photo classification. Database design is done by collecting photo set data from Instagram. Furthermore, researchers tested the system from the photo set data that had been collected. The Aras et. Implemntation Of Haar Cascade and Adaboost data set used was 600 photos. 200 selfies, 200 food photos and 200 nature or scenery photos. The final step is the drawing of conclusions made by the researcher. RESULTS AND DISCUSSION The results of research conducted by researchers using the PHP programming language. Researchers used a computer with 16 GB of RAM. Intel Core i7 Gen 11. The test was conducted using data from Instagram with a total amount of data of 500 photos. In research using two methods, namely haar casecade and adaboost have different algorithms. Here are the results obtained from both methods:Haar Casecade. Figure 3. Haar Casecade Algorithm Graph From the graph in figure 3 above shows detection with the Haar Casecade Algorithm with photo 313/313 accuracy rate 0. 7081/sec and detection failure 0. 8816/sec. Adaboost Figure 4. Adaboost Algorithm Graph From the graph in figure 4 shows the detection with the Adaboost algorithm with the same photo used as when testing the Adaboost algorithm with an accuracy level of 0. 7072/sec and a detection failure of 0. 8424/sec. The application of both algorithms in the application is seen as Inspiration: Jurnal Teknologi Informasi dan Komunikasi Volume 13. Nomor 1. June 2023: 59 Ae 68 P-ISSN : 2088-6705 E-ISSN : 2621-5608 Figure 5. Classification with the use of Selfie harstags Figure 5 is one of the data with the use of selfie harstags performed in the test with the use of two lagorithms that use can be detected. The selfies used in the test were 200 photos with pre-processing and processing stages. Photos are used with various backgrounds. The selfie category that is successfully detected if the selfie photo is a photo that does not use accessories such as glasses, masks, and hats. Another thing that the system cannot recognize is the position at the time of the selfie. In the table below are some examples that work and cannot be recognized by the system: Table 2. Selfie Detection Results Image Categorically Description Selfie Identified Selfie Identified Selfie Identified Not Selfie Not Not Selfie Not Aras et. Implemntation Of Haar Cascade and Adaboost Figure 6. Classification with the use of Food harstags Figure 6 is one of the data with the use of Food harstags performed in a test with the use of two lagorithms that use can be detected. In the food photo category, the same data was used in selife, which was 200 total photos with preprocessing and processing stages. But at the stage with the food classification category, it is slightly different from selfies. Because the pattern is recognized by more than one and the type of food photos used have different shapes, the preprocessing stage the author uses several steps to get maximum detection results. One of them is the use of RGB at the preprocessing and processing stages. Some data was successfully Here's some recognized and unrecognized data: Image Table 3. Food Detection Results Categorically Description Food Identified Food Identified Not Food Not Inspiration: Jurnal Teknologi Informasi dan Komunikasi Volume 13. Nomor 1. June 2023: 59 Ae 68 Image P-ISSN : 2088-6705 E-ISSN : 2621-5608 Categorically Description Food Identified Not Food Not Not Food Not Figure 7. Classification with the use of tourist harstags Figure 7 with the use of a tourist harstag performed in a test with the use of two lagorithms that use can be detected. The tourist photos used in the test were 200 photos with pre-processing and processing stages. At the food category stage, the same thing is done as when the selfie Here some of the data used is recognizable and unrecognizable: Aras et. Implemntation Of Haar Cascade and Adaboost Table 4. Tourism Detection Results Image Categorically Description Tourist Identified Tourist Identified Not Tourist Not Not Tourist Not Tourist Identified Not Tourist Not CONCLUSIONS AND SUGGESTIONS The results of the study with the application of two algorithms, namely Haar casecade and Adaboost with the data used in total are 600 photos originating from Instagram with narrowing the search using Harstag and dividing three categories, namely the Selfie category. Food category and travel category can be concluded the accuracy level of 0. 7081 / sec and detection 8816/sec from Haar casecade algorithm, while on Adaboost algorithm with accuracy 7072/sec and detection failure 0. 8424/sec. According to the detection results, the two algorithms can detect and classify photos with a degree of accuracy, not much different, only 0392 secound. ACKNOWLEDGEMENTS The author congratulates the Ministry of Education and Culture. Research and Technology for being financially supported to carry out research for novice lecturers. Inspiration: Jurnal Teknologi Informasi dan Komunikasi Volume 13. Nomor 1. June 2023: 59 Ae 68 P-ISSN : 2088-6705 E-ISSN : 2621-5608 REFERENCES