# An Energy Saving Road Sweeper Using Deep Vision for Garbage Detection
## 3 Description of The System
### Neural Network for Garbage Detection
#### 3.3.2 The Dataset  
We collected a dataset of hours of sweeper work to be used for the training. Conditions to be taken into account are: midday light, cloudy daylight, grazing sunset light, night with artificial lights. A full range of road backgrounds should be taken into account for the artificial intelligence performance--e.g., asphalt vs. paving stones (see Figure 8). We also framed most kinds of urban/natural trash, such as dirt, grass, leafs, bottles, plastic bags, cans, tissues, street market trash (rotten vegetables), with the results seen in Figure 9. Each of these kinds of garbage must be well-represented in the dataset in order to be found correctly during the inference. \begin{table}
\begin{tabular}{l c c} \hline \hline
**Layer Type** & **Kernel** & **Features Size** & **Parameters** \\ \hline Input & & (704, 496, 3) & \\ Conv2d & (3, 3) & (704, 496, 64) & 1792 \\ Conv2d & (3, 3) & (704, 496, 64) & 36,928 \\ MaxPooling & (2, 2) & (352, 248, 64) & \\ Conv2d & (3, 3) & (352, 248, 128) & 73,856 \\ Conv2d & (3, 3) & (352, 248, 128) & 147,584 \\ MaxPooling & (2, 2) & (176, 124, 128) & \\ Conv2d & (3, 3) & (176, 124, 256) & 295,168 \\ Conv2d & (3, 3) & (176, 124, 256) & 590,080 \\ MaxPooling & (2, 2) & (88, 62, 256) & 590,080 \\ Conv2d & (3, 3) & (88, 62, 256) & 590,080 \\ MaxPooling & (2, 2) & (44, 31, 256) & \\ Conv2d & (3, 3) & (44, 31, 256) & 590,080 \\ Conv2d & (3, 3) & (44, 31, 256) & 590,080 \\ UpSampling & (2, 2) & (88, 62, 256) & \\ Conv2d & (3, 3) & (88, 62, 256) & 262,400 \\ Concatenate & & (88, 62, 512) & \\ Conv2d & (3, 3) & (88, 62, 256) & 1,179,904 \\ Conv2d & (3, 3) & (88, 62, 256) & 590,080 \\ UpSampling & (2, 2) & (176, 124, 256) & \\ Conv2d & (3, 3) & (176, 124, 256) & 262,400 \\ Concatenate & & (176, 124, 512) & \\ Conv2d & (3, 3) & (176, 124, 256) & 1,179,904 \\ Conv2d & (3, 3) & (176, 124, 256) & 590,080 \\ UpSampling & (2, 2) & (352, 248, 256) & \\ Conv2d & (3, 3) & (352, 248, 128) & 131,200 \\ Concatenate & & (352, 248, 256) & \\ Conv2d & (3, 3) & (352, 248, 128) & 295,040 \\ Conv2d & (3, 3) & (352, 248, 128) & 147,584 \\ UpSampling & (2, 2) & (704, 496, 128) & \\ Conv2d & (3, 3) & (704, 496, 64) & 32,832 \\ Concatenate & & (704, 496, 128) & \\ Conv2d & (3, 3) & (704, 496, 64) & 73,792 \\ Conv2d & (3, 3) & (704, 496, 64) & 36,928 \\ Conv2d & (3, 3) & (704, 496, 3) & 195 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Our Mini U-Net topology. The 704 \(\times\) 496 (input-output) dimension is the 16 nearest multiple dimension to the target (700 \(\times\) 500) size. Notably only \(\approx\)8 M parameters are used, well below the training dataset size of 420 MB uncompressed (72 MB compressed). Every layer except the last uses ReLU as its activation function. In particular, the dataset was created mounting a camera inside of one of those vehicles and \"filming\" more than 20 days of its work routine. This vehicle traveled around some northern Italian cities performing its normal collecting operations. Among these days, we picked a selection of daily routines that were as diverse as possible, in order to collect a representative dataset. Some of these routines were residential district clean-ups, industrial district clean-ups, cleaning routines performed in the zones of a weekly street market, and more. Each of these cleaning sections from different contexts lasted one to two hours, which we then sampled in order to compose a balanced set of data. Figure 8: Some of the many backgrounds a road can exhibit (that we used in our training). They pose a great challenge for neural network generalization capabilities. Figure 9: Typical kinds of urban trash to be detected by a cleaning system. Moreover, we can consider some notable situations that the network could face. Figure 10 highlights some of these conditions. There are cases of bad image exposure, garbage that blends itself with the background and a priori knowledge that can be applied to help the network to learn. All of these situations should be accounted for and presented to the network during the training.