| Object detection techniques based on deep learning can be used in garbage classification.However,in a realistic community environment,established object detection method not be directly applicable due to poor shooting,insufficient lighting,and a lack of both network and high computing power due to cost constraint.They should therefore be tuned before use.The main contributions of this paper include:(1)The training dataset provided by HUAWEI is augmented with photos taken in various complex realistic environments.A CBAM-enhanced attention module is then added to YOLOv5,resulting in minor performance improvement in term of accuracy;(2)In order to ensure image quality in a poor lighting environment with only modest computing power from low-cost devices but without network,an adaptive image enhancement approach is proposed to tune image parameters based on the ambient light intensity detected.The impact of parameter of dark-light transformation algorithm on the detection accuracy of dark-light image is analyzed in advance in order to identify the appropriate range of pixel value tuning.In a realistic environment,the ambient light intensity is detected via a photosensitive sensor attached to a Raspberry Pi,before the transformation parameter is tuned accordingly;(3)A structured pruning algorithm based on shortcut connection structure "incomplete zero removal" is proposed to compress the model.Both norm and geometric distance center rule are evaluated for clipped convolution kernel selection,where comparisons are made among two norms and four geometric distances.The selection rule based on the Euclidean distance center with better effect is selected for trimming.Then,an "incomplete de-zeroing" compression is proposed for the shortcut connection structure in de-zeroing compression.Experimental results show that this approach can better retain the original features and thus achieve better results than the others;(4)A deployment of the above solution is completed on a Raspberry Pi device.The experiment shows that it outperforms the other cloud-based high performance computing counterparts.Finally,a proper pruning rate is chosen based on an analysis of the curves of pruning rate vs.mAP and detection time.A model is therefore achieved which promises decent mAP at a significantly decreased size and detection time.Its applicability in practice can be further enhanced if a NCS2 neural computing stick is used for acceleration. |