# Classification and Fast Few-Shot Learning of Steel Surface Defects with Randomized Network
## 6 Testing Few-Shot Learning with EffNet+RC
#### Time Complexity  
While the average inference time for an image of size \(128\times 128\) is around 0.06 s, the time complexity of re-configuring, re-training, or fine-tuning the classification methods can still cause problems in industrial applications. Stopping the production while waiting for adaptation to avoid new defects, or continuing the production with an increased ratio of false products, can both result in high costs. Due to these reasons, the extremely fast re-tuning of our model has a significant advantage over others. Table 7 and Figure 9 both contain the training times of the different models. **EffNet+RC** has constantly very low time requirements, independently from the number of shots, at least one order faster than **EffNet+FIC (100)**, the next fastest. The reason why **Ft EffNet Unbal** seems to be so slow is due to the large number of training images in each epoch (\(835+k(shots)\times 3(new\ classes)\)), while in case of **Ft EffNet**, the training set contained far less images (since it was balanced).  
\begin{table}
\begin{tabular}{c c c c c c c c c c c c} \hline \hline \multirow{2}{*}{**Method**} & \multicolumn{2}{c}{**1 Shot**} & \multicolumn{2}{c}{**3 Shots**} & \multicolumn{2}{c}{**5 Shots**} & \multicolumn{2}{c}{**10 Shots**} & \multicolumn{2}{c}{**15 Shots**} & \multicolumn{2}{c}{**20 Shots**} \\ \cline{2-13}  & **F\({}_{\mathbf{1}}\) Score** & **Rank** & **\(F_{\mathbf{1}}\) Score** & **Rank** & **\(F_{\mathbf{1}}\) Score** & **Rank** & **\(F_{\mathbf{1}}\) Score** & **Rank** & **\(F_{\mathbf{1}}\) Score** & **Rank** \\ \hline EffNet+RC & **82.4\%** & 1 & **87.00\%** & 1 & 89.20\% & 2 & **92.20\%** & 1 & 92.20\% & 3 & 92.6 \% & 3 \\ EffNet+FIC (100) & 76.8 \% & 4 & 77.4 \% & 5 & 78.6 \% & 5 & 82.4 \% & 5 & 84.6 \% & 5 & 85.6 \% & 5 \\ EffNet+FIC (200) & 78.75 \% & 2 & 86.00 \% & 3 & 85.5 \% & 3 & 90.5 \% & 3 & 91.5 \% & 4 & 92.5 \% & 4 \\ Ft EffNet & 78.20 \% & 3 & 85.8 \% & 4 & 83.4 \% & 4 & 89.8 \% & 4 & 92.6 \% & 2 & 94.80 \% & 2 \\ Ft EffNet Unbal & 70.8 \% & 5 & 86.2 \% & 2 & **90.8 \%** & 1 & 90.8\% & 2 & **95.8 \%** & 1 & **96.8 \%** & 1 \\ \hline \hline \end{tabular}
\end{table}
Table 6: The weighted \(F_{\mathbf{1}}\) score and rank of the different classification models evaluated on all classes (base and new). Our values are highlighted in bold.  
\begin{table}
\begin{tabular}{c c c c c c c c c c c} \hline \hline \multirow{2}{*}{**Method**} & \multicolumn{2}{c}{**1 Shot**} & \multicolumn{2}{c}{**3 Shots**} & \multicolumn{2}{c}{**5 Shots**} & \multicolumn{2}{c}{**10 Shots**} & \multicolumn{2}{c}{**15 Shots**} & \multicolumn{2}{c}{**20 Shots**} \\ \cline{2-13}  & **Accuracy** & **Rank** & **Accuracy** & **Rank** & **Accuracy** & **Rank** & **Accuracy** & **Rank** & **Accuracy** & **Rank** \\ \hline EffNet+RC & **82.75\%** & 1 & **88.50\%** & 1 & 90.39\% & 2 & **92.14\%** & 1 & 92.62\% & 3 & 93.31\% & 3 \\ EffNet+FIC (100) & 78.13\% & 4 & 80.29\% & 5 & 81.56\% & 5 & 83.50\% & 5 & 84.92\% & 5 & 85.89\% & 5 \\ EffNet+FIC (200) & 76.94\% & 5 & 83.95\% & 4 & 85.97\% & 4 & 89.25\% & 4 & 90.82\% & 4 & 92.31\% & 4 \\ Ft EffNet & 79.40\% & 2 & 85.51\% & 3 & 85.24\% & 3 & 89.62\% & 3 & 93.35\% & 2 & 94.62\% & 2 \\ Ft EffNet Unbal & 78.58\% & 3 & 87.83\% & 2 & **91.56\%** & 1 & 91.63\% & 2 & **95.81\%** & 1 & **97.01\%** & 1 \\ \hline \hline \end{tabular}
\end{table}
Table 5: The accuracy and rank of the different classification models evaluated on all classes (base and new). Our values are highlighted in bold.