|
APP_NAME = "Final Projects" |
|
AUTHOR_NAME = "Hafidh Soekma Ardiansyah" |
|
EMAIL_NAME = "hafidhsoekma@gmail.com" |
|
UNIVERSITY_NAME = "Surabaya State University" |
|
MAJOR_NAME = "Management Informatics" |
|
SEMESTER_GRADE_NAME = "Semester 8" |
|
RESIDENCE_NAME = "Pasuruan, East Java, Indonesia" |
|
LINKEDIN_NAME = "https://www.linkedin.com/in/hafidhsoekma/" |
|
GITHUB_NAME = "https://www.github.com/hafidh561" |
|
LINKTREE_NAME = "https://linktr.ee/hafidhsoekma" |
|
ABOUT_ME = "I am an AI Engineer with 2+ years of experience in developing computer vision apps using PyTorch and TensorFlow. Skilled in Python and libraries such as NumPy, Pandas, Scikit-Learn, OpenCV, and more. Also familiar with NLP, reinforcement learning, optimization, and backend API apps. Currently focused on computer vision app development but am open to projects or works with my other familiar skills." |
|
|
|
EMBEDDED_VALUES_PATH = "./weights/prototypical_networks/" |
|
WEIGHTS_PATH = "./weights/deep_learning/" |
|
DEFAULT_IMAGES_PATH = "./assets/example_images" |
|
CLASS_CHARACTERS = ( |
|
"gon", |
|
"hisoka", |
|
"killua", |
|
"kurapika", |
|
"leorio", |
|
"not hunter x hunter character", |
|
) |
|
SUPPORT_SET_METHODS = ("1_shot", "3_shot", "5_shot") |
|
NAME_MODELS = { |
|
"clip": { |
|
"image_similarity_threshold": 0.11639473049489533, |
|
"deep_learning_out_of_distribution_threshold": { |
|
SUPPORT_SET_METHODS[0]: 0.961816022991822, |
|
SUPPORT_SET_METHODS[1]: 0.9802108045423086, |
|
SUPPORT_SET_METHODS[2]: 0.9255655260002051, |
|
}, |
|
}, |
|
"vit_base_patch16_224_dino": { |
|
"image_similarity_threshold": 0.015265149081440561, |
|
"deep_learning_out_of_distribution_threshold": { |
|
SUPPORT_SET_METHODS[0]: 0.010456596584911406, |
|
SUPPORT_SET_METHODS[1]: 0.007849406492441056, |
|
SUPPORT_SET_METHODS[2]: 0.008647647946935675, |
|
}, |
|
}, |
|
"resnet50": { |
|
"image_similarity_threshold": 0.13558146433954904, |
|
"deep_learning_out_of_distribution_threshold": { |
|
SUPPORT_SET_METHODS[0]: 0.9850751426856094, |
|
SUPPORT_SET_METHODS[1]: 0.978944060038107, |
|
SUPPORT_SET_METHODS[2]: 0.988441473541884, |
|
}, |
|
}, |
|
"vgg16": { |
|
"image_similarity_threshold": 0.026766999256468353, |
|
"deep_learning_out_of_distribution_threshold": { |
|
SUPPORT_SET_METHODS[0]: 0.8536164277651976, |
|
SUPPORT_SET_METHODS[1]: 0.35677140466654966, |
|
SUPPORT_SET_METHODS[2]: 0.007097883451058687, |
|
}, |
|
}, |
|
"inception_v4": { |
|
"image_similarity_threshold": 0.037244822833773165, |
|
"deep_learning_out_of_distribution_threshold": { |
|
SUPPORT_SET_METHODS[0]: 0.92820986831184589, |
|
SUPPORT_SET_METHODS[1]: 0.9020234394459585, |
|
SUPPORT_SET_METHODS[2]: 0.7220187629430316, |
|
}, |
|
}, |
|
"efficientnet_b4": { |
|
"image_similarity_threshold": 0.17555058685090788, |
|
"deep_learning_out_of_distribution_threshold": { |
|
SUPPORT_SET_METHODS[0]: 0.9271371810463894, |
|
SUPPORT_SET_METHODS[1]: 0.5318528053369291, |
|
SUPPORT_SET_METHODS[2]: 0.8064065524435863, |
|
}, |
|
}, |
|
"mobilenetv3_large_100": { |
|
"image_similarity_threshold": 0.047335305338748856, |
|
"deep_learning_out_of_distribution_threshold": { |
|
SUPPORT_SET_METHODS[0]: 0.9491289555024716, |
|
SUPPORT_SET_METHODS[1]: 0.9586538707971848, |
|
SUPPORT_SET_METHODS[2]: 0.9010685291948485, |
|
}, |
|
}, |
|
"densenet121": { |
|
"image_similarity_threshold": 0.03336132699569965, |
|
"deep_learning_out_of_distribution_threshold": { |
|
SUPPORT_SET_METHODS[0]: 0.9049037713033348, |
|
SUPPORT_SET_METHODS[1]: 0.8722439933380164, |
|
SUPPORT_SET_METHODS[2]: 0.9002663720514151, |
|
}, |
|
}, |
|
} |
|
CLIP_NAME_MODEL = "openai/clip-vit-base-patch16" |
|
SIZE_IMAGES = 224 |
|
RANDOM_SEED = 3407 |
|
NORMALIZE_IMAGE_MEAN = (0.485, 0.456, 0.406) |
|
NORMALIZE_IMAGE_STD = (0.229, 0.224, 0.225) |
|
LIST_DEFAULT_CLASSES_FOR_ZERO_SHOT = { |
|
"Indonesian Hero": ( |
|
"Soekarno", |
|
"Mohammad Hatta", |
|
"R.A. Kartini", |
|
"Ki Hajar Dewantara", |
|
"Tjut Njak Dien", |
|
"I Gusti Ngurah Rai", |
|
"Sultan Hasanuddin", |
|
"Pattimura", |
|
"Diponegoro", |
|
"Cut Nyak Dien", |
|
"Teuku Umar", |
|
"Tuanku Imam Bonjol", |
|
"Kapitan Pattimura", |
|
"Untung Suropati", |
|
"Supriyadi", |
|
"Raden Ajeng Kartini", |
|
"Raden Said Soekanto Tjokrodiatmodjo", |
|
"Not Indonesian Hero", |
|
), |
|
"Indonesian Puppet": ( |
|
"Semar", |
|
"Gareng", |
|
"Petruk", |
|
"Bagong", |
|
"Togog", |
|
"Cepot", |
|
"Dawala", |
|
"Bismania", |
|
"Merdi", |
|
"Barong", |
|
"Kethek", |
|
"Keris Tumpul", |
|
"Panji", |
|
"Gunungan", |
|
"Not Indonesian Puppet", |
|
), |
|
"Indonesian President": ( |
|
"Soekarno", |
|
"Soeharto", |
|
"B.J. Habibie", |
|
"Abdurrahman Wahid", |
|
"Megawati Sukarnoputri", |
|
"Susilo Bambang Yudhoyono", |
|
"Joko Widodo", |
|
"Not Indonesian President", |
|
), |
|
"Indonesian Politician": ( |
|
"Joko Widodo", |
|
"Prabowo Subianto", |
|
"Megawati Soekarnoputri", |
|
"Susilo Bambang Yudhoyono", |
|
"Agus Harimurti Yudhoyono", |
|
"Anies Baswedan", |
|
"Ridwan Kamil", |
|
"Sandiaga Uno", |
|
"Basuki Tjahaja Purnama", |
|
"Siti Nurbaya Bakar", |
|
"Siti Fadilah Supari", |
|
"Bambang Brodjonegoro", |
|
"Rizal Ramli", |
|
"Sri Mulyani Indrawati", |
|
"Mahfud MD", |
|
"Yusril Ihza Mahendra", |
|
"Aburizal Bakrie", |
|
"Jusuf Kalla", |
|
"Amien Rais", |
|
"Gatot Nurmantyo", |
|
"Wiranto", |
|
"Agum Gumelar", |
|
"Hatta Rajasa", |
|
"Luhut Binsar Pandjaitan", |
|
"Teten Masduki", |
|
"Muhaimin Iskandar", |
|
"Mardani Ali Sera", |
|
"Fadli Zon", |
|
"Ahok", |
|
"Not Indonesian Politician", |
|
), |
|
"Indonesian Food": ( |
|
"Nasi Goreng", |
|
"Sate", |
|
"Rendang", |
|
"Gado-Gado", |
|
"Bakso", |
|
"Nasi Uduk", |
|
"Soto", |
|
"Mie Goreng", |
|
"Ayam Goreng", |
|
"Nasi Kuning", |
|
"Nasi Padang", |
|
"Gudeg", |
|
"Rawon", |
|
"Lontong Cap Go Meh", |
|
"Martabak", |
|
"Pempek", |
|
"Ketoprak", |
|
"Nasi Liwet", |
|
"Babi Guling", |
|
"Pisang Goreng", |
|
"Not Indonesian Food", |
|
), |
|
"Indonesian Temple": ( |
|
"Borobudur", |
|
"Prambanan", |
|
"Candi Mendut", |
|
"Candi Sewu", |
|
"Candi Plaosan", |
|
"Candi Kalasan", |
|
"Candi Sari", |
|
"Candi Gebang", |
|
"Candi Banyunibo", |
|
"Candi Ratubaka", |
|
"Candi Sukuh", |
|
"Candi Jawi", |
|
"Candi Kidal", |
|
"Candi Penataran", |
|
"Not Indonesian Temple", |
|
), |
|
"Indonesian Traditional Dress": ( |
|
"Kebaya", |
|
"Batik", |
|
"Songket", |
|
"Ulos", |
|
"Sarong", |
|
"Sasirangan", |
|
"Tenun", |
|
"Palembang Songket", |
|
"Tapis", |
|
"Baju Kurung", |
|
"Baju Bodo", |
|
"Ikat", |
|
"Baju Kebaya Kutu Baru", |
|
"Beskap", |
|
"Baju Bali", |
|
"Blangkon", |
|
"Not Indonesian Traditional Dress", |
|
), |
|
"Indonesian Traditional Musical Instrument": ( |
|
"Angklung", |
|
"Gamelan", |
|
"Kendang", |
|
"Suling", |
|
"Rebana", |
|
"Serunai", |
|
"Gendang beleq", |
|
"Kolintang", |
|
"Arumba", |
|
"Talempong", |
|
"Sasando", |
|
"Saluang", |
|
"Gong", |
|
"Bonang", |
|
"Kompang", |
|
"Not Indonesian Traditional Musical Instrument", |
|
), |
|
} |
|
|