Image Source: Pexels
NASNetMobile architecture is another mobile architecture
We have already gone through , Predict An Image Using InceptionV3 Pretrained Model, Predict an Image Using MobileNetV3 Pretrained Model for Mobile, and in the previous blogs. We don’t need to create a new architecture from scratch for our projects; instead, we can use existing Convolutional Neural Networks(CNN) popular architectures like LeNet-5, ResNet, VGG16, VGG19, InceptionV3, MobileNetV3, NASNetMobile, etc. models to check how it predicts.
Today, we will use Convolutional Neural Networks(CNN) NASNetMobile architecture pre-trained model to predict “Flamingo” and check how much accuracy shows. NasNetMobile architecture is specially designed and tuned for Mobile phone CPUs.
We will compare NASNetMobile with ResNet50. VGG16 and VGG19 by Oxford Visual Geometry Group, MobileNetV3, and InceptionV3.
I am working on a few kinds of research on the Enterprise Resource Planning side and using Convolutional Neural Networks(CNN) Image Recognition and computer vision.
I have used Google Colab IDE for this example, and you can download it from the GitHub Repository.
array([[[[-0.8039216 , -0.47450978, -0.6313726 ], [-0.7647059 , -0.6313726 , -0.69411767], [-0.7176471 , -0.6784314 , -0.7254902 ], ..., [-0.32549018, -0.1372549 , -0.1372549 ], [-0.2235294 , -0.12941176, -0.1607843 ], [-0.70980394, -0.58431375, -0.60784316]], [[-0.6392157 , -0.4588235 , -0.6862745 ], [-0.73333335, -0.6627451 , -0.7019608 ], [-0.8666667 , -0.7411765 , -0.827451 ], ..., [-0.372549 , -0.21568626, -0.2862745 ], [-0.4823529 , -0.35686272, -0.38039213], [-0.70980394, -0.5686275 , -0.5686275 ]], [[-0.8745098 , -0.7411765 , -0.81960785], [-0.73333335, -0.654902 , -0.7254902 ], [-0.92156863, -0.79607844, -0.81960785], ..., [-0.3490196 , -0.21568626, -0.29411763], [-0.6156863 , -0.45098037, -0.49019605], [-0.78039217, -0.62352943, -0.5686275 ]], ..., [[-0.9764706 , -1. , -0.8980392 ], [-0.15294117, -0.1372549 , -0.6313726 ], [-1. , -0.99215686, -1. ], ..., [-0.20784312, -0.2862745 , -0.30196077], [ 0.12156868, 0.09019613, 0.22352946], [-0.08235294, -0.12156862, -0.16862744]], [[-0.9843137 , -1. , -0.88235295], [-0.14509803, -0.05882353, -0.654902 ], [-0.92156863, -0.9137255 , -0.9529412 ], ..., [-0.21568626, -0.30196077, -0.3333333 ], [-0.11372548, -0.1372549 , -0.20784312], [-0.15294117, -0.23137254, -0.3098039 ]], [[-0.99215686, -1. , -0.85882354], [ 0.3411765 , 0.39607847, -0.62352943], [-0.9529412 , -0.8352941 , -0.9843137 ], ..., [ 0.01176476, -0.10588235, -0.14509803], [-0.17647058, -0.35686272, -0.40392154], [-0.20784312, -0.19999999, -0.26274508]]]], dtype=float32)
WARNING:tensorflow:5 out of the last 7 calls to <function Model.make_predict_function.<locals>.predict_function at 0x7ff629f43950> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/guide/function#controlling_retracing and https://www.tensorflow.org/api_docs/python/tf/function for more details.
array([[1.21793710e-04, 2.30538732e-04, 6.30286086e-05, 4.82737014e-05, 4.20610049e-05, 8.47176561e-05, 8.36491745e-05, 1.61086151e-04, 1.89485392e-04, 4.12297377e-04, 2.57266092e-05, 3.27676913e-04, 2.21578939e-05, 3.75525269e-05, 3.60387712e-05, 8.76136037e-05, 5.51888479e-05, 1.98003618e-05, 4.66862293e-05, 6.08605988e-05, 3.95921743e-05, 3.90337809e-05, 3.88692170e-05, 2.56482672e-05, 3.34303077e-05, 6.34922399e-05, 3.85831045e-05, 1.13853384e-04, 4.15352770e-05, 4.62669777e-05, 2.62503618e-05, 6.15840472e-05, 4.72091706e-05, 8.89039075e-05, 9.21786850e-05, 3.70795751e-05, 5.32145314e-05, 4.88101905e-05, 8.53159290e-05, 5.64221809e-05, 5.59201326e-05, 6.30385257e-05, 2.94412093e-05, 4.97651963e-05, 3.59565493e-05, 1.79783441e-04, 7.29523163e-05, 6.18167687e-05, 8.90196316e-05, 5.43365932e-05, 4.81420757e-05, 7.00715027e-05, 6.83537655e-05, 8.71957454e-05, 7.15653732e-05, 7.27960069e-05, 9.67815140e-05, 2.84948255e-05, 5.83787732e-05, 7.29807725e-05, 1.62609882e-04, 5.85512280e-05, 8.92757089e-05, 6.10842326e-05, 3.26155314e-05, 1.00788224e-04, 7.87027020e-05, 6.93715483e-05, 9.43124614e-05, 3.48719586e-05, 6.04818451e-05, 3.93055743e-05, 4.49765612e-05, 6.90481975e-05, 6.01253378e-05, 1.04397572e-04, 7.37535665e-05, 4.57502829e-05, 5.04567470e-05, 5.43554052e-05, 5.02595067e-05, 2.45467472e-05, 1.96995024e-05, 8.32445876e-05, 3.88380176e-05, 5.23531562e-05, 3.04065543e-05, 6.22747539e-05, 2.53857317e-04, 3.50628761e-05, 7.16748691e-05, 4.47299208e-05, 9.32775438e-05, 1.33811307e-04, 5.61124471e-05, 5.08994490e-05, 2.37266184e-04, 4.76771856e-05, 7.01685931e-05, 3.27750982e-04, 1.60732528e-03, 3.98107150e-05, 7.16049763e-05, 4.16481598e-05, 8.45417089e-05, 2.78300722e-05, 4.37346498e-05, 4.43790341e-05, 1.24818063e-04, 1.14821443e-04, 4.38407988e-05, 9.71839327e-05, 8.76541380e-05, 5.35162253e-05, 1.50987384e-04, 5.47053933e-05, 6.25737885e-05, 3.84082814e-05, 3.38475438e-05, 4.32492088e-05, 5.11421022e-05, 4.06298386e-05, 7.02737379e-05, 4.44807702e-05, 2.28941171e-05, 2.21165774e-05, 4.56265807e-05, 2.72934674e-04, 2.38796420e-04, 2.43571034e-04, 9.21408176e-01, 1.33103531e-04, 1.63078585e-04, 1.60092211e-04, 7.46698352e-04, 1.10401437e-04, 4.29891115e-05, 5.59826694e-05, 1.57748858e-04, 5.20714748e-05, 3.63420440e-05, 7.40930191e-05, 6.84581537e-05, 4.93287807e-05, 2.83639936e-04, 1.10858062e-04, 4.89628765e-05, 6.78677097e-05, 4.10754983e-05, 8.86712223e-05, 4.28575040e-05, 7.55538640e-05, 5.69184740e-05, 3.57795325e-05, 6.02691471e-05, 1.16362644e-04, 3.52672068e-05, 4.56146627e-05, 2.83416721e-05, 6.73628820e-05, 6.87313295e-05, 4.53942921e-05, 4.41438351e-05, 7.31177352e-05, 3.89679444e-05, 3.29026989e-05, 3.55880074e-05, 6.59504949e-05, 4.38883653e-05, 5.44304676e-05, 4.81422139e-05, 5.95234342e-05, 7.07194049e-05, 1.54373934e-04, 5.14903004e-05, 3.42428357e-05, 1.05414627e-04, 4.27282612e-05, 3.59829282e-05, 2.71169010e-05, 4.37168419e-05, 3.96804717e-05, 3.77396827e-05, 1.35275695e-04, 5.86898168e-05, 1.42651697e-04, 1.45806087e-04, 7.14215203e-05, 5.64846268e-05, 8.57336127e-05, 7.68700193e-05, 1.68484294e-05, 8.16335596e-05, 3.46755696e-05, 1.25711871e-04, 2.92424793e-05, 3.68806723e-05, 7.16897703e-05, 6.95862982e-05, 1.50551859e-04, 5.73476027e-05, 3.77604920e-05, 4.06738000e-05, 5.92319193e-05, 8.69702635e-05, 3.96166106e-05, 6.42523082e-05, 4.84041193e-05, 2.95351947e-05, 6.38981292e-05, 2.70903292e-05, 6.29166025e-05, 6.07289840e-05, 3.64431435e-05, 4.37703275e-05, 9.15429409e-05, 4.94793640e-05, 4.76757268e-05, 2.98754803e-05, 5.07064287e-05, 7.12300316e-05, 4.10262510e-05, 4.73273212e-05, 7.77682071e-05, 9.38599696e-05, 1.05718573e-04, 4.90241327e-05, 6.23191372e-05, 5.95261627e-05, 2.94108158e-05, 3.92725269e-05, 5.16896107e-05, 6.41550141e-05, 8.64266331e-05, 4.23730271e-05, 7.29985986e-05, 3.25580695e-05, 3.03440975e-05, 4.90234743e-05, 5.85768066e-05, 6.65075713e-05, 6.91735549e-05, 3.48586254e-05, 6.09782437e-05, 8.15261883e-05, 1.87724054e-05, 7.32002736e-05, 7.57519156e-05, 7.58948008e-05, 5.34325882e-05, 1.13268572e-04, 7.69653852e-05, 6.72926981e-05, 1.06285079e-04, 6.89063017e-05, 9.59318786e-05, 5.36824555e-05, 2.85062160e-05, 5.71678393e-05, 1.23675709e-04, 9.05113848e-05, 9.60725956e-05, 4.56200542e-05, 5.90920499e-05, 5.57357562e-05, 4.33918613e-05, 4.05891333e-05, 3.92677321e-05, 4.66064230e-05, 4.07473744e-05, 8.51136574e-05, 5.83731489e-05, 2.94461242e-05, 1.37128591e-04, 1.77056092e-04, 1.42981429e-04, 4.44958714e-05, 9.02890388e-05, 8.29784258e-05, 8.75943879e-05, 6.35100441e-05, 5.71655000e-05, 1.05724816e-04, 8.46601470e-05, 4.91218016e-05, 6.83941325e-05, 3.21443113e-05, 2.14995689e-05, 3.26536538e-05, 4.31360131e-05, 2.78392308e-05, 1.02458325e-04, 1.61030548e-04, 2.00243649e-05, 5.28714081e-05, 1.15707880e-04, 1.73963170e-04, 8.52062440e-05, 3.57424615e-05, 3.28403803e-05, 4.89933300e-05, 1.16137584e-04, 4.64500517e-05, 4.83059375e-05, 7.41799086e-05, 3.34010547e-05, 3.13144010e-05, 7.91966886e-05, 6.35733013e-05, 7.65298973e-05, 7.90111881e-05, 4.47597922e-05, 4.68139187e-05, 4.43339850e-05, 5.74560509e-05, 5.03646843e-05, 6.97031937e-05, 5.96705286e-05, 5.51667472e-05, 5.53932805e-05, 1.03040191e-04, 5.01071263e-05, 5.56837986e-05, 5.65387381e-05, 3.93882001e-05, 3.90343193e-04, 6.69653746e-05, 7.01817844e-05, 4.71171006e-05, 5.57993117e-05, 4.29213542e-05, 4.75165398e-05, 9.87356398e-05, 7.34082496e-05, 8.89188304e-05, 6.31435760e-05, 1.87113837e-05, 2.76969968e-05, 3.27602684e-05, 7.75635563e-05, 5.44139111e-05, 5.89005358e-05, 9.48458910e-05, 4.18436393e-05, 5.91284697e-05, 3.46817542e-05, 4.01642610e-05, 2.47725093e-05, 4.35311267e-05, 6.03625631e-05, 5.18587221e-05, 1.08721651e-04, 1.69421008e-04, 1.67561579e-04, 1.90163715e-04, 9.67214437e-05, 5.11549806e-05, 2.66529914e-05, 4.50392290e-05, 6.66426131e-05, 3.67470493e-05, 8.64572139e-05, 6.69238725e-05, 2.42802107e-05, 4.44393008e-05, 2.71967219e-05, 5.55985789e-05, 3.11383446e-05, 6.36613986e-05, 3.41762861e-05, 3.70887028e-05, 5.51687990e-05, 2.99595067e-05, 3.31045449e-05, 3.08721064e-05, 4.49296604e-05, 8.36743056e-05, 2.91866436e-05, 8.02523718e-05, 6.36745172e-05, 4.40566509e-05, 1.21843550e-04, 1.09343244e-04, 6.14165983e-05, 7.40574105e-05, 6.96752832e-05, 4.64912700e-05, 4.82929972e-05, 7.63081916e-05, 3.97223084e-05, 7.12885449e-05, 3.93879745e-05, 9.49081441e-05, 1.32649104e-04, 6.23912711e-05, 2.95582140e-05, 8.50482611e-05, 2.47614553e-05, 3.60070590e-05, 3.35992954e-05, 1.10537127e-04, 1.15750372e-04, 1.28955711e-04, 3.83594852e-05, 4.22113735e-05, 5.86403003e-05, 4.96849570e-05, 5.88783514e-05, 7.53557688e-05, 6.56286284e-05, 4.60475821e-05, 2.26614182e-04, 3.56473829e-05, 5.86839960e-05, 5.44542454e-05, 4.07495900e-05, 3.27281014e-05, 1.24427519e-04, 4.13398993e-05, 8.38494889e-05, 8.28710326e-05, 9.20265593e-05, 6.48657078e-05, 1.11422036e-04, 7.75587469e-05, 1.51585118e-04, 5.38181921e-05, 2.95040318e-05, 9.75185394e-05, 1.16208221e-05, 8.70882868e-05, 2.86746363e-05, 3.73737093e-05, 1.81348398e-04, 3.53900505e-05, 4.99458220e-05, 1.28456275e-04, 4.95938293e-05, 6.31086587e-05, 8.90544397e-05, 3.30405164e-05, 6.36481636e-05, 5.09044003e-05, 7.83572250e-05, 7.17223156e-05, 6.40372818e-05, 1.62278429e-05, 6.09230228e-05, 1.11270827e-04, 6.78717188e-05, 6.80002704e-05, 7.64306242e-05, 5.89203664e-05, 3.18137791e-05, 4.50705957e-05, 5.34518040e-05, 6.32403026e-05, 5.28225719e-05, 5.74096048e-05, 8.33616068e-05, 3.03636098e-05, 7.82952266e-05, 5.25706419e-05, 6.04312190e-05, 6.43748499e-05, 7.42658449e-05, 4.36635528e-05, 4.21945915e-05, 1.23184844e-04, 3.53444484e-05, 8.22800139e-05, 4.32074849e-05, 7.76130619e-05, 5.45133225e-05, 1.09970810e-04, 5.91439202e-05, 1.71437059e-04, 1.21596182e-04, 8.08507175e-05, 8.22865259e-05, 4.21005352e-05, 9.80954501e-05, 1.62707613e-04, 6.92877729e-05, 8.04701049e-05, 9.45482243e-05, 6.15466561e-05, 3.65266496e-05, 7.28294835e-05, 2.90682565e-05, 4.14051210e-05, 4.99870439e-05, 4.26048864e-05, 3.85379826e-05, 7.39197494e-05, 6.85218329e-05, 1.15934301e-04, 3.61781349e-05, 5.01418290e-05, 6.81051461e-05, 7.45442885e-05, 3.69033987e-05, 4.66439051e-05, 8.20688147e-05, 3.29846989e-05, 1.00391931e-04, 4.26641272e-05, 4.92993386e-05, 7.06957435e-05, 3.98955053e-05, 2.91262240e-05, 4.22305820e-05, 9.05363340e-05, 9.38253361e-05, 3.77189936e-05, 7.90536942e-05, 3.76324715e-05, 6.26419715e-05, 5.84986483e-05, 3.55017037e-05, 2.04578264e-05, 7.45182697e-05, 1.73077016e-04, 1.28616113e-04, 5.05820608e-05, 4.46358717e-05, 3.87631226e-05, 5.35722938e-05, 3.26210356e-05, 3.54288823e-05, 1.25276842e-04, 5.65664595e-05, 4.59854891e-05, 6.80491794e-05, 3.67161520e-05, 4.80760100e-05, 3.18266466e-05, 7.43591081e-05, 1.30322092e-04, 5.25192772e-05, 4.97133042e-05, 6.94021874e-05, 4.96047578e-05, 1.89373197e-04, 9.22157051e-05, 7.78252579e-05, 8.44128081e-05, 5.65639239e-05, 5.13980194e-05, 5.98198094e-05, 1.21538214e-04, 7.15427232e-05, 2.79169588e-04, 5.86048554e-05, 2.44000094e-05, 8.23741502e-05, 4.57863789e-05, 1.52118344e-04, 1.57216073e-05, 2.82163219e-05, 1.03153063e-04, 5.51930571e-05, 1.03498642e-04, 1.57481227e-05, 1.16114112e-04, 3.16271326e-05, 5.67815223e-05, 7.42036864e-05, 4.82090181e-05, 5.06788238e-05, 8.16392348e-05, 7.71172490e-05, 1.14784329e-04, 5.80563647e-05, 1.74574772e-04, 3.41234583e-04, 4.70934247e-05, 7.92368810e-05, 7.81416311e-05, 3.99225646e-05, 1.54557027e-04, 8.44682072e-05, 4.01273901e-05, 4.25937142e-05, 1.32306974e-04, 1.19133809e-04, 4.35393049e-05, 4.76286477e-05, 2.77895215e-05, 5.28169330e-05, 4.17142255e-05, 4.91929168e-05, 4.96379289e-05, 1.13570350e-04, 6.28431444e-05, 4.17814736e-05, 4.84678167e-05, 6.97651776e-05, 3.78644181e-05, 5.93287587e-05, 1.54285328e-04, 1.70170097e-04, 6.39034988e-05, 3.89960478e-05, 2.15125729e-05, 9.86412342e-05, 1.00999132e-04, 2.03007818e-04, 9.75588191e-05, 1.08158136e-04, 6.94917253e-05, 3.79035118e-05, 6.20648061e-05, 7.34572750e-05, 8.17423133e-05, 5.45977164e-05, 8.77653001e-05, 3.18906314e-05, 8.46049443e-05, 1.08249558e-04, 8.48228301e-05, 7.52192063e-05, 1.06544278e-04, 2.91484248e-05, 4.78487273e-05, 4.35121583e-05, 5.31247824e-05, 1.77913069e-04, 1.87834721e-05, 7.84433578e-05, 4.45825681e-05, 4.86198041e-05, 1.27818988e-04, 7.60444818e-05, 1.03275117e-04, 7.90781269e-05, 1.13695729e-04, 1.09041881e-04, 1.16381067e-04, 8.57117848e-05, 6.81966558e-05, 4.92042273e-05, 4.05641731e-05, 7.85761076e-05, 1.04584215e-04, 8.98463404e-05, 3.04538436e-04, 8.67775598e-05, 6.50985967e-05, 8.35773317e-05, 8.65188267e-05, 7.54629218e-05, 5.33078928e-05, 3.34744618e-05, 1.14841489e-04, 2.40889276e-04, 7.70137704e-05, 3.55325938e-05, 4.30983055e-05, 1.85193960e-04, 5.25542018e-05, 5.44270915e-05, 6.53083407e-05, 2.97757560e-05, 9.48533998e-05, 4.65824705e-05, 3.99283927e-05, 9.10339877e-05, 9.19227023e-05, 7.89233745e-05, 3.23130807e-05, 8.31203579e-05, 1.41408134e-04, 3.48177273e-05, 9.48050147e-05, 8.95360135e-05, 5.11045146e-05, 5.38867025e-05, 5.11304970e-05, 5.95416022e-05, 6.95509298e-05, 5.77144347e-05, 9.42625556e-05, 5.22160844e-05, 4.82682262e-05, 7.71998093e-05, 4.90186139e-05, 2.03282434e-05, 8.22356160e-05, 1.03202357e-04, 6.05622445e-05, 8.68807401e-05, 5.54777616e-05, 5.77231294e-05, 5.12543556e-05, 1.05483516e-04, 6.54780961e-05, 7.71800114e-05, 1.29675929e-04, 2.03437176e-05, 2.92419500e-05, 1.03000100e-04, 9.15270502e-05, 7.99245536e-05, 4.17305018e-05, 7.84759104e-05, 5.58281608e-05, 6.70783775e-05, 6.13433731e-05, 5.81007334e-05, 8.50113574e-05, 1.77333743e-04, 5.11725957e-05, 5.46535084e-05, 3.27845519e-05, 3.34879369e-05, 3.90781788e-05, 4.39748401e-05, 2.72682719e-05, 4.95783643e-05, 3.85996682e-05, 1.69473686e-04, 6.85664199e-05, 1.46310311e-04, 3.75687887e-05, 8.48958298e-05, 4.35228249e-05, 1.72308079e-04, 7.42351112e-05, 5.27094016e-05, 7.11898319e-05, 7.42416960e-05, 1.13906710e-04, 5.75351187e-05, 7.40933756e-05, 6.16657417e-05, 2.19319318e-05, 6.65884945e-05, 4.92624931e-05, 8.26630421e-05, 8.76237173e-05, 2.86261929e-05, 4.45669248e-05, 3.89283523e-05, 2.92264758e-05, 8.72059754e-05, 5.29292774e-05, 6.41935694e-05, 4.77578214e-05, 5.22459704e-05, 6.62524544e-05, 1.03601145e-04, 2.25650074e-05, 2.26018146e-05, 8.44528258e-05, 6.85122286e-05, 8.01505666e-05, 7.03599726e-05, 2.53486578e-05, 7.84032673e-05, 4.12634836e-05, 6.19422281e-05, 8.94439290e-05, 5.91914322e-05, 9.46682339e-05, 5.24245515e-05, 4.35779803e-05, 5.63574831e-05, 5.06025171e-05, 5.06543729e-05, 7.40384930e-05, 6.24311506e-05, 1.24444734e-04, 3.09071620e-05, 1.03306636e-04, 1.18862132e-04, 3.08157469e-05, 1.88354552e-05, 4.36571790e-05, 1.16637515e-04, 3.02005865e-05, 3.60636623e-05, 4.87157849e-05, 4.43759454e-05, 9.04203625e-05, 2.86870800e-05, 8.69681899e-05, 8.93630131e-05, 8.34319144e-05, 2.34747495e-05, 1.83572611e-05, 5.36276020e-05, 1.57879796e-04, 1.11131376e-04, 2.20517941e-05, 1.03594328e-04, 3.68479778e-05, 6.61387603e-05, 1.90036517e-05, 5.35503787e-05, 9.39371603e-05, 1.01975020e-04, 9.03030814e-05, 8.93407778e-05, 4.47241182e-05, 5.42029593e-05, 3.84062296e-05, 4.32194392e-05, 8.10349011e-05, 3.89106062e-05, 7.51277257e-05, 3.02784520e-05, 7.62194686e-05, 8.43383750e-05, 1.09846915e-04, 1.04756007e-04, 3.19619430e-05, 1.09678076e-04, 6.75600677e-05, 8.98059880e-05, 4.73265536e-05, 3.71329043e-05, 1.29487846e-04, 1.20059718e-04, 3.87860528e-05, 6.79512596e-05, 6.98073709e-05, 1.19120858e-04, 9.73908391e-05, 1.27900203e-04, 6.59507496e-05, 7.40233809e-05, 5.79533626e-05, 2.64304745e-05, 9.51304246e-05, 7.54430584e-05, 1.27945837e-04, 1.56053982e-04, 8.69696014e-05, 4.84348275e-05, 6.00786843e-05, 4.01612378e-05, 1.76396425e-04, 2.70412740e-04, 1.75845344e-04, 3.72120994e-05, 9.58873352e-05, 3.94371418e-05, 2.12099447e-04, 4.31149929e-05, 6.66653068e-05, 9.98681644e-05, 2.59322424e-05, 8.43672533e-05, 5.84003792e-05, 4.73353575e-05, 3.20820182e-05, 6.75136253e-05, 3.58068392e-05, 8.44560491e-05, 5.40463006e-05, 2.36451961e-05, 8.59682623e-05, 3.65018568e-05, 6.04288616e-05, 6.62759558e-05, 3.83024599e-05, 4.43793324e-05, 1.74934918e-04, 6.97962460e-05, 5.77297942e-05, 8.89617513e-05, 4.25819781e-05, 2.10315268e-03, 5.52994861e-05, 7.33999914e-05, 6.73497125e-05, 6.11602445e-05, 7.42880875e-05, 1.89370679e-04, 1.22357422e-04, 3.36009907e-05, 9.95708833e-05, 7.34099376e-05, 1.42881938e-04, 1.20329998e-04, 5.60448461e-05, 3.32798481e-05, 4.27627056e-05, 7.34723362e-05, 6.04436100e-05, 2.08957179e-04, 5.49087163e-05, 5.36101143e-05, 1.25538878e-04, 2.43721261e-05, 9.27985820e-05, 8.41062501e-05, 3.38656901e-05, 7.36557922e-05, 6.40066937e-05, 5.04898162e-05, 1.60997239e-04, 1.95542816e-04, 8.96995116e-05, 2.55041141e-05, 9.82514248e-05, 6.54081887e-05, 4.65630619e-05, 7.89791666e-05, 4.39192227e-05, 8.58123021e-05, 2.84988746e-05, 4.22385165e-05, 6.65911575e-05, 7.34272253e-05, 1.05641564e-04, 5.79685075e-05, 3.33574753e-05, 5.73876459e-05, 2.18996011e-05, 7.62646887e-05, 5.64350375e-05, 2.14086540e-04, 8.27266049e-05, 7.23611302e-05, 4.56096604e-05, 7.20216412e-05, 6.33365707e-05, 9.01013555e-05, 3.49368711e-05, 9.92923815e-05, 1.31827619e-04, 8.30210120e-05, 5.55554871e-05, 7.95068045e-05, 1.65744364e-04, 3.89299457e-05, 4.31890294e-05, 9.73228671e-05, 1.57541392e-04, 6.01933862e-05, 1.28791144e-04, 6.16652687e-05, 3.81572099e-05, 4.91479514e-05, 5.14825442e-05, 1.41133569e-04, 1.39839336e-04, 5.06659708e-05, 4.16619092e-04, 8.59910215e-04, 1.10956847e-04, 3.25170768e-05, 7.24891797e-05, 1.93364976e-04, 2.35516436e-05, 1.69612424e-04, 3.67210196e-05, 8.81206579e-05, 8.95782869e-05, 1.89062659e-04, 7.17260118e-05, 2.61385248e-05, 8.99075385e-05, 2.75282000e-05, 9.90394983e-05, 1.00887759e-04, 8.11761420e-05, 1.40250966e-04, 8.42028749e-05, 1.30797736e-04, 6.67192435e-05, 6.98589793e-05, 3.47328605e-05, 8.07704128e-05, 3.14998942e-05, 1.33422393e-04, 1.03749153e-04, 8.17835535e-05, 1.40662582e-04, 3.39732469e-05, 4.65416160e-05, 6.75572956e-05, 1.18283831e-04, 7.24761194e-05, 4.15212737e-04, 7.45934303e-05, 3.71009410e-05, 1.72309548e-04, 7.90638005e-05, 6.93331240e-05, 7.57084345e-05, 3.60434424e-05, 1.23334015e-04, 4.51118358e-05, 9.46750879e-05, 1.06769476e-04, 7.93746804e-05, 4.27499035e-05]], dtype=float32)
[[('n02007558', 'flamingo', 0.9214082), ('n04486054', 'triumphal_arch', 0.0021031527), ('n01860187', 'black_swan', 0.0016073253), ('n07749582', 'lemon', 0.0008599102), ('n02012849', 'crane', 0.00074669835)]]
Hurray! it predicted as “Flamingo” with 0.92 prediction accuracy.
Let’s check the prediction accuracy on VGG19, VGG16, InceptionV3, MobileNetV3, and ResNet50.
[[('n02012849', 'crane', 0.7303488), ('n02009912', 'American_egret', 0.15676753), ('n02007558', 'flamingo', 0.067069136), ('n02009229', 'little_blue_heron', 0.03742734), ('n03388043', 'fountain', 0.002747606)]]
VGG19:
[[('n02009912', 'American_egret', 0.49541578), ('n02012849', 'crane', 0.37884706), ('n02009229', 'little_blue_heron', 0.11860012), ('n02007558', 'flamingo', 0.0025609955), ('n02006656', 'spoonbill', 0.0023633465)]]
InceptionV3:
[('n02007558', 'flamingo', 0.94305456), ('n02012849', 'crane', 0.0009208125), ('n04550184', 'wardrobe', 0.0006756062), ('n02009912', 'American_egret', 0.00046367754), ('n01860187', 'black_swan', 0.00044391607)]]
MobileNetV3:
[[('n02007558', 'flamingo', 0.62121254), ('n02012849', 'crane', 0.030542558), ('n02002724', 'black_stork', 0.009830186), ('n13040303', 'stinkhorn', 0.005730417), ('n03532672', 'hook', 0.0049227206)]]
[[('n03388043', 'fountain', 0.54863626), ('n02007558', 'flamingo', 0.055300727), ('n01806143', 'peacock', 0.04455783), ('n04209133', 'shower_cap', 0.0367395), ('n04507155', 'umbrella', 0.033092268)]]
In this example, we could see NASNetMobile InceptionV3, and MobileNetV3 pretrained models predicts as "Flamingo".
Leave A Comment