File size: 7,684 Bytes
76dfa20 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 |
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",
),
}
|