WO2022141858A1 - 行人检测方法、装置、电子设备及存储介质 - Google Patents

行人检测方法、装置、电子设备及存储介质 Download PDF

Info

Publication number
WO2022141858A1
WO2022141858A1 PCT/CN2021/083707 CN2021083707W WO2022141858A1 WO 2022141858 A1 WO2022141858 A1 WO 2022141858A1 CN 2021083707 W CN2021083707 W CN 2021083707W WO 2022141858 A1 WO2022141858 A1 WO 2022141858A1
Authority
WO
WIPO (PCT)
Prior art keywords
classification
pedestrian detection
detection model
network
pedestrian
Prior art date
Application number
PCT/CN2021/083707
Other languages
English (en)
French (fr)
Inventor
王健宗
瞿晓阳
李佳琳
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2022141858A1 publication Critical patent/WO2022141858A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/103Static body considered as a whole, e.g. static pedestrian or occupant recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/46Extracting features or characteristics from the video content, e.g. video fingerprints, representative shots or key frames
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/56Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
    • G06V20/58Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads

Definitions

  • the present application relates to the technical field of artificial intelligence, and in particular, to a pedestrian detection method, apparatus, electronic device, and computer-readable storage medium.
  • autonomous driving technology has also developed. As an important enabling technology in artificial intelligence, autonomous driving technology has important research and engineering application value, and effective pedestrian detection and avoidance is one of the core links of autonomous driving technology.
  • a pedestrian detection method provided by this application includes:
  • the classification and positioning tasks in the traditional detection model are decomposed, and a fully connected layer is added to obtain a decoupled pedestrian detection model;
  • the image to be detected is detected by using the decoupled pedestrian detection model to obtain pedestrian detection information.
  • the present application also provides a pedestrian detection device, the device comprising:
  • a training data set module used for obtaining a pedestrian detection data set, and performing data enhancement processing on the pedestrian detection data set to obtain a training image set;
  • the model building module is used to decompose the classification and positioning tasks in the traditional detection model, and add a fully connected layer to obtain a decoupled pedestrian detection model;
  • a loss function module configured to calculate the classification deviation and the positioning deviation respectively by using the fully connected layer, and generate the loss function of the decoupled pedestrian detection model according to the classification deviation and the positioning deviation;
  • a model training module used for training the decoupled pedestrian detection model using the training image set and the loss function to obtain a trained decoupled pedestrian detection model
  • a detection module is used to detect the image to be detected by using the decoupled pedestrian detection model to obtain pedestrian detection information.
  • the present application also provides an electronic device, the electronic device comprising:
  • a processor that executes the instructions stored in the memory to achieve the following steps:
  • the classification and positioning tasks in the traditional detection model are decomposed, and a fully connected layer is added to obtain a decoupled pedestrian detection model;
  • the image to be detected is detected by using the decoupled pedestrian detection model to obtain pedestrian detection information.
  • the present application also provides a computer-readable storage medium, where the computer-readable storage medium stores at least one instruction, and the at least one instruction is executed by a processor in an electronic device to implement the following steps:
  • the classification and positioning tasks in the traditional detection model are decomposed, and a fully connected layer is added to obtain a decoupled pedestrian detection model;
  • the image to be detected is detected by using the decoupled pedestrian detection model to obtain pedestrian detection information.
  • FIG. 1 is a schematic flowchart of a pedestrian detection method provided by an embodiment of the present application.
  • FIG. 2 is a functional block diagram of a pedestrian detection device provided by an embodiment of the present application.
  • FIG. 3 is a schematic structural diagram of an electronic device implementing the pedestrian detection method according to an embodiment of the present application.
  • the embodiment of the present application provides a pedestrian detection method.
  • the execution body of the pedestrian detection method includes, but is not limited to, at least one of electronic devices that can be configured to execute the method provided by the embodiments of the present application, such as a server and a terminal.
  • the pedestrian detection method can be executed by software or hardware installed in a terminal device or a server device, and the software can be a blockchain platform.
  • the server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
  • the pedestrian detection method includes:
  • the pedestrian detection data set described in the embodiments of the present application is the KITTI data set, which includes real image data collected by pedestrians in various scenarios such as urban areas, villages, and highways. Further, the pedestrian detection dataset can be obtained from a public network platform.
  • performing data enhancement processing on the pedestrian detection data set to obtain a training image set including:
  • the first pedestrian data set and the second pedestrian data set are aggregated to obtain a training image set.
  • performing geometric transformation processing on the first pedestrian data set, or adding Gaussian noise processing includes: randomly performing left-right inversion, rotation, cropping and adding to the images in the first pedestrian data set Gaussian white noise of different degrees, and at the same time, the corresponding transformation is performed on the labels marked in the image.
  • the number of image samples is enriched, which is conducive to the learning of the detection model, and can improve the accuracy of identification and detection.
  • the traditional detection model described in the embodiments of the present application is a deep learning network based on a target detection algorithm, such as the Faster-RCNN model, the SSD model, and the YOLO model.
  • a target detection algorithm such as the Faster-RCNN model, the SSD model, and the YOLO model.
  • classification and regression positioning are usually learned together. Region boxes and feature extractors that share the potential existence of objects.
  • the traditional detection model includes a feature extraction network and a classification detection network, wherein the feature extraction network is used for extracting features, and the classification detection network is used for classification and regression positioning.
  • the fully-connected layer is a three-layer convolutional neural network, the fully-connected layer includes multiple neurons, and each neuron contains an excitation function, such as a ReLU function, each neuron and all the previous layers. Neurons are fully connected, and the fully connected layer can be used to predict offsets.
  • the classification and positioning tasks in the traditional detection model are decomposed, and a fully connected layer is added to obtain a decoupled pedestrian detection model, including:
  • the pre-built classification fully-connected layer is connected after the classification network and the pre-built localization fully-connected layer is connected after the localization network to obtain a decoupled pedestrian detection model.
  • the classification network described in the embodiment of the present application is a convolutional neural network only used for classification, and the classification network will pay more attention to the semantic features of the image, and classify according to the semantic features.
  • the localization network is a convolutional neural network only used for localization. The localization network pays more attention to the position information of the image, that is, the bounding box of the object, and locates the object in the image according to the position information.
  • building a classification network and a positioning network based on a deep learning algorithm includes: selecting multiple optional network operations according to the characteristics of the classification task, and connecting the multiple optional network operations to obtain a classification network; selecting according to the characteristics of the positioning task Multiple optional network operations, and connecting multiple optional network operations to obtain a positioning network.
  • the optional network operations include 1x1 convolution, 3x3 convolution, 5x5 convolution, 7x7 convolution, max pooling layer and average pooling layer.
  • the use of the classification network and the positioning network to replace the classification detection network in the traditional detection model in the embodiment of the present application includes deleting the classification detection network in the traditional detection model;
  • the localization network is connected in parallel after the feature extraction network in the traditional detection model.
  • the classification and positioning tasks of the traditional detection model are decomposed in space, and the three-layer fully connected network is used to learn the deformation of the classification frame and the positioning frame, wherein the deformation of the classification frame is a point-level offset, and the positioning The shape of the box is the overall offset at the box level.
  • the fully connected layer is used to calculate the classification deviation and the positioning deviation respectively, and generate the loss function of the decoupled pedestrian detection model according to the classification deviation and the positioning deviation.
  • the fully connected layer in the embodiment of the present application is a fully connected network with three layers, and the fully connected layer can compare the classification frame and localization frame outputted by the classification network and the localization network in the decoupled pedestrian detection model and the real position.
  • the deviation between the classification box and the positioning box is predicted, and the classification deviation and positioning deviation are obtained.
  • the classification network and the localization network in the decoupled pedestrian detection model are used for classification and localization, respectively, and output a feature map with a classification frame and a feature map with a localization frame, respectively.
  • calculating the classification deviation and the positioning deviation respectively by using the fully connected layer includes: judging by the classification fully connected layer whether each pixel point in the classification frame predicted by the classification network contains the target category, and will not contain the target category. The pixel points of the target category are counted to obtain the classification deviation; the intersection ratio IOU (intersection over union) of the positioning frame predicted by the positioning network and the actual frame is calculated by the positioning fully connected layer to obtain the positioning deviation.
  • the positioning frame may be represented by (x, y, w, h), (x, y) is the center coordinate of the positioning frame, and w and h are the width and height of the positioning frame.
  • generating the loss function of the decoupled pedestrian detection model according to the classification deviation and the positioning deviation includes:
  • the classification bias and the localization bias are added to the original loss function to obtain the loss function of the decoupled pedestrian detection model.
  • the original loss function described in the embodiment of the present application includes:
  • L(p i ,t i ) is the loss value
  • N is the total number of samples in the training data set
  • p i is the predicted label output by the traditional detection model
  • the true label is the localization loss
  • t i is the predicted localization frame position information output by the traditional detection model
  • is the coefficient, which is the preset threshold.
  • L( pi, t i ) is the basic loss value
  • E c is the classification bias
  • E l is the localization bias
  • the decoupling pedestrian detection model is trained by using the training image set and the loss function until a preset convergence condition is reached, and the trained decoupling pedestrian detection model is obtained, including:
  • the convergence condition means that the current confidence level is greater than the sum of the confidence level calculated last time and a preset confidence level threshold.
  • the loss function used in training the decoupled pedestrian detection model in the embodiment of the present application includes not only the loss function of the original ordinary pedestrian detection task, that is, the overall error of the model, but also the loss of the classification network in the model, that is, the classification bias, and the model
  • the loss of the positioning network in the middle that is, the positioning deviation, is beneficial to the optimization of the classification network and the positioning network, and improves the accuracy of the detection result.
  • the images to be detected in the examples of this application may be real-time monitoring images during automatic driving.
  • the image to be detected can be stored in a node of a blockchain.
  • the use of the decoupled pedestrian detection model to detect the image to be detected to obtain pedestrian detection information includes:
  • the pedestrian classification information and the location information are collected to obtain pedestrian detection information corresponding to the image to be detected.
  • the embodiment of the present application improves the accuracy of model detection by decoupling the classification and positioning tasks.
  • the image is input into the model's feature extraction backbone network to obtain features, and then the pedestrian's position can be obtained by inputting the model's classification and positioning networks respectively. information.
  • the classification and regression can be made respectively.
  • the network learns each adaptive candidate frame and feature extractor. Since the input and feature extractor are not shared for the final discriminator, the conflict caused by inconsistent optimization goals is minimized, thereby improving pedestrian detection. performance, reduce the problem of misidentification or inaccurate frame selection of pedestrians, and improve the accuracy of identification and detection. Therefore, the pedestrian detection method, device, electronic device and computer-readable storage medium proposed in this application can solve the problem of low accuracy of pedestrian detection results.
  • FIG. 2 it is a functional block diagram of a pedestrian detection device provided by an embodiment of the present application.
  • the pedestrian detection device 100 described in the present application may be installed in an electronic device.
  • the pedestrian detection apparatus 100 may include a training data set module 101 , a model building module 102 , a loss function module 103 , a model training module 104 and a detection module 105 .
  • the modules described in this application may also be referred to as units, which refer to a series of computer program segments that can be executed by the processor of an electronic device and can perform fixed functions, and are stored in the memory of the electronic device.
  • each module/unit is as follows:
  • the training data set module 101 is configured to obtain a pedestrian detection data set, and perform data enhancement processing on the pedestrian detection data set to obtain a training image set.
  • the pedestrian detection data set described in the embodiments of the present application is the KITTI data set, which includes real image data collected by pedestrians in various scenarios such as urban areas, villages, and highways. Further, the pedestrian detection dataset can be obtained from a public network platform.
  • the training data set module 101 when performing data enhancement processing on the pedestrian detection data set to obtain a training image set, the training data set module 101 specifically performs the following steps:
  • the first pedestrian data set and the second pedestrian data set are aggregated to obtain a training image set.
  • performing geometric transformation processing on the first pedestrian data set, or adding Gaussian noise processing includes: randomly performing left-right inversion, rotation, cropping and adding to the images in the first pedestrian data set Gaussian white noise of different degrees, and at the same time, the corresponding transformation is performed on the labels marked in the image.
  • the number of image samples is enriched, which is beneficial to the learning of the detection model, and can improve the accuracy of identification and detection.
  • the model building module 102 is used to decompose the classification and positioning tasks in the traditional detection model, and add a fully connected layer to obtain a decoupled pedestrian detection model.
  • the traditional detection model described in the embodiments of the present application is a deep learning network based on a target detection algorithm, such as the Faster-RCNN model, the SSD model, and the YOLO model.
  • a target detection algorithm such as the Faster-RCNN model, the SSD model, and the YOLO model.
  • classification and regression positioning are usually learned together. Region boxes and feature extractors that share the potential existence of objects.
  • the traditional detection model includes a feature extraction network and a classification detection network, wherein the feature extraction network is used for extracting features, and the classification detection network is used for classification and regression positioning.
  • the fully-connected layer is a three-layer convolutional neural network, the fully-connected layer includes multiple neurons, and each neuron contains an excitation function, such as a ReLU function, each neuron and all the previous layers. Neurons are fully connected, and the fully connected layer can be used to predict offsets.
  • model building module 102 is specifically used for:
  • the pre-built classification fully-connected layer is connected after the classification network and the pre-built localization fully-connected layer is connected after the localization network to obtain a decoupled pedestrian detection model.
  • the classification network described in the embodiment of the present application is a convolutional neural network only used for classification, and the classification network will pay more attention to the semantic features of the image, and classify according to the semantic features.
  • the positioning network is a convolutional neural network only used for positioning, and the positioning network will pay more attention to the position information of the image, that is, the bounding box of the object, and locate the object in the image according to the position information.
  • building a classification network and a positioning network based on a deep learning algorithm includes: selecting multiple optional network operations according to the characteristics of the classification task, and connecting the multiple optional network operations to obtain a classification network; selecting according to the characteristics of the positioning task Multiple optional network operations, and connecting multiple optional network operations to obtain a positioning network.
  • the optional network operations include 1x1 convolution, 3x3 convolution, 5x5 convolution, 7x7 convolution, max pooling layer and average pooling layer.
  • using the classification network and the positioning network to replace the classification detection network in the traditional detection model described in the embodiment of the present application includes deleting the classification detection network in the traditional detection model;
  • the localization network is connected in parallel after the feature extraction network in the traditional detection model.
  • the classification and positioning tasks of the traditional detection model are decomposed in space, and the three-layer fully connected network is used to learn the deformation of the classification frame and the positioning frame, wherein the deformation of the classification frame is a point-level offset, and the positioning The shape of the box is the overall offset at the box level.
  • the loss function module 103 is configured to calculate the classification deviation and the positioning deviation respectively by using the fully connected layer, and generate the loss function of the decoupled pedestrian detection model according to the classification deviation and the positioning deviation.
  • the fully connected layer in the embodiment of the present application is a fully connected network with three layers, and the fully connected layer can compare the classification frame and localization frame outputted by the classification network and the localization network in the decoupled pedestrian detection model and the real position.
  • the deviation between the classification box and the positioning box is predicted, and the classification deviation and positioning deviation are obtained.
  • the classification network and the localization network in the decoupled pedestrian detection model are used for classification and localization, respectively, and output a feature map with a classification frame and a feature map with a localization frame, respectively.
  • calculating the classification deviation and the positioning deviation respectively by using the fully connected layer includes: judging by the classification fully connected layer whether each pixel point in the classification frame predicted by the classification network contains the target category, and will not contain the target category. The pixel points of the target category are counted to obtain the classification deviation; the intersection ratio IOU (intersection over union) of the positioning frame predicted by the positioning network and the actual frame is calculated by the positioning fully connected layer to obtain the positioning deviation.
  • the positioning frame may be represented by (x, y, w, h), (x, y) is the center coordinate of the positioning frame, and w and h are the width and height of the positioning frame.
  • the loss function module 103 when generating the loss function of the decoupled pedestrian detection model according to the classification deviation and the positioning deviation, the loss function module 103 specifically performs the following steps:
  • the classification bias and the localization bias are added to the original loss function to obtain the loss function of the decoupled pedestrian detection model.
  • the original loss function described in the embodiment of the present application includes:
  • L(p i ,t i ) is the loss value
  • N is the total number of samples in the training data set
  • p i is the predicted label output by the traditional detection model
  • the true label is the localization loss
  • t i is the predicted localization frame position information output by the traditional detection model
  • is the coefficient, which is the preset threshold.
  • L( pi, t i ) is the basic loss value
  • E c is the classification bias
  • E l is the localization bias
  • the model training module 104 is configured to use the training image set and the loss function to train the decoupled pedestrian detection model to obtain a trained decoupled pedestrian detection model.
  • model training module 104 is specifically used for:
  • the convergence condition means that the current confidence level is greater than the sum of the confidence level calculated last time and a preset confidence level threshold.
  • the loss function used in training the decoupled pedestrian detection model in the embodiment of the present application includes not only the loss function of the original ordinary pedestrian detection task, that is, the overall error of the model, but also the loss of the classification network in the model, that is, the classification bias, and the model
  • the loss of the positioning network in the middle that is, the positioning deviation, is beneficial to the optimization of the classification network and the positioning network, and improves the accuracy of the detection result.
  • the detection module 105 is configured to use the decoupled pedestrian detection model to detect the image to be detected to obtain pedestrian detection information.
  • the images to be detected in the examples of this application may be real-time monitoring images during automatic driving.
  • the image to be detected can be stored in a node of a blockchain.
  • the use of the decoupled pedestrian detection model to detect the image to be detected to obtain pedestrian detection information includes:
  • the pedestrian classification information and the location information are collected to obtain pedestrian detection information corresponding to the image to be detected.
  • the embodiment of the present application improves the accuracy of model detection by decoupling the classification and positioning tasks.
  • the image is input into the model's feature extraction backbone network to obtain features, and then the pedestrian's position can be obtained by inputting the model's classification and positioning networks respectively. information.
  • FIG. 3 it is a schematic structural diagram of an electronic device for implementing a pedestrian detection method provided by an embodiment of the present application.
  • the electronic device 1 may include a processor 10 , a memory 11 and a bus, and may also include a computer program stored in the memory 11 and executable on the processor 10 , such as a pedestrian detection program 12 .
  • the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, magnetic disk, CD etc.
  • the memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, such as a mobile hard disk of the electronic device 1 .
  • the memory 11 may also be an external storage device of the electronic device 1, such as a pluggable mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital) equipped on the electronic device 1. , SD) card, flash memory card (Flash Card), etc.
  • the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device.
  • the memory 11 can not only be used to store application software installed in the electronic device 1 and various types of data, such as codes of the pedestrian detection program 12, etc., but also can be used to temporarily store data that has been output or will be output.
  • the processor 10 may be composed of integrated circuits, for example, may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits packaged with the same function or different functions, including one or more integrated circuits.
  • Central Processing Unit CPU
  • microprocessor digital processing chip
  • graphics processor and combination of various control chips, etc.
  • the processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect the various components of the entire electronic device, by running or executing programs or modules (such as pedestrians) stored in the memory 11. detection program, etc.), and call data stored in the memory 11 to execute various functions of the electronic device 1 and process data.
  • the bus may be a peripheral component interconnect (PCI for short) bus or an extended industry standard architecture (Extended industry standard architecture, EISA for short) bus or the like.
  • PCI peripheral component interconnect
  • EISA Extended industry standard architecture
  • the bus can be divided into address bus, data bus, control bus and so on.
  • the bus is configured to implement connection communication between the memory 11 and at least one processor 10 and the like.
  • FIG. 3 only shows an electronic device with components. Those skilled in the art can understand that the structure shown in FIG. 3 does not constitute a limitation on the electronic device 1, and may include fewer or more components than those shown in the figure. components, or a combination of certain components, or a different arrangement of components.
  • the electronic device 1 may also include a power source (such as a battery) for powering the various components, preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power source can be managed by the power source.
  • the device implements functions such as charge management, discharge management, and power consumption management.
  • the power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and any other components.
  • the electronic device 1 may further include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
  • the electronic device 1 may also include a network interface, optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used in the electronic device 1 Establish a communication connection with other electronic devices.
  • a network interface optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used in the electronic device 1 Establish a communication connection with other electronic devices.
  • the electronic device 1 may further include a user interface, and the user interface may be a display (Display), an input unit (eg, a keyboard (Keyboard)), optionally, the user interface may also be a standard wired interface or a wireless interface.
  • the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, and the like.
  • the display may also be appropriately called a display screen or a display unit, which is used for displaying information processed in the electronic device 1 and for displaying a visualized user interface.
  • the pedestrian detection program 12 stored in the memory 11 in the electronic device 1 is a combination of multiple instructions, and when running in the processor 10, it can realize:
  • the classification and positioning tasks in the traditional detection model are decomposed, and a fully connected layer is added to obtain a decoupled pedestrian detection model;
  • the image to be detected is detected by using the decoupled pedestrian detection model to obtain pedestrian detection information.
  • the modules/units integrated in the electronic device 1 may be stored in a computer-readable storage medium.
  • the computer-readable storage medium may be volatile or non-volatile.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a removable hard disk, a magnetic disk, an optical disc, a computer memory, a read-only memory (ROM, Read-Only). Memory).
  • the present application also provides a computer-readable storage medium, where the readable storage medium stores a computer program, and when executed by a processor of an electronic device, the computer program can realize:
  • the classification and positioning tasks in the traditional detection model are decomposed, and a fully connected layer is added to obtain a decoupled pedestrian detection model;
  • the image to be detected is detected by using the decoupled pedestrian detection model to obtain pedestrian detection information.
  • modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional module in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware, or can be implemented in the form of hardware plus software function modules.
  • the blockchain referred to in this application is a new application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
  • Blockchain essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information to verify its Validity of information (anti-counterfeiting) and generation of the next block.
  • the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.

Abstract

一种行人检测方法、装置、电子设备以及计算机可读存储介质,涉及人工智能技术,包括:对行人检测数据集进行数据增强处理,得到训练图像集;对传统检测模型中的分类定位任务进行分解,并添加全连接层,得到解耦行人检测模型;计算分类偏差和定位偏差,并根据所述分类偏差和定位偏差生成损失函数;使用所述训练图像集和所述损失函数对所述解耦行人检测模型进行训练,得到训练完成的解耦行人检测模型;利用所述解耦行人检测模型对待检测图像进行检测,得到行人检测信息。此外,所述待检测图像可存储于区块链的节点。可以解决行人检测结果准确性较低的问题。

Description

行人检测方法、装置、电子设备及存储介质
本申请要求于2020年12月31日提交中国专利局、申请号为CN202011637418.5、名称为“行人检测方法、装置、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及人工智能技术领域,尤其涉及一种行人检测方法、装置、电子设备及计算机可读存储介质。
背景技术
随着人工智能的发展,自动驾驶技术也发展了起来。自动驾驶技术作为人工智能中一种重要赋能技术,具有重要的研究与工程应用价值,而有效的行人检测与避让是自动驾驶技术的核心环节之一。
传统的行人检测方法(比如Faster RCNN、SSD、YOLO等)通常是分类和回归定位一起学习,共享物体潜在存在的区域框和特征提取器。发明人意识到分类任务更关注语义信息丰富的地方,而回归任务比较关注的是物体的边界框,所以传统的行人检测方法对于分类和回归任务共享同一个物体潜在存在的区域框和特征提取器就会出现一些内在的矛盾影响检测模型的训练,检测结果的准确性较低。
发明内容
本申请提供的一种行人检测方法,包括:
获取行人检测数据集,对所述行人检测数据集进行数据增强处理,得到训练图像集;
对传统检测模型中的分类定位任务进行分解,并添加全连接层,得到解耦行人检测模型;
利用所述全连接层分别计算分类偏差和定位偏差,并根据所述分类偏差和定位偏差生成所述解耦行人检测模型的损失函数;
使用所述训练图像集和所述损失函数对所述解耦行人检测模型进行训练,得到训练完成的解耦行人检测模型;
利用所述解耦行人检测模型对待检测图像进行检测,得到行人检测信息。
本申请还提供一种行人检测装置,所述装置包括:
训练数据集模块,用于获取行人检测数据集,对所述行人检测数据集进行数据增强处理,得到训练图像集;
模型构建模块,用于对传统检测模型中的分类定位任务进行分解,并添加全连接层,得到解耦行人检测模型;
损失函数模块,用于利用所述全连接层分别计算分类偏差和定位偏差,并根据所述分类偏差和定位偏差生成所述解耦行人检测模型的损失函数;
模型训练模块,用于使用所述训练图像集和所述损失函数对所述解耦行人检测模型进行训练,得到训练完成的解耦行人检测模型;
检测模块,用于利用所述解耦行人检测模型对待检测图像进行检测,得到行人检测信息。
本申请还提供一种电子设备,所述电子设备包括:
存储器,存储至少一个指令;及
处理器,执行所述存储器中存储的指令以实现如下步骤:
获取行人检测数据集,对所述行人检测数据集进行数据增强处理,得到训练图像集;
对传统检测模型中的分类定位任务进行分解,并添加全连接层,得到解耦行人检测模 型;
利用所述全连接层分别计算分类偏差和定位偏差,并根据所述分类偏差和定位偏差生成所述解耦行人检测模型的损失函数;
使用所述训练图像集和所述损失函数对所述解耦行人检测模型进行训练,得到训练完成的解耦行人检测模型;
利用所述解耦行人检测模型对待检测图像进行检测,得到行人检测信息。
本申请还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有至少一个指令,所述至少一个指令被电子设备中的处理器执行以实现如下步骤:
获取行人检测数据集,对所述行人检测数据集进行数据增强处理,得到训练图像集;
对传统检测模型中的分类定位任务进行分解,并添加全连接层,得到解耦行人检测模型;
利用所述全连接层分别计算分类偏差和定位偏差,并根据所述分类偏差和定位偏差生成所述解耦行人检测模型的损失函数;
使用所述训练图像集和所述损失函数对所述解耦行人检测模型进行训练,得到训练完成的解耦行人检测模型;
利用所述解耦行人检测模型对待检测图像进行检测,得到行人检测信息。
附图说明
图1为本申请一实施例提供的行人检测方法的流程示意图;
图2为本申请一实施例提供的行人检测装置的功能模块图;
图3为本申请一实施例提供的实现所述行人检测方法的电子设备的结构示意图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请实施例提供一种行人检测方法。所述行人检测方法的执行主体包括但不限于服务端、终端等能够被配置为执行本申请实施例提供的该方法的电子设备中的至少一种。换言之,所述行人检测方法可以由安装在终端设备或服务端设备的软件或硬件来执行,所述软件可以是区块链平台。所述服务端包括但不限于:单台服务器、服务器集群、云端服务器或云端服务器集群等。
参照图1所示,为本申请一实施例提供的行人检测方法的流程示意图。在本实施例中,所述行人检测方法包括:
S1、获取行人检测数据集,对所述行人检测数据集进行数据增强处理,得到训练图像集。
本申请实施例中所述行人检测数据集为KITTI数据集,包含行人在市区、乡村和高速公路等多种场景下采集的真实图像数据。进一步地,所述行人检测数据集可以从已公开的网络平台中获取。
详细地,所述对所述行人检测数据集进行数据增强处理,得到训练图像集,包括:
根据行人的位置对所述行人检测数据集进行标注,得到带有标签的第一行人数据集;
对所述第一行人数据集进行几何变换处理,或添加高斯噪声处理,得到第二行人数据集;
将所述第一行人数据集与所述第二行人数据集进行汇集,得到训练图像集。
进一步地,所述对所述第一行人数据集进行几何变换处理,或添加高斯噪声处理,包括:对所述第一行人数据集中的图像进行随机的左右反转、旋转、剪裁以及加入不同程度高斯白噪声,并同时对图像中标注的标签进行对应的变换。
本申请实施例通过对所述行人检测数据集进行数据增强处理,丰富图像样本数量,有 利于检测模型的学习,可以提高识别检测的准确性。
S2、对传统检测模型中的分类定位任务进行分解,并添加全连接层,得到解耦行人检测模型。
本申请实施例中所述传统检测模型是一种基于目标检测算法的深度学习网络,如Faster-RCNN模型、SSD模型和YOLO模型等,所述传统检测模型中通常是分类和回归定位一起学习,共享物体潜在存在的区域框和特征提取器。
可选地,所述传统检测模型中包括特征提取网络和分类检测网络,其中,所述特征提取网络用于提取特征,所述分类检测网络用于分类和回归定位。
所述全连接层是一个三层的卷积神经网络,所述全连接层包括多个神经元,且每个神经元上含有激励函数,如ReLU函数,每个神经元与其前一层的所有神经元进行全连接,所述全连接层可以用于预测偏移量。
详细地,所述对传统检测模型中的分类定位任务进行分解,并添加全连接层,得到解耦行人检测模型,包括:
基于深度学习算法分别构建分类网络和定位网络;
使用所述分类网络和所述定位网络替换所述传统检测模型中的分类检测网络;
在所述分类网络后连接预构建的分类全连接层并在所述定位网络后连接预构建的定位全连接层,得到解耦行人检测模型。
其中,本申请实施例所述分类网络是只用于分类的卷积神经网络,所述分类网络会更关注图像的语义特征,并根据语义特征进行分类。所述定位网络是只用于定位的卷积神经网络,所述定位网络会更关注图像的位置信息,即物体的边界框,并根据位置信息对图像中的物体进行定位。
进一步地,所述基于深度学习算法构建分类网络和定位网络,包括:根据分类任务的特征选取多个可选网络操作,并将多个可选网络操作连接得到分类网络;根据定位任务的特征选取多个可选网络操作,并将多个可选网络操作连接得到定位网络。其中,所述可选网络操作包括1x1卷积,3x3卷积,5x5卷积,7x7卷积,最大池化层和平均池化层。
进一步地,本申请实施例所述使用所述分类网络和定位网络替换所述传统检测模型中的分类检测网络包括将所述传统检测模型中的分类检测网络删除;将所述分类网络和所述定位网络并行连接在所述传统检测模型中的特征提取网络后。
本申请实施例通过在空间上对传统检测模型的分类和定位任务进行分解,并分别使用三层全连接网络学习分类框与定位框的形变,其中分类框的形变为点级别的偏移,定位框的形变为框级别的整体偏移。通过学习到的偏移量结合原来的分类框和定位框的位置可以得到分类和定位任务分别关注的区域,通过将分类与定位分离,提高分类和定位的准确性。
S3、利用所述全连接层分别计算分类偏差和定位偏差,并根据所述分类偏差和定位偏差生成所述解耦行人检测模型的损失函数。
本申请实施例中所述全连接层为3层的全连接网络,所述全连接层可以对经过所述解耦行人检测模型中分类网络和定位网络输出的分类框和定位框与真实位置的分类框和定位框之间的偏差进行预测,得到分类偏差和定位偏差。
所述解耦行人检测模型中的分类网络和定位网络分别用于分类和定位,并分别输出带有分类框的特征图和定位框的特征图。进一步地,所述利用所述全连接层分别计算分类偏差和定位偏差,包括:通过所述分类全连接层判断所述分类网络预测的分类框中每个像素点是否含有目标类别,将不含有目标类别的像素点进行统计得到分类偏差;通过所述定位全连接层计算所述定位网络预测的定位框与实际框的交并比IOU(intersection over union)得到定位偏差。其中,所述定位框可以使用(x,y,w,h)表示,(x,y)是定位框的中心坐标,而w和h是定位框的宽与高。
详细地,所述根据所述分类偏差和定位偏差生成所述解耦行人检测模型的损失函数, 包括:
获取所述传统检测模型的原始损失函数;
在所述原始损失函数中添加分类偏差和定位偏差,得到所述解耦行人检测模型的损失函数。
进一步地,本申请实施例中所述原始损失函数,包括:
Figure PCTCN2021083707-appb-000001
其中,L(p i,t i)为损失值,N是训练数据集中样本总数,
Figure PCTCN2021083707-appb-000002
是分类损失,p i是传统检测模型输出的预测标签,
Figure PCTCN2021083707-appb-000003
是真实标签,
Figure PCTCN2021083707-appb-000004
是定位损失,t i是传统检测模型输出的预测定位框位置信息,
Figure PCTCN2021083707-appb-000005
是真实定位框的位置信息,λ是系数,为预设阈值。
本申请实施例所述解耦行人检测模型的损失函数,包括:
Loss=L(p i,t i)+E c+E l
其中,L(p i,t i)是基本损失值,E c是所述分类偏差,E l是所述定位偏差。
S4、使用所述训练图像集和所述损失函数对所述解耦行人检测模型进行训练,得到训练完成的解耦行人检测模型。
详细地,所述使用所述训练图像集和所述损失函数对所述解耦行人检测模型进行训练,直到达到预设的收敛条件,得到训练完成的解耦行人检测模型,包括:
将所述训练图像集输入至所述解耦行人检测模型中进行分类识别和定位检测,得到预测结果,其中,所述预测结果包括类别信息和位置信息;
利用所述损失函数计算所述预测结果的置信度;
根据所述置信度对所述解耦行人检测模型的参数进行更新,并返回将所述训练图像集输入至所述解耦行人检测模型中进行分类识别和定位检测,得到预测结果的步骤,直到达到预设的收敛条件,得到训练完成的解耦行人检测模型。
其中,所述收敛条件是指当前的置信度大于上一次计算的置信度与预设置信度阈值之和。
本申请实施例在训练所述解耦行人检测模型时使用的损失函数不仅包括原普通行人检测任务的损失函数,即模型整体的误差,还包括模型中分类网络的损失,即分类偏差,和模型中定位网络的损失,即定位偏差,有利于所述分类网络和所述定位网络的优化,提高检测结果的准确性。
S5、利用所述解耦行人检测模型对待检测图像进行检测,得到行人检测信息。
本申请实例中所述待检测图像可以是自动驾驶时的实时监控图像。为了进一步保证所述待检测图像的私密性和安全性,所述待检测图像可存储于一区块链的节点中。
详细地,所述利用所述解耦行人检测模型对待检测图像进行检测,得到行人检测信息,包括:
利用所述解耦行人检测模型的特征提取网络对所述待检测图像进行特征提取,得到特征图;
利用所述解耦行人检测模型的分类网络对所述特征图进行分类,得到行人分类信息;
利用所述解耦行人检测模型的分类网络对所述特征图进行定位,得到位置信息;
将所述行人分类信息和所述位置信息汇集,得到与所述待检测图像对应的行人检测信息。
本申请实施例通过将分类与定位任务解耦,提升模型检测的准确性,在检测时将图片输入模型的特征提取主干网络得到特征,然后分别输入模型的分类与定位网络就能得到行人的位置信息。
本申请实施例通过对传统检测模型在空间上对分类和定位任务进行分解,再使用训练图像集对模型进行训练,并在损失函数中添加了对于分类偏差和定位偏差,可以分别使分 类和回归网络学习各自适应的候选框和特征提取器,由于对最后的判别器来说输入和特征提取器都是不共享的,从而最大程度地减少由于优化目标不一致带来的冲突,进而提升行人检测的性能,减少出现误识别或对行人框选不准确的问题,提高识别检测的准确性。因此本申请提出的行人检测方法、装置、电子设备及计算机可读存储介质,可以解决行人检测结果准确性较低的问题。
如图2所示,是本申请一实施例提供的行人检测装置的功能模块图。
本申请所述行人检测装置100可以安装于电子设备中。根据实现的功能,所述行人检测装置100可以包括训练数据集模块101、模型构建模块102、损失函数模块103、模型训练模块104及检测模块105。本申请所述模块也可以称之为单元,是指一种能够被电子设备处理器所执行,并且能够完成固定功能的一系列计算机程序段,其存储在电子设备的存储器中。
在本实施例中,关于各模块/单元的功能如下:
所述训练数据集模块101,用于获取行人检测数据集,对所述行人检测数据集进行数据增强处理,得到训练图像集。
本申请实施例中所述行人检测数据集为KITTI数据集,包含行人在市区、乡村和高速公路等多种场景下采集的真实图像数据。进一步地,所述行人检测数据集可以从已公开的网络平台中获取。
详细地,在对所述行人检测数据集进行数据增强处理,得到训练图像集时,所述训练数据集模块101具体执行下述步骤:
根据行人的位置对所述行人检测数据集进行标注,得到带有标签的第一行人数据集;
对所述第一行人数据集进行几何变换处理,或添加高斯噪声处理,得到第二行人数据集;
将所述第一行人数据集与所述第二行人数据集进行汇集,得到训练图像集。
进一步地,所述对所述第一行人数据集进行几何变换处理,或添加高斯噪声处理,包括:对所述第一行人数据集中的图像进行随机的左右反转、旋转、剪裁以及加入不同程度高斯白噪声,并同时对图像中标注的标签进行对应的变换。
本申请实施例通过对所述行人检测数据集进行数据增强处理,丰富图像样本数量,有利于检测模型的学习,可以提高识别检测的准确性。
所述模型构建模块102,用于对传统检测模型中的分类定位任务进行分解,并添加全连接层,得到解耦行人检测模型。
本申请实施例中所述传统检测模型是一种基于目标检测算法的深度学习网络,如Faster-RCNN模型、SSD模型和YOLO模型等,所述传统检测模型中通常是分类和回归定位一起学习,共享物体潜在存在的区域框和特征提取器。
可选地,所述传统检测模型中包括特征提取网络和分类检测网络,其中,所述特征提取网络用于提取特征,所述分类检测网络用于分类和回归定位。
所述全连接层是一个三层的卷积神经网络,所述全连接层包括多个神经元,且每个神经元上含有激励函数,如ReLU函数,每个神经元与其前一层的所有神经元进行全连接,所述全连接层可以用于预测偏移量。
详细地,所述模型构建模块102具体用于:
基于深度学习算法分别构建分类网络和定位网络;
使用所述分类网络和所述定位网络替换所述传统检测模型中的分类检测网络;
在所述分类网络后连接预构建的分类全连接层并在所述定位网络后连接预构建的定位全连接层,得到解耦行人检测模型。
其中,本申请实施例所述分类网络是只用于分类的卷积神经网络,所述分类网络会更关注图像的语义特征,并根据语义特征进行分类。所述定位网络是只用于定位的卷积神经 网络,所述定位网络会更关注图像的位置信息,即物体的边界框,并根据位置信息对图像中的物体进行定位。
进一步地,所述基于深度学习算法构建分类网络和定位网络,包括:根据分类任务的特征选取多个可选网络操作,并将多个可选网络操作连接得到分类网络;根据定位任务的特征选取多个可选网络操作,并将多个可选网络操作连接得到定位网络。其中,所述可选网络操作包括1x1卷积,3x3卷积,5x5卷积,7x7卷积,最大池化层和平均池化层。
进一步地,本申请实施例所述使用所述分类网络和定位网络替换所述传统检测模型中的分类检测网络包括将所述传统检测模型中的分类检测网络删除;将所述分类网络和所述定位网络并行连接在所述传统检测模型中的特征提取网络后。
本申请实施例通过在空间上对传统检测模型的分类和定位任务进行分解,并分别使用三层全连接网络学习分类框与定位框的形变,其中分类框的形变为点级别的偏移,定位框的形变为框级别的整体偏移。通过学习到的偏移量结合原来的分类框和定位框的位置可以得到分类和定位任务分别关注的区域,通过将分类与定位分离,提高分类和定位的准确性。
所述损失函数模块103,用于利用所述全连接层分别计算分类偏差和定位偏差,并根据所述分类偏差和定位偏差生成所述解耦行人检测模型的损失函数。
本申请实施例中所述全连接层为3层的全连接网络,所述全连接层可以对经过所述解耦行人检测模型中分类网络和定位网络输出的分类框和定位框与真实位置的分类框和定位框之间的偏差进行预测,得到分类偏差和定位偏差。
所述解耦行人检测模型中的分类网络和定位网络分别用于分类和定位,并分别输出带有分类框的特征图和定位框的特征图。进一步地,所述利用所述全连接层分别计算分类偏差和定位偏差,包括:通过所述分类全连接层判断所述分类网络预测的分类框中每个像素点是否含有目标类别,将不含有目标类别的像素点进行统计得到分类偏差;通过所述定位全连接层计算所述定位网络预测的定位框与实际框的交并比IOU(intersection over union)得到定位偏差。其中,所述定位框可以使用(x,y,w,h)表示,(x,y)是定位框的中心坐标,而w和h是定位框的宽与高。
详细地,在根据所述分类偏差和定位偏差生成所述解耦行人检测模型的损失函数时,所述损失函数模块103具体执行下述步骤:
获取所述传统检测模型的原始损失函数;
在所述原始损失函数中添加分类偏差和定位偏差,得到所述解耦行人检测模型的损失函数。
进一步地,本申请实施例中所述原始损失函数,包括:
Figure PCTCN2021083707-appb-000006
其中,L(p i,t i)为损失值,N是训练数据集中样本总数,
Figure PCTCN2021083707-appb-000007
是分类损失,p i是传统检测模型输出的预测标签,
Figure PCTCN2021083707-appb-000008
是真实标签,
Figure PCTCN2021083707-appb-000009
是定位损失,t i是传统检测模型输出的预测定位框位置信息,
Figure PCTCN2021083707-appb-000010
是真实定位框的位置信息,λ是系数,为预设阈值。
本申请实施例所述解耦行人检测模型的损失函数,包括:
Loss=L(p i,t i)+E c+E l
其中,L(p i,t i)是基本损失值,E c是所述分类偏差,E l是所述定位偏差。
所述模型训练模块104,用于使用所述训练图像集和所述损失函数对所述解耦行人检测模型进行训练,得到训练完成的解耦行人检测模型。
详细地,所述模型训练模块104具体用于:
将所述训练图像集输入至所述解耦行人检测模型中进行分类识别和定位检测,得到预测结果,其中,所述预测结果包括类别信息和位置信息;
利用所述损失函数计算所述预测结果的置信度;
根据所述置信度对所述解耦行人检测模型的参数进行更新,并返回将所述训练图像集输入至所述解耦行人检测模型中进行分类识别和定位检测,得到预测结果的步骤,直到达到预设的收敛条件,得到训练完成的解耦行人检测模型。
其中,所述收敛条件是指当前的置信度大于上一次计算的置信度与预设置信度阈值之和。
本申请实施例在训练所述解耦行人检测模型时使用的损失函数不仅包括原普通行人检测任务的损失函数,即模型整体的误差,还包括模型中分类网络的损失,即分类偏差,和模型中定位网络的损失,即定位偏差,有利于所述分类网络和所述定位网络的优化,提高检测结果的准确性。
所述检测模块105,用于利用所述解耦行人检测模型对待检测图像进行检测,得到行人检测信息。
本申请实例中所述待检测图像可以是自动驾驶时的实时监控图像。为了进一步保证所述待检测图像的私密性和安全性,所述待检测图像可存储于一区块链的节点中。
详细地,所述利用所述解耦行人检测模型对待检测图像进行检测,得到行人检测信息,包括:
利用所述解耦行人检测模型的特征提取网络对所述待检测图像进行特征提取,得到特征图;
利用所述解耦行人检测模型的分类网络对所述特征图进行分类,得到行人分类信息;
利用所述解耦行人检测模型的分类网络对所述特征图进行定位,得到位置信息;
将所述行人分类信息和所述位置信息汇集,得到与所述待检测图像对应的行人检测信息。
本申请实施例通过将分类与定位任务解耦,提升模型检测的准确性,在检测时将图片输入模型的特征提取主干网络得到特征,然后分别输入模型的分类与定位网络就能得到行人的位置信息。
如图3所示,是本申请一实施例提供的实现行人检测方法的电子设备的结构示意图。
所述电子设备1可以包括处理器10、存储器11和总线,还可以包括存储在所述存储器11中并可在所述处理器10上运行的计算机程序,如行人检测程序12。
其中,所述存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、移动硬盘、多媒体卡、卡型存储器(例如:SD或DX存储器等)、磁性存储器、磁盘、光盘等。所述存储器11在一些实施例中可以是电子设备1的内部存储单元,例如该电子设备1的移动硬盘。所述存储器11在另一些实施例中也可以是电子设备1的外部存储设备,例如电子设备1上配备的插接式移动硬盘、智能存储卡(Smart Media Card,SMC)、安全数字(Secure Digital,SD)卡、闪存卡(Flash Card)等。进一步地,所述存储器11还可以既包括电子设备1的内部存储单元也包括外部存储设备。所述存储器11不仅可以用于存储安装于电子设备1的应用软件及各类数据,例如行人检测程序12的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。
所述处理器10在一些实施例中可以由集成电路组成,例如可以由单个封装的集成电路所组成,也可以是由多个相同功能或不同功能封装的集成电路所组成,包括一个或者多个中央处理器(Central Processing unit,CPU)、微处理器、数字处理芯片、图形处理器及各种控制芯片的组合等。所述处理器10是所述电子设备的控制核心(Control Unit),利用各种接口和线路连接整个电子设备的各个部件,通过运行或执行存储在所述存储器11内的程序或者模块(例如行人检测程序等),以及调用存储在所述存储器11内的数据,以执行电子设备1的各种功能和处理数据。
所述总线可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。该总 线可以分为地址总线、数据总线、控制总线等。所述总线被设置为实现所述存储器11以及至少一个处理器10等之间的连接通信。
图3仅示出了具有部件的电子设备,本领域技术人员可以理解的是,图3示出的结构并不构成对所述电子设备1的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。
例如,尽管未示出,所述电子设备1还可以包括给各个部件供电的电源(比如电池),优选地,电源可以通过电源管理装置与所述至少一个处理器10逻辑相连,从而通过电源管理装置实现充电管理、放电管理、以及功耗管理等功能。电源还可以包括一个或一个以上的直流或交流电源、再充电装置、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。所述电子设备1还可以包括多种传感器、蓝牙模块、Wi-Fi模块等,在此不再赘述。
进一步地,所述电子设备1还可以包括网络接口,可选地,所述网络接口可以包括有线接口和/或无线接口(如WI-FI接口、蓝牙接口等),通常用于在该电子设备1与其他电子设备之间建立通信连接。
可选地,该电子设备1还可以包括用户接口,用户接口可以是显示器(Display)、输入单元(比如键盘(Keyboard)),可选地,用户接口还可以是标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在电子设备1中处理的信息以及用于显示可视化的用户界面。
应该了解,所述实施例仅为说明之用,在专利申请范围上并不受此结构的限制。
所述电子设备1中的所述存储器11存储的行人检测程序12是多个指令的组合,在所述处理器10中运行时,可以实现:
获取行人检测数据集,对所述行人检测数据集进行数据增强处理,得到训练图像集;
对传统检测模型中的分类定位任务进行分解,并添加全连接层,得到解耦行人检测模型;
利用所述全连接层分别计算分类偏差和定位偏差,并根据所述分类偏差和定位偏差生成所述解耦行人检测模型的损失函数;
使用所述训练图像集和所述损失函数对所述解耦行人检测模型进行训练,得到训练完成的解耦行人检测模型;
利用所述解耦行人检测模型对待检测图像进行检测,得到行人检测信息。
具体地,所述处理器10对上述指令的具体实现方法可参考图1至图3对应实施例中相关步骤的描述,在此不赘述。
进一步地,所述电子设备1集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读存储介质中。所述计算机可读存储介质可以是易失性的,也可以是非易失性的。例如,所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)。
本申请还提供一种计算机可读存储介质,所述可读存储介质存储有计算机程序,所述计算机程序在被电子设备的处理器所执行时,可以实现:
获取行人检测数据集,对所述行人检测数据集进行数据增强处理,得到训练图像集;
对传统检测模型中的分类定位任务进行分解,并添加全连接层,得到解耦行人检测模型;
利用所述全连接层分别计算分类偏差和定位偏差,并根据所述分类偏差和定位偏差生成所述解耦行人检测模型的损失函数;
使用所述训练图像集和所述损失函数对所述解耦行人检测模型进行训练,得到训练完成的解耦行人检测模型;
利用所述解耦行人检测模型对待检测图像进行检测,得到行人检测信息。
在本申请所提供的几个实施例中,应该理解到,所揭露的设备,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。
因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附关联图标记视为限制所涉及的权利要求。
本申请所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。
此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。系统权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第二等词语用来表示名称,而并不表示任何特定的顺序。
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。

Claims (20)

  1. 一种行人检测方法,其中,所述方法包括:
    获取行人检测数据集,对所述行人检测数据集进行数据增强处理,得到训练图像集;
    对传统检测模型中的分类定位任务进行分解,并添加全连接层,得到解耦行人检测模型;
    利用所述全连接层分别计算分类偏差和定位偏差,并根据所述分类偏差和定位偏差生成所述解耦行人检测模型的损失函数;
    使用所述训练图像集和所述损失函数对所述解耦行人检测模型进行训练,得到训练完成的解耦行人检测模型;
    利用所述解耦行人检测模型对待检测图像进行检测,得到行人检测信息。
  2. 如权利要求1所述的行人检测方法,其中,所述对传统检测模型中的分类定位任务进行分解,并添加全连接层,得到解耦行人检测模型,包括:
    基于深度学习算法分别构建分类网络和定位网络;
    使用所述分类网络和所述定位网络替换传统检测模型中的分类检测网络;
    在所述分类网络后连接预构建的分类全连接层并在所述定位网络后连接预构建的定位全连接层,得到解耦行人检测模型。
  3. 如权利要求2所述的行人检测方法,其中,所述使用所述分类网络和定位网络替换传统检测模型中的分类检测网络,包括:
    将所述传统检测模型中的分类检测网络删除;
    将所述分类网络和所述定位网络并行连接在所述传统检测模型中的特征提取网络。
  4. 如权利要求1所述的行人检测方法,其中,所述利用所述全连接层分别计算分类偏差和定位偏差,包括:
    通过所述分类全连接层判断所述分类网络预测的分类框中每个像素点是否含有目标类别,将不含有目标类别的像素点进行统计得到分类偏差;
    通过所述定位全连接层计算所述定位网络预测的定位框与实际框的交并比得到定位偏差。
  5. 如权利要求1所述的行人检测方法,其中,所述根据所述分类偏差和定位偏差生成所述解耦行人检测模型的损失函数,包括:
    获取所述传统检测模型的原始损失函数;
    在所述原始损失函数中添加分类偏差和定位偏差,得到所述解耦行人检测模型的损失函数。
  6. 如权利要求1所述的行人检测方法,其中,所述对所述行人检测数据集进行数据增强处理,得到训练图像集,包括:
    根据行人的位置对所述行人检测数据集进行标注,得到带有标签的第一行人数据集;
    对所述第一行人数据集进行几何变换处理,或添加高斯噪声处理,得到第二行人数据集;
    将所述第一行人数据集与所述第二行人数据集进行汇集,得到训练图像集。
  7. 如权利要求1至6中任意一项所述的行人检测方法,其中,所述利用所述解耦行人检测模型对待检测图像进行检测,得到行人检测信息,包括:
    利用所述解耦行人检测模型的特征提取网络对所述待检测图像进行特征提取,得到特征图;
    利用所述解耦行人检测模型的分类网络对所述特征图进行分类,得到行人分类信息;
    利用所述解耦行人检测模型的分类网络对所述特征图进行定位,得到位置信息;
    将所述行人分类信息和所述位置信息汇集,得到与所述待检测图像对应的行人检测信 息。
  8. 一种行人检测装置,其中,所述装置包括:
    训练数据集模块,用于获取行人检测数据集,对所述行人检测数据集进行数据增强处理,得到训练图像集;
    模型构建模块,用于对传统检测模型中的分类定位任务进行分解,并添加全连接层,得到解耦行人检测模型;
    损失函数模块,用于利用所述全连接层分别计算分类偏差和定位偏差,并根据所述分类偏差和定位偏差生成所述解耦行人检测模型的损失函数;
    模型训练模块,用于使用所述训练图像集和所述损失函数对所述解耦行人检测模型进行训练,得到训练完成的解耦行人检测模型;
    检测模块,用于利用所述解耦行人检测模型对待检测图像进行检测,得到行人检测信息。
  9. 一种电子设备,其中,所述电子设备包括:
    至少一个处理器;以及,
    与所述至少一个处理器通信连接的存储器;其中,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如下步骤:
    获取行人检测数据集,对所述行人检测数据集进行数据增强处理,得到训练图像集;
    对传统检测模型中的分类定位任务进行分解,并添加全连接层,得到解耦行人检测模型;
    利用所述全连接层分别计算分类偏差和定位偏差,并根据所述分类偏差和定位偏差生成所述解耦行人检测模型的损失函数;
    使用所述训练图像集和所述损失函数对所述解耦行人检测模型进行训练,得到训练完成的解耦行人检测模型;
    利用所述解耦行人检测模型对待检测图像进行检测,得到行人检测信息。
  10. 如权利要求9所述的电子设备,其中,所述对传统检测模型中的分类定位任务进行分解,并添加全连接层,得到解耦行人检测模型,包括:
    基于深度学习算法分别构建分类网络和定位网络;
    使用所述分类网络和所述定位网络替换传统检测模型中的分类检测网络;
    在所述分类网络后连接预构建的分类全连接层并在所述定位网络后连接预构建的定位全连接层,得到解耦行人检测模型。
  11. 如权利要求10所述的电子设备,其中,所述使用所述分类网络和定位网络替换传统检测模型中的分类检测网络,包括:
    将所述传统检测模型中的分类检测网络删除;
    将所述分类网络和所述定位网络并行连接在所述传统检测模型中的特征提取网络。
  12. 如权利要求9所述的电子设备,其中,所述利用所述全连接层分别计算分类偏差和定位偏差,包括:
    通过所述分类全连接层判断所述分类网络预测的分类框中每个像素点是否含有目标类别,将不含有目标类别的像素点进行统计得到分类偏差;
    通过所述定位全连接层计算所述定位网络预测的定位框与实际框的交并比得到定位偏差。
  13. 如权利要求9所述的电子设备,其中,所述根据所述分类偏差和定位偏差生成所述解耦行人检测模型的损失函数,包括:
    获取所述传统检测模型的原始损失函数;
    在所述原始损失函数中添加分类偏差和定位偏差,得到所述解耦行人检测模型的损失 函数。
  14. 如权利要求9所述的电子设备,其中,所述对所述行人检测数据集进行数据增强处理,得到训练图像集,包括:
    根据行人的位置对所述行人检测数据集进行标注,得到带有标签的第一行人数据集;
    对所述第一行人数据集进行几何变换处理,或添加高斯噪声处理,得到第二行人数据集;
    将所述第一行人数据集与所述第二行人数据集进行汇集,得到训练图像集。
  15. 如权利要求9至14中任意一项所述的电子设备,其中,所述利用所述解耦行人检测模型对待检测图像进行检测,得到行人检测信息,包括:
    利用所述解耦行人检测模型的特征提取网络对所述待检测图像进行特征提取,得到特征图;
    利用所述解耦行人检测模型的分类网络对所述特征图进行分类,得到行人分类信息;
    利用所述解耦行人检测模型的分类网络对所述特征图进行定位,得到位置信息;
    将所述行人分类信息和所述位置信息汇集,得到与所述待检测图像对应的行人检测信息。
  16. 一种计算机可读存储介质,存储有计算机程序,其中,所述计算机程序被处理器执行时实现如下步骤:
    获取行人检测数据集,对所述行人检测数据集进行数据增强处理,得到训练图像集;
    对传统检测模型中的分类定位任务进行分解,并添加全连接层,得到解耦行人检测模型;
    利用所述全连接层分别计算分类偏差和定位偏差,并根据所述分类偏差和定位偏差生成所述解耦行人检测模型的损失函数;
    使用所述训练图像集和所述损失函数对所述解耦行人检测模型进行训练,得到训练完成的解耦行人检测模型;
    利用所述解耦行人检测模型对待检测图像进行检测,得到行人检测信息。
  17. 如权利要求16所述的计算机可读存储介质,其中,所述对传统检测模型中的分类定位任务进行分解,并添加全连接层,得到解耦行人检测模型,包括:
    基于深度学习算法分别构建分类网络和定位网络;
    使用所述分类网络和所述定位网络替换传统检测模型中的分类检测网络;
    在所述分类网络后连接预构建的分类全连接层并在所述定位网络后连接预构建的定位全连接层,得到解耦行人检测模型。
  18. 如权利要求17所述的计算机可读存储介质,其中,所述使用所述分类网络和定位网络替换传统检测模型中的分类检测网络,包括:
    将所述传统检测模型中的分类检测网络删除;
    将所述分类网络和所述定位网络并行连接在所述传统检测模型中的特征提取网络。
  19. 如权利要求16所述的计算机可读存储介质,其中,所述利用所述全连接层分别计算分类偏差和定位偏差,包括:
    通过所述分类全连接层判断所述分类网络预测的分类框中每个像素点是否含有目标类别,将不含有目标类别的像素点进行统计得到分类偏差;
    通过所述定位全连接层计算所述定位网络预测的定位框与实际框的交并比得到定位偏差。
  20. 如权利要求16所述的计算机可读存储介质,其中,所述根据所述分类偏差和定位偏差生成所述解耦行人检测模型的损失函数,包括:
    获取所述传统检测模型的原始损失函数;
    在所述原始损失函数中添加分类偏差和定位偏差,得到所述解耦行人检测模型的损失 函数。
PCT/CN2021/083707 2020-12-31 2021-03-30 行人检测方法、装置、电子设备及存储介质 WO2022141858A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011637418.5 2020-12-31
CN202011637418.5A CN112749653A (zh) 2020-12-31 2020-12-31 行人检测方法、装置、电子设备及存储介质

Publications (1)

Publication Number Publication Date
WO2022141858A1 true WO2022141858A1 (zh) 2022-07-07

Family

ID=75651116

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/083707 WO2022141858A1 (zh) 2020-12-31 2021-03-30 行人检测方法、装置、电子设备及存储介质

Country Status (2)

Country Link
CN (1) CN112749653A (zh)
WO (1) WO2022141858A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116383427A (zh) * 2023-06-06 2023-07-04 深圳市微克科技有限公司 一种基于智能穿戴设备的图片批量解析方法、系统及介质
CN116721095A (zh) * 2023-08-04 2023-09-08 杭州瑞琦信息技术有限公司 一种航拍式的道路照明故障检测方法及装置

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113255766B (zh) * 2021-05-25 2023-12-22 平安科技(深圳)有限公司 一种图像分类方法、装置、设备和存储介质
CN113743256B (zh) * 2021-08-17 2023-12-26 武汉大学 一种工地安全智能预警方法与装置
CN115861316B (zh) * 2023-02-27 2023-09-29 深圳佑驾创新科技股份有限公司 行人检测模型的训练方法及其装置、行人检测方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170169313A1 (en) * 2015-12-14 2017-06-15 Samsung Electronics Co., Ltd. Image processing apparatus and method based on deep learning and neural network learning
CN108376235A (zh) * 2018-01-15 2018-08-07 深圳市易成自动驾驶技术有限公司 图像检测方法、装置及计算机可读存储介质
CN111062413A (zh) * 2019-11-08 2020-04-24 深兰科技(上海)有限公司 一种道路目标检测方法、装置、电子设备及存储介质
US20200143205A1 (en) * 2017-08-10 2020-05-07 Intel Corporation Convolutional neural network framework using reverse connections and objectness priors for object detection
CN111160379A (zh) * 2018-11-07 2020-05-15 北京嘀嘀无限科技发展有限公司 图像检测模型的训练方法及装置、目标检测方法及装置
CN111950329A (zh) * 2019-05-16 2020-11-17 长沙智能驾驶研究院有限公司 目标检测及模型训练方法、装置、计算机设备和存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170169313A1 (en) * 2015-12-14 2017-06-15 Samsung Electronics Co., Ltd. Image processing apparatus and method based on deep learning and neural network learning
US20200143205A1 (en) * 2017-08-10 2020-05-07 Intel Corporation Convolutional neural network framework using reverse connections and objectness priors for object detection
CN108376235A (zh) * 2018-01-15 2018-08-07 深圳市易成自动驾驶技术有限公司 图像检测方法、装置及计算机可读存储介质
CN111160379A (zh) * 2018-11-07 2020-05-15 北京嘀嘀无限科技发展有限公司 图像检测模型的训练方法及装置、目标检测方法及装置
CN111950329A (zh) * 2019-05-16 2020-11-17 长沙智能驾驶研究院有限公司 目标检测及模型训练方法、装置、计算机设备和存储介质
CN111062413A (zh) * 2019-11-08 2020-04-24 深兰科技(上海)有限公司 一种道路目标检测方法、装置、电子设备及存储介质

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116383427A (zh) * 2023-06-06 2023-07-04 深圳市微克科技有限公司 一种基于智能穿戴设备的图片批量解析方法、系统及介质
CN116383427B (zh) * 2023-06-06 2023-08-11 深圳市微克科技有限公司 一种基于智能穿戴设备的图片批量解析方法、系统及介质
CN116721095A (zh) * 2023-08-04 2023-09-08 杭州瑞琦信息技术有限公司 一种航拍式的道路照明故障检测方法及装置
CN116721095B (zh) * 2023-08-04 2023-11-03 杭州瑞琦信息技术有限公司 一种航拍式的道路照明故障检测方法及装置

Also Published As

Publication number Publication date
CN112749653A (zh) 2021-05-04

Similar Documents

Publication Publication Date Title
WO2022141858A1 (zh) 行人检测方法、装置、电子设备及存储介质
CN112257774B (zh) 基于联邦学习的目标检测方法、装置、设备及存储介质
WO2021208735A1 (zh) 行为检测方法、装置及计算机可读存储介质
WO2021218336A1 (zh) 用户信息判别方法、装置、设备及计算机可读存储介质
WO2020186887A1 (zh) 一种连续小样本图像的目标检测方法、装置及设备
CN112137591B (zh) 基于视频流的目标物位置检测方法、装置、设备及介质
CN112231586A (zh) 基于迁移学习的课程推荐方法、装置、设备及介质
WO2022105179A1 (zh) 生物特征图像识别方法、装置、电子设备及可读存储介质
CN112699775A (zh) 基于深度学习的证件识别方法、装置、设备及存储介质
WO2021151277A1 (zh) 目标物损伤程度判定方法、装置、电子设备及存储介质
CN111782900B (zh) 异常业务检测方法、装置、电子设备及存储介质
WO2023159755A1 (zh) 虚假新闻检测方法、装置、设备及存储介质
CN113298159A (zh) 目标检测方法、装置、电子设备及存储介质
CN113158676A (zh) 专业实体与关系联合抽取方法、系统及电子设备
WO2022227192A1 (zh) 图像分类方法、装置、电子设备及介质
WO2022095519A1 (zh) 通关检验方法、装置、电子设备及计算机可读存储介质
CN113204698B (zh) 新闻主题词生成方法、装置、设备及介质
CN112528903B (zh) 人脸图像获取方法、装置、电子设备及介质
WO2021151305A1 (zh) 基于缺失数据的样本分析方法、装置、电子设备及介质
CN113157739A (zh) 跨模态检索方法、装置、电子设备及存储介质
CN112101191A (zh) 基于边框注意力网络的表情识别方法、装置、设备及介质
WO2022227191A1 (zh) 非主动活体检测方法、装置、电子设备及存储介质
WO2022222228A1 (zh) 文本不良信息识别方法、装置、电子设备及存储介质
CN112860851B (zh) 基于根因分析的课程推荐方法、装置、设备及介质
CN112132037B (zh) 基于人工智能的人行道检测方法、装置、设备及介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21912628

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21912628

Country of ref document: EP

Kind code of ref document: A1