IMPLEMENTASI OPTICAL CHARACTER RECOGNITION DAN ALGORITMA AHO-CORASICK UNTUK DETEKSI BAHAN BERBAHAYA PADA PRODUK SKINCARE
Abstrak
Perkembangan industri skincare di Indonesia memunculkan tantangan terhadap keberadaan bahan kimia berbahaya dalam produk. Pengguna awam kesulitan mengidentifikasi bahan berbahaya dalam daftar komposisi pada kemasan. Penelitian ini bertujuan mengembangkan sistem deteksi otomatis berbasis Tesseract OCR untuk ekstraksi teks dari gambar kemasan, serta algoritma Aho-Corasick untuk mendeteksi bahan berbahaya. Dataset terdiri atas 5.328 bahan skincare dari Kaggle dan 1.004 bahan berbahaya dari CDPH yang diklasifikasikan ke dalam empat kategori risiko. Uji coba pada 30 gambar produk menunjukkan akurasi ekstraksi Tesseract OCR mencapai 93,43% (Word Accuracy) dan 97,06% (Character Accuracy). Deteksi bahan berbahaya menggunakan Aho-Corasick mencapai akurasi 100%. Hasil ini menunjukkan sistem efektif membantu konsumen dalam mengenali bahan berbahaya pada produk skincare. Kata Kunci: OCR, Tesseract, Aho-Corasick, skincare, bahan berbahaya, ekstraksi teks, deteksi otomatis. ABSTRACT The growth of the skincare industry in Indonesia presents challenges regarding the presence of harmful chemical substances in products. General consumers often struggle to identify hazardous ingredients listed on product packaging. This study aims to develop an automated detection system using Tesseract OCR for text extraction from packaging images and the Aho-Corasick algorithm for detecting harmful ingredients. The dataset consists of 5,328 skincare ingredients from Kaggle and 1,004 hazardous substances from CDPH, classified into four risk categories. Experiments on 30 product images showed that Tesseract OCR achieved a text extraction accuracy of 93.43% (Word Accuracy) and 97.06% (Character Accuracy). The detection of hazardous substances using the Aho-Corasick algorithm reached 100% accuracy. These results indicate that the system is effective in assisting consumers in identifying harmful ingredients in skincare products.
Identifier
- DOI: https://doi.org/10.30587/indexia.v7i2.10242
- OpenAlex: https://openalex.org/W4415096580

