A Binarized Segmented ResNet Based on Edge Computing for Re-Identification
Abstract
:1. Introduction
- (1)
- We propose a segmented ResNet based on the cloud, the edge, and the end devices, to try to solve the ReID problem at the local level;
- (2)
- To enable the ResNet model to be deployed on the device side, we adopt the binarization approach, and to maintain the ReID’s accuracy, we add RSign and RPReLU on the basis of binarization to allow the network to automatically learn the distribution of the most appropriate binary thresholds and activation values using a learnable displacement.
- (3)
- Through joint training, compared to the cloud-based ReID methods, the communication cost of our method is reduced, which is about 4–8×.
2. Related Work
3. A Binarized Segmented ResNet Based on Edge Computing for Re-Identification
3.1. Segmented ResNet
3.2. Training
3.3. Inference
Algorithm 1: A binarized segmented ResNet based on edge computing for ReID. |
3.4. Inference Communication Cost
4. Experimental Evaluation
4.1. The Segmented ResNet50 Based on Multiple Devices in the ReID Scenario
4.2. Hardware Selection
4.3. Dataset
4.4. Selection of Threshold T
4.5. Selection of the Segmentation Point
4.6. Experimental Results on the Dataset DukeMTMC-ReID
4.7. Comparison with the Baseline
5. Conclusions
Author Contributions
Funding
Conflicts of Interest
References
- Venetianer, P.L.; Lipton, A.J.; Chosak, A.J.; Frazier, M.F.; Haering, N.; Myers, G.W.; Yin, W.; Zhang, Z. Video Surveillance System Employing Video Primitives. U.S. Patent 7,868,912, 11 January 2011. [Google Scholar]
- Zhang, T.; Chowdhery, A.; Bahl, P.V.; Jamieson, K.; Banerjee, S. The Design and Implementation of a Wireless Video Surveillance System. In Proceedings of the 21st Annual International Conference on Mobile Computing and Networking, Paris, France, 7–11 September 2015; Association for Computing Machinery: New York, NY, USA, 2015; pp. 426–438. [Google Scholar] [CrossRef]
- Shi, W.; Cao, J.; Zhang, Q.; Li, Y.; Xu, L. Edge computing: Vision and challenges. IEEE Internet Things J. 2016, 3, 637–646. [Google Scholar] [CrossRef]
- Dolui, K.; Datta, S.K. Comparison of edge computing implementations: Fog computing, cloudlet and mobile edge computing. In Proceedings of the 2017 Global Internet of Things Summit (GIoTS), Geneva, Switzerland, 6–9 June 2017; pp. 1–6. [Google Scholar]
- Kortli, Y.; Jridi, M.; Alfalou, A.; Atri, M. Face Recognition Systems: A Survey. Sensors 2020, 20, 342. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Zhang, K.; Ling, W. Joint Motion Information Extraction and Human Behavior Recognition in Video Based on Deep Learning. IEEE Sens. J. 2020, 20, 11919–11926. [Google Scholar] [CrossRef]
- Ye, M.; Shen, J.; Lin, G.; Xiang, T.; Shao, L.; Hoi, S.C. Deep learning for person re-identification: A survey and outlook. arXiv 2020, arXiv:2001.04193. [Google Scholar]
- Menon, A.; Omman, B. Detection and Recognition of Multiple License Plate From Still Images. In Proceedings of the 2018 International Conference on Circuits and Systems in Digital Enterprise Technology (ICCSDET), KERALA, India, 6 August 2018; pp. 1–5. [Google Scholar]
- Krizhevsky, A.; Sutskever, I.; Hinton, G.E. ImageNet classification with deep convolutional neural networks. Commun. ACM 2017, 60, 84–90. [Google Scholar] [CrossRef]
- Simonyan, K.; Zisserman, A. Very Deep Convolutional Networks for Large-Scale Image Recognition. In Proceedings of the 3rd International Conference on Learning Representations, San Diego, CA, USA, 7–9 May 2015. [Google Scholar]
- Szegedy, C.; Liu, W.; Jia, Y.; Sermanet, P.; Reed, S.E.; Anguelov, D.; Erhan, D.; Vanhoucke, V.; Rabinovich, A. Going deeper with convolutions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Boston, MA, USA, 7–12 June 2015; pp. 1–9. [Google Scholar] [CrossRef] [Green Version]
- He, K.; Zhang, X.; Ren, S.; Sun, J. Deep Residual Learning for Image Recognition. In Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778. [Google Scholar] [CrossRef] [Green Version]
- Lin, Y.; Zheng, L.; Zheng, Z.; Wu, Y.; Hu, Z.; Yan, C.; Yang, Y. Improving person re-identification by attribute and identity learning. Pattern Recognit. 2019, 95, 151–161. [Google Scholar] [CrossRef] [Green Version]
- Cheng, D.; Gong, Y.; Zhou, S.; Wang, J.; Zheng, N. Person Re-identification by Multi-Channel Parts-Based CNN with Improved Triplet Loss Function. In Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; pp. 1335–1344. [Google Scholar] [CrossRef]
- Chen, Y.; Li, C.; Gong, L.; Wen, X.; Zhang, Y.; Shi, W. A deep neural network compression algorithm based on knowledge transfer for edge devices. Comput. Commun. 2020, 163, 186–194. [Google Scholar] [CrossRef]
- Zhang, Y.; Pan, J.; Qi, L.; He, Q. Privacy-preserving quality prediction for edge-based IoT services. Future Gener. Comput. Syst. 2021, 114, 336–348. [Google Scholar] [CrossRef]
- Chen, H.; Wang, Y.; Shi, Y.; Yan, K.; Geng, M.; Tian, Y.; Xiang, T. Deep Transfer Learning for Person Re-Identification. In Proceedings of the Fourth IEEE International Conference on Multimedia Big Data, Xi’an, China, 13–16 September 2018; pp. 1–5. [Google Scholar] [CrossRef] [Green Version]
- Geng, M.; Wang, Y.; Xiang, T.; Tian, Y. Deep Transfer Learning for Person Re-identification. arXiv 2016, arXiv:1611.05244. [Google Scholar]
- Varior, R.R.; Haloi, M.; Wang, G. Gated Siamese Convolutional Neural Network Architecture for Human Re-identification. In Proceedings of the Computer Vision—ECCV 2016—14th European Conference, Amsterdam, The Netherlands, 11–14 October 2016; Leibe, B., Matas, J., Sebe, N., Welling, M., Eds.; Springer: Cham, Switzerland, 2016; Volume 9912, pp. 791–808. [Google Scholar] [CrossRef] [Green Version]
- Schroff, F.; Kalenichenko, D.; Philbin, J. FaceNet: A unified embedding for face recognition and clustering. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Boston, MA, USA, 7–12 June 2015; pp. 815–823. [Google Scholar] [CrossRef] [Green Version]
- Liu, H.; Feng, J.; Qi, M.; Jiang, J.; Yan, S. End-to-End Comparative Attention Networks for Person Re-Identification. IEEE Trans. Image Process. 2017, 26, 3492–3506. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Chen, W.; Chen, X.; Zhang, J.; Huang, K. Beyond Triplet Loss: A Deep Quadruplet Network for Person Re-identification. In Proceedings of the 2017 IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 1320–1329. [Google Scholar] [CrossRef] [Green Version]
- Hermans, A.; Beyer, L.; Leibe, B. In Defense of the Triplet Loss for Person Re-Identification. arXiv 2017, arXiv:1703.07737. [Google Scholar]
- Xiao, Q.; Luo, H.; Zhang, C. Margin Sample Mining Loss: A Deep Learning Based Method for Person Re-identification. arXiv 2017, arXiv:1710.00478. [Google Scholar]
- Varior, R.R.; Shuai, B.; Lu, J.; Xu, D.; Wang, G. A Siamese Long Short-Term Memory Architecture for Human Re-identification. In Proceedings of the Computer Vision—ECCV 2016—14th European Conference, Amsterdam, The Netherlands, 11–14 October 2016; Leibe, B., Matas, J., Sebe, N., Welling, M., Eds.; Springer: Cham, Switzerland, 2016; Volume 9911, pp. 135–153. [Google Scholar] [CrossRef] [Green Version]
- Zhao, H.; Tian, M.; Sun, S.; Shao, J.; Yan, J.; Yi, S.; Wang, X.; Tang, X. Spindle Net: Person Re-identification with Human Body Region Guided Feature Decomposition and Fusion. In Proceedings of the 2017 IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 907–915. [Google Scholar] [CrossRef]
- Wang, T.; Gong, S.; Zhu, X.; Wang, S. Person Re-Identification by Discriminative Selection in Video Ranking. IEEE Trans. Pattern Anal. Mach. Intell. 2016, 38, 2501–2514. [Google Scholar] [CrossRef] [PubMed]
- Zheng, Z.; Zheng, L.; Yang, Y. Unlabeled Samples Generated by GAN Improve the Person Re-identification Baseline in Vitro. In Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy, 22–29 October 2017; pp. 3774–3782. [Google Scholar] [CrossRef] [Green Version]
- Liu, Z.; Shen, Z.; Savvides, M.; Cheng, K.T. ReActNet: Towards Precise Binary Neural Network with Generalized Activation Functions. arXiv 2020, arXiv:2003.03488. [Google Scholar]
- Rastegari, M.; Ordonez, V.; Redmon, J.; Farhadi, A. XNOR-Net: ImageNet Classification Using Binary Convolutional Neural Networks. In Proceedings of the Computer Vision—ECCV 2016—14th European Conference, Amsterdam, The Netherlands, 11–14 October 2016; Leibe, B., Matas, J., Sebe, N., Welling, M., Eds.; Springer: Cham, Switzerland, 2016; Volume 9908, pp. 525–542. [Google Scholar] [CrossRef] [Green Version]
- Courbariaux, M.; Bengio, Y.; David, J.P. Binaryconnect: Training deep neural networks with binary weights during propagations. arXiv 2016, arXiv:1511.00363. [Google Scholar]
- Courbariaux, M.; Bengio, Y. BinaryNet: Training Deep Neural Networks with Weights and Activations Constrained to +1 or −1. arXiv 2016, arXiv:1602.02830. [Google Scholar]
- Teerapittayanon, S.; McDanel, B.; Kung, H.T. BranchyNet: Fast inference via early exiting from deep neural networks. In Proceedings of the 23rd International Conference on Pattern Recognition, Cancún, Mexico, 4–8 December 2016; pp. 2464–2469. [Google Scholar] [CrossRef] [Green Version]
- Howard, A.G.; Zhu, M.; Chen, B.; Kalenichenko, D.; Wang, W.; Weyand, T.; Andreetto, M.; Adam, H. MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications. arXiv 2017, arXiv:1704.04861. [Google Scholar]
- Marchwica, P.; Jamieson, M.; Siva, P. An evaluation of deep cnn baselines for scene-independent person re-identification. In Proceedings of the 2018 15th Conference on Computer and Robot Vision (CRV), Toronto, ON, Canada, 9–11 May 2018; pp. 297–304. [Google Scholar]
- Zheng, L.; Shen, L.; Tian, L.; Wang, S.; Wang, J.; Tian, Q. Scalable Person Re-identification: A Benchmark. In Proceedings of the 2015 IEEE International Conference on Computer Vision, Santiago, Chile, 7–13 December 2015; pp. 1116–1124. [Google Scholar] [CrossRef]
Raspberry Pi 4B | Jetson TX2 | Laptop | Server | |
---|---|---|---|---|
CPU | Broadcom BCM2711B0 | ARMv8 | Inter Core i7-6700HQ | Inter Xeon E5-2630 v4 |
GPU | VideCore VI | NVIDIA Pascal | NVIDIA GTX970M | Tesla P100 |
Frequency | 1.5 GHz | 2 GHz | 2.6 GHz | 2.2 GHz |
Core | 4 | 6 | 4 | 10 |
Memory | 4 GB | 8 GB | 16 GB | 62 GB |
OS | Raspbian | Ubuntu16.04 | Ubuntu16.04 | Ubuntu16.04 |
T | Local Exit (%) | Rank-5 (%) | Comm. (B) |
---|---|---|---|
0.4 | 100 | 35.72 | 64 |
0.5 | 100 | 35.72 | 64 |
0.6 | 99.94 | 35.74 | 74 |
0.7 | 98.96 | 36.03 | 234 |
0.75 | 95.16 | 36.8 | 854 |
0.76 | 93.82 | 37.06 | 1072 |
0.77 | 91.09 | 37.65 | 1518 |
0.78 | 88.45 | 38.27 | 1949 |
0.79 | 85.63 | 38.8 | 2409 |
0.8 | 81.44 | 39.63 | 3093 |
0.81 | 76.99 | 40.07 | 3093 |
0.82 | 71.94 | 41.23 | 4643 |
0.83 | 65.71 | 42.84 | 5660 |
0.84 | 59.06 | 44.24 | 6745 |
0.85 | 52.32 | 46.08 | 7845 |
0.86 | 45.25 | 46.92 | 8999 |
0.87 | 38.15 | 48.33 | 10,158 |
0.88 | 31.09 | 48.81 | 11,310 |
0.89 | 23.1 | 50 | 12,614 |
0.9 | 16.69 | 52.31 | 13,660 |
0.95 | 0.71 | 70.83 | 16,268 |
T | Local Exit (%) | Rank-5 (%) | Comm. (B) |
---|---|---|---|
0.4 | 100 | 46.64 | 64 |
0.5 | 100 | 46.64 | 64 |
0.6 | 99.55 | 46.85 | 137 |
0.7 | 92.90 | 49.63 | 1222 |
0.75 | 79.42 | 54.06 | 3422 |
0.76 | 75.27 | 55.5 | 4100 |
0.77 | 70.19 | 57.4 | 4929 |
0.78 | 65.02 | 58.9 | 5772 |
0.79 | 59.83 | 60.5 | 6620 |
0.8 | 53.12 | 62.94 | 7715 |
0.81 | 47.33 | 64.87 | 8660 |
0.82 | 41.51 | 66.6 | 9610 |
0.83 | 35.87 | 68.96 | 10,531 |
0.84 | 29.99 | 72.38 | 11,490 |
0.85 | 24.94 | 73.45 | 12,314 |
0.86 | 19.77 | 74.77 | 13,157 |
0.87 | 15.02 | 79.05 | 13,932 |
0.88 | 11.64 | 81.89 | 14,485 |
0.89 | 8.34 | 88.26 | 15,022 |
0.9 | 5.73 | 90.16 | 15,449 |
0.95 | 0.21 | 100 | 16,350 |
T | Local Exit (%) | Rank-5 (%) | Comm. (B) |
---|---|---|---|
0.4 | 100 | 56.56 | 64 |
0.5 | 100 | 56.56 | 64 |
0.6 | 99.55 | 56.56 | 100 |
0.7 | 97.36 | 57.52 | 279 |
0.75 | 87.86 | 60.7 | 1051 |
0.76 | 83.67 | 62.03 | 1391 |
0.77 | 79.96 | 64.61 | 2040 |
0.78 | 75.68 | 58.9 | 5772 |
0.79 | 69.74 | 66.92 | 2523 |
0.8 | 63.33 | 69.34 | 3044 |
0.81 | 56.18 | 71.47 | 3626 |
0.82 | 49.41 | 74.16 | 4176 |
0.83 | 41.78 | 76.97 | 4796 |
0.84 | 34.38 | 79.79 | 5397 |
0.85 | 27.4 | 81.91 | 5965 |
0.86 | 21.29 | 84.38 | 6462 |
0.87 | 15.47 | 88.29 | 6935 |
0.88 | 11.31 | 92.13 | 7273 |
0.89 | 7.57 | 95.29 | 7577 |
0.9 | 4.9 | 97.58 | 7794 |
0.95 | 0.09 | 100 | 8185 |
T | Local Exit (%) | Rank-5 (%) | Comm. (B) |
---|---|---|---|
0.4 | 100 | 72.24 | 64 |
0.5 | 100 | 72.24 | 64 |
0.6 | 99.23 | 72.27 | 127 |
0.7 | 86.19 | 78.44 | 1186 |
0.75 | 64.93 | 85.23 | 2914 |
0.76 | 59.83 | 86.61 | 3329 |
0.77 | 54.54 | 88.35 | 3759 |
0.78 | 49.17 | 89.13 | 4196 |
0.79 | 43.29 | 90.33 | 4673 |
0.8 | 37.47 | 91.92 | 5146 |
0.81 | 32.96 | 92.79 | 5513 |
0.82 | 28.03 | 93.96 | 5914 |
0.83 | 22.71 | 95.03 | 6346 |
0.84 | 18,76 | 95.73 | 6667 |
0.85 | 15.17 | 96.87 | 6959 |
0.86 | 11.07 | 97.86 | 7292 |
0.87 | 8.4 | 97.88 | 7509 |
0.88 | 5.94 | 97.5 | 7709 |
0.89 | 3.68 | 96.77 | 7893 |
0.9 | 2.29 | 97.4 | 8006 |
0.95 | 0.03 | 100 | 8190 |
T | Local Exit (%) | Rank-5 (%) | Comm. (B) |
---|---|---|---|
0.4 | 100 | 37.61 | 64 |
0.5 | 100 | 37.61 | 64 |
0.6 | 99.64 | 37.61 | 93 |
0.7 | 97.31 | 38.19 | 284 |
0.75 | 91.65 | 40.35 | 748 |
0.76 | 89.72 | 41.2 | 906 |
0.77 | 87.66 | 42.06 | 1075 |
0.78 | 83.93 | 43.4 | 1380 |
0.79 | 80.3 | 44.7 | 1678 |
0.8 | 75.13 | 46.77 | 2101 |
0.81 | 68.63 | 49.24 | 2634 |
0.82 | 61.45 | 51.08 | 3222 |
0.83 | 51.89 | 53.95 | 4005 |
0.84 | 44.08 | 55.75 | 4645 |
0.85 | 36.31 | 57.63 | 5281 |
0.86 | 29.22 | 59.47 | 5862 |
0.87 | 22.76 | 60.41 | 6392 |
0.88 | 17.64 | 61.36 | 6811 |
0.89 | 12.52 | 61.71 | 7230 |
0.9 | 8.44 | 62.07 | 7565 |
Method | Rank-1 (%) | Rank-5 (%) | Rank-10 (%) | mAP(%) | Comm. (Bytes) | FLOPS () |
---|---|---|---|---|---|---|
ResNet50 Baseline 1 | 88.24 | 95.49 | 97.06 | 72.28 | 24,756 | 2.69 |
ResNet50 Baseline 2 | 65.74 | 85.18 | 90.11 | 45.53 | 24,756 | 0.25 |
Our MobileNet | 22.64 | 48.69 | 60.67 | 13.64 | 3396 | 0.31 |
Our ResNet50 | 59.95 | 81.47 | 87.35 | 41.37 | 2914 (8×) | 0.25 |
Method | Rank-1 (%) | Rank-5 (%) | Rank-10 (%) | mAP (%) | Comm. (Bytes) | FLOPS () |
---|---|---|---|---|---|---|
ResNet50 Baseline1 | 77.6 | 88.69 | 92.06 | 60.3 | 24,756 | 2.69 |
ResNet50 Baseline2 | 43.4 | 62.39 | 70.42 | 27.05 | 24,756 | 0.25 |
Our MobileNet | 19.0 | 35.66 | 45.11 | 11.73 | 3708 | 0.31 |
Our ResNet50 | 32.41 | 53.95 | 63.56 | 23.58 | 4005 (5×) | 0.25 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Chen, Y.; Yang, T.; Li, C.; Zhang, Y. A Binarized Segmented ResNet Based on Edge Computing for Re-Identification. Sensors 2020, 20, 6902. https://doi.org/10.3390/s20236902
Chen Y, Yang T, Li C, Zhang Y. A Binarized Segmented ResNet Based on Edge Computing for Re-Identification. Sensors. 2020; 20(23):6902. https://doi.org/10.3390/s20236902
Chicago/Turabian StyleChen, Yanming, Tianbo Yang, Chao Li, and Yiwen Zhang. 2020. "A Binarized Segmented ResNet Based on Edge Computing for Re-Identification" Sensors 20, no. 23: 6902. https://doi.org/10.3390/s20236902
APA StyleChen, Y., Yang, T., Li, C., & Zhang, Y. (2020). A Binarized Segmented ResNet Based on Edge Computing for Re-Identification. Sensors, 20(23), 6902. https://doi.org/10.3390/s20236902