# Development of Smart and Lean Pick-and-Place System Using EfficientDet-Lite for Custom Dataset
## 2 Materials and Methods
### Image Optimization Process to Improve Mean Average Process  
Table 4 shows the distribution of the workpiece in Dataset 1, where there are a total of 963 objects. The blue cylinder has highest distribution at 35.61%, which is followed by the blue cube at 20.87%. The red cylinder has the lowest distribution at 13.33%. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Model** & **Setting** & **Description** & **Batch Size** \\ \hline Auto-Orient & Activated & Rotate image 15\({}^{\circ}\) counter-clockwise & Discard EXIF rotations and standardize \\ Resize & 416 \(\times\) 416 & Resize all the images to square size & 416 is divisible by 16 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Preprocessing operations applied to the original images. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Model** & **Setting** & **Description** & **Comments** \\ \hline Rotation & \(-15^{\circ}\) & Rotate image 15\({}^{\circ}\) counter-clockwise & Add variability to perspective to be more \\ Rotation & 15\({}^{\circ}\) & Rotate image 15\({}^{\circ}\) clockwise & resilient to camera’s angle \\ Shear & Horizontal 15\({}^{\circ}\) & Shear image horizontally by 15\({}^{\circ}\) & Add variability to perspective to be more \\ Shear & Vertical 15\({}^{\circ}\) & Shear image vertically 15\({}^{\circ}\) & resilient to camera’s pitch and yaw \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Augmentation operations applied to the original images. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Test** **Experiment** & **Dataset** & **Test Application** & **TensorFlow Model** & **Batch Size** & **Number of Original Images** & **Number of Augmented Images** & **Augmented Ratios** \\ \hline
1 & Dataset 1 & Optimized bright & EfficientDet-Lite 2 & 8 & 124 & 1006 & 8.12 \\ \hline
2 & Dataset 1 & Illumination level & EfficientDet-Lite 2 & 8 & 124 & 1006 & 8.12 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Augmented dataset for illumination, optimized brightness and batch size test. The proposed pick-and-place method aims to be a complete object detector that only needs minimal data processing before and after model detection and classification. Therefore, we choose a small number of images to evaluate the effectiveness of this approach. This study emphasizes the necessity of rapid and accurate label annotations, as well as fast data processing with small datasets, using a smart and \"lean\" approach. Figure 4 shows the augmentation process, where 124 original images are augmented to 327 images using the Flip-90 degree, Flip-180 degree and Rotate-15 degrees manipulation. Similarly, the 10 bright images (8% of the total images) are augmented to 24 images. Using the Roboflow online tool, the images are merged to produce 1006 augmented image after undergoing image shearing manipulation. For the bright images, 10 images of different alpha values are added to the dataset, as shown in Table 5. Using the addWeighted function from OpenCV, a brightness of alpha(\(\alpha\)) parameter is overlayed onto the 10 images. The addWeighted function is a function that helps by adding two images (f0 and f1) by passing varying \(\alpha\) values of 1, 2 and 3 into the formula below. \[g(x)=(1-\alpha)f0(x)+\alpha f1(x) \tag{5}\]  
The datasets are named as follows. Alpha1 has 124 base images with 10 bright images. Alpha2 has 124 base images with 10 bright images, and Alpha3 has 10 bright images. The optimization is shown in Figure 5, where the results of brightening are clearly visible. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Total Objects** & **Number of Blue Cube** & **Number of Blue Cylinder** & **Number of Yellow Cylinder** & **Number of Yellow Cube** & **Number of Red Cube** & **Number of Red Cylinder** \\ \hline
963 & 201 & 343 & 128 & 162 & 166 & 129 \\ (100\%) & (20.87\%) & (35.61\%) & (13.29\%) & (16.82\%) & (17.23\%) & (13.33\%) \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Distribution of workpiece in Dataset 1. Figure 4: Process of augmentation for Dataset 1.