Target detection method and device

By using a feature extraction network to perform feature extraction and sampling processing for different camera device types, the problem of inaccurate detection caused by equipment and environmental influences in existing technologies is solved, and the accuracy of target detection is improved.

CN113869147BActive Publication Date: 2025-09-26BEIJING ELITE LUTONG TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111064249.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-10
Publication Date
2025-09-26
Estimated Expiration
2041-09-10

AI Technical Summary

Technical Problem

In real-world scenarios, target detection is affected by the camera's shooting angle, lens distance, and environmental complexity, which can lead to missed detections and inaccurate detections due to targets being too large or too small.

Method used

Different feature extraction networks are used for feature extraction and sampling processing for different camera device types, including downsampling for ball camera devices and upsampling for gun camera devices, to obtain the first and second feature maps respectively for accurate target detection.

Benefits of technology

The accuracy and effect of target detection are improved, and precise detection of target objects is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113869147B_ABST
    Figure CN113869147B_ABST
Patent Text Reader

Abstract

The present disclosure provides a target detection method and device, which relates to the field of computer technology, in particular to the field of computer vision and image pattern recognition technology. The specific implementation scheme is: obtaining a target image and a type identification of the camera device through a camera device; in response to the type identification of the camera device being a ball camera device, inputting the target image into a first feature extraction network, so as to use the first feature extraction network to perform feature extraction and downsampling on the target image, and obtain a first feature map; in response to the type identification of the camera device being a gun camera device, inputting the target image into a second feature extraction network, so as to use the second feature extraction network to perform feature extraction and upsampling on the target image, and obtain a second feature map; performing target detection on the target image according to the first feature map or the second feature map, and outputting the detection result. For images obtained by different camera devices, they are input into different feature extraction networks for targeted feature extraction, which effectively improves the accuracy of target detection and recognition, improves the effect of target detection, and realizes the precise detection of target objects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to the field of computer vision, image pattern recognition, and intelligent transportation technology. Background Art

[0002] With the continuous development of Internet technology, the era of the Internet of Everything is coming, and intelligent transportation systems have emerged and are constantly developing. Object detection is one of the key technologies in intelligent transportation systems.

[0003] In related technologies, due to the influence of factors such as the shooting angle of the camera equipment, the distance of the lens, and the complex environment, when performing target detection in real scenes, there are cases where the detection effect is poor, such as missed detection or inaccurate detection, because the target is too large or too small. Summary of the Invention

[0004] The present disclosure provides a target detection method, apparatus, device, and storage medium.

[0005] According to a first aspect of the present disclosure, there is provided a target detection method, comprising:

[0006] Acquire a target image and a type identifier of the camera device through a camera device;

[0007] In response to the type identification of the camera device being a dome camera device, inputting the target image into a first feature extraction network, so as to perform feature extraction and downsampling on the target image using the first feature extraction network to obtain a first feature map;

[0008] In response to the camera device being identified as a box camera device, inputting the target image into a second feature extraction network to perform feature extraction and upsampling on the target image using the second feature extraction network to obtain a second feature map;

[0009] Perform target detection on the target image according to the first feature map or the second feature map, and output a detection result.

[0010] According to a second aspect of the present disclosure, there is provided an object detection device, comprising:

[0011] An acquisition module, configured to acquire a target image and a type identifier of the camera device through a camera device;

[0012] a first feature module, configured to input the target image into a first feature extraction network in response to the type identification of the camera device being a dome camera device, so as to perform feature extraction and downsampling on the target image using the first feature extraction network to obtain a first feature map;

[0013] a second feature module, configured to, in response to the camera device being identified as a box camera device, input the target image into a second feature extraction network, so as to perform feature extraction and upsampling on the target image using the second feature extraction network to obtain a second feature map;

[0014] A processing module is used to perform target detection on the target image according to the first feature map or the second feature map, and output a detection result.

[0015] According to a third aspect of the present disclosure, there is provided an electronic device, including:

[0016] at least one processor; and

[0017] a memory communicatively connected to the at least one processor; wherein,

[0018] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect of the present disclosure.

[0019] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in the first aspect of the present disclosure.

[0020] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein the computer program implements the method described in the first aspect of the present disclosure when executed by a processor.

[0021] The target detection method, device, and storage medium provided by the embodiments of the present disclosure can obtain a target image and a type identification of the camera device through a camera device; in response to the type identification of the camera device being a dome camera device, the target image is input into a first feature extraction network, so that the first feature extraction network is used to perform feature extraction and downsampling on the target image to obtain a first feature map; in response to the type identification of the camera device being a gun camera device, the target image is input into a second feature extraction network, so that the second feature extraction network is used to perform feature extraction and upsampling on the target image to obtain a second feature map; based on the first feature map or the second feature map, target detection is performed on the target image, and a detection result is output. Images obtained by different camera devices are input into different feature extraction networks for targeted feature extraction, which effectively improves the accuracy of target detection and recognition, improves the effect of target detection, and achieves accurate detection of target objects.

[0022] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure.

[0024] Figure 1 is a schematic diagram of a target detection method according to an embodiment of the present disclosure;

[0025] Figure 2 is a flow chart of another target detection method according to an embodiment of the present disclosure;

[0026] Figure 3 is a schematic diagram of a first feature extraction network structure according to an embodiment of the present disclosure;

[0027] Figure 4 is a schematic diagram of a second feature extraction network structure according to an embodiment of the present disclosure;

[0028] Figure 5 is a schematic diagram of a target detection device according to an embodiment of the present disclosure;

[0029] Figure 6 is a block diagram of an electronic device used to implement the target detection method according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0030] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0031] The present disclosure provides a method for detecting a target. Figure 1 The flowchart of a target detection method shown in FIG. 1 is a flowchart of a target detection method. The method can be executed by various electronic devices with data processing capabilities. The electronic devices executing the method of this embodiment are not limited here. The method mainly includes the following steps S101 to S104:

[0032] Step S101: obtaining a target image and a type identifier of the camera device through a camera device.

[0033] The target image refers to a frame of image acquired by a camera device and including a target object to be detected.

[0034] It can be understood that after the camera device acquires the target image, it can transmit the target image and the type identification of the camera device to the electronic device executing the method of this embodiment through a switch connection or other communication connection methods, so that the electronic device executing the method of this embodiment acquires the target image and the type identification of the camera device. The communication connection method and the transmission method of the target image and the type identification of the camera device are not limited here.

[0035] Optionally, the camera device includes a dome camera device and a box camera device, and the dome camera device and the box camera device can be distinguished and identified by a type identifier of the camera device.

[0036] Among them, the shooting range of the ball camera equipment is closer, and the shooting range of the gun camera equipment is farther.

[0037] In step S102 , in response to the camera device being identified as a dome camera device, the target image is input into a first feature extraction network, so as to perform feature extraction and downsampling on the target image using the first feature extraction network to obtain a first feature map.

[0038] Among them, the first feature extraction network is a network model that can extract features and downsample the image input thereto to output a feature map.

[0039] As a possible implementation, the first feature extraction network includes at least one feature extraction layer and at least one downsampling layer.

[0040] It is understood that in the first feature extraction network, the number of feature extraction layers and downsampling layers, the sampling rate, and the order of arrangement can be set differently based on the requirements for the final output first feature map. The requirements for the first feature map include scale and the number of target categories. It should be noted that the number of target categories refers to the number of target object classifications detected during target detection in the target image. For example, when detecting cars and people, the number of target categories is 2.

[0041] Optionally, the first feature extraction network may further include at least one upsampling layer.

[0042] In some embodiments, the first feature map includes multiple scales, and first feature maps of different scales have different receptive fields.

[0043] The receptive field refers to the size of the area of ​​the target image that can be represented by each feature point in the feature map.

[0044] Step S103: In response to the camera device being identified as a box camera device, the target image is input into a second feature extraction network, so as to perform feature extraction and upsampling on the target image using the second feature extraction network to obtain a second feature map.

[0045] The second feature extraction network is a network model that can perform feature extraction and upsampling on an image input thereto to output a feature map.

[0046] As a possible implementation, the second feature extraction network includes at least one feature extraction layer and at least one upsampling layer.

[0047] It is understood that in the second feature extraction network, the number of feature extraction layers and upsampling layers, the sampling rate, and the order of arrangement can be set differently based on the requirements for the final output second feature map. The requirements for the second feature map include scale and the number of target categories. It should be noted that the number of target categories refers to the number of target object classifications detected during target detection in the target image. For example, when detecting cars and people, the number of target categories is 2.

[0048] Optionally, the second feature extraction network may further include at least one downsampling layer.

[0049] In some embodiments, the second feature map includes multiple scales, and second feature maps of different scales have different receptive fields.

[0050] The receptive field refers to the size of the area of ​​the target image that can be represented by each feature point in the feature map.

[0051] Step S104: perform target detection on the target image according to the first feature map or the second feature map, and output a detection result.

[0052] As a possible implementation, when the type of the camera device is identified as a dome camera device, target detection is performed on the target image according to the first feature map obtained in step S102, and a detection result is output.

[0053] As another possible implementation, when the type of the camera device is identified as a box-type device, target detection is performed on the target image according to the second feature map obtained in step S103, and a detection result is output.

[0054] Optionally, the detection result includes a detection frame of the target object in the target image and a category identifier to which the target object belongs.

[0055] The above-mentioned method provided by the embodiment of the present disclosure obtains a target image and a type identification of the camera device through a camera device; in response to the type identification of the camera device being a ball camera device, the target image is input into a first feature extraction network, so that the first feature extraction network is used to perform feature extraction and downsampling on the target image to obtain a first feature map; in response to the type identification of the camera device being a gun camera device, the target image is input into a second feature extraction network, so that the second feature extraction network is used to perform feature extraction and upsampling on the target image to obtain a second feature map; based on the first feature map or the second feature map, target detection is performed on the target image, and a detection result is output. Images obtained by different camera devices are input into different feature extraction networks for targeted feature extraction, which effectively improves the accuracy of target detection and recognition, improves the effect of target detection, and realizes accurate detection of target objects.

[0056] See also Figure 2 The flowchart of another target detection method shown schematically describes the method flow for performing target detection, which mainly includes the following steps S201 to S205:

[0057] Step S201: obtaining a target image and a type identifier of the camera device through a camera device.

[0058] In step S202, in response to the camera device being identified as a dome camera device, the target image is sequentially input into multiple feature extraction layers in a first feature extraction network and at least one downsampling layer located in the middle of the multiple feature extraction layers to obtain first feature maps of corresponding scales output by the multiple feature extraction layers in the first feature extraction network.

[0059] As an exemplary embodiment, the first feature extraction network includes: a first upsampling layer and a first downsampling layer, and the multiple feature extraction layers in the first feature extraction network include a first feature extraction layer, a second feature extraction layer, a third feature extraction layer, a fourth feature extraction layer, a fifth feature extraction layer and a sixth feature extraction layer.

[0060] The target image is sequentially input into multiple feature extraction layers and at least one downsampling layer located in the middle of the multiple feature extraction layers in the exemplary first feature extraction network, so that first feature maps of three scales can be obtained.

[0061] For a clearer and more intuitive understanding of the first feature extraction network in this exemplary embodiment, see Figure 3 , Figure 3 This is a schematic diagram of a first feature extraction network structure.

[0062] Input the target image into Figure 3In the first feature extraction network shown in FIG, a first feature map of corresponding scales output by multiple feature extraction layers is obtained. The specific process includes:

[0063] 1a. Input the target image into the first feature extraction layer for feature extraction to obtain the first intermediate image.

[0064] 1b. Input the first intermediate image into the second feature extraction layer for feature extraction to obtain a second intermediate image.

[0065] 1c. Input the second intermediate image into the third feature extraction layer for feature extraction to obtain a first feature map of the first scale.

[0066] 1d. Input the second intermediate image to the first upsampling layer for upsampling to obtain a third intermediate image.

[0067] 1e. The third intermediate image and the first intermediate image are combined and input into the fourth feature extraction layer for feature extraction to obtain a fourth intermediate image.

[0068] 1f. Input the fourth intermediate image into the fifth feature extraction layer for feature extraction to obtain a first feature map of the second scale.

[0069] 1g. Input the fourth intermediate image to the first downsampling layer for downsampling to obtain a fifth intermediate image.

[0070] 1h. Combine the fifth intermediate image and the second intermediate image and input them into the sixth feature extraction layer for feature extraction to obtain a first feature map of the third scale.

[0071] In the embodiment of the present application, the number of target categories of feature maps of different scales is the same.

[0072] In some embodiments, the receptive field of the first feature map at the first scale is 32*32, the receptive field of the first feature map at the second scale is 16*16, and the receptive field of the first feature map at the third scale is 64*64.

[0073] It is understandable that feature maps of more scales can be obtained by adding feature extraction layers and downsampling layers, etc. The structure of the feature extraction network is adjusted accordingly according to the requirements of the output feature map.

[0074] Step S203: Perform target detection on the target image according to the first feature map, and output a detection frame of the target object and a category identifier to which the target object belongs.

[0075] Optionally, target detection is performed on the target image according to the first feature map of the first scale, the first feature map of the second scale, and the first feature map of the third scale, and a detection frame of the target object and a category identifier to which the target object belongs are output.

[0076] As an exemplary implementation, target detection is performed on a target image based on feature maps of three scales, with receptive fields of 32*32, 16*16, and 64*64.

[0077] In some embodiments, the category identifier of the target object can be displayed in text. For example, the category identifier of the object can be marked with text in the upper right corner of the detection frame.

[0078] In some embodiments, the category identifier of the target object may also be represented by the color, shape, etc. of the detection frame. For example, a red detection frame represents a vehicle, and a yellow detection frame represents a pedestrian.

[0079] Step S204, in response to the type identification of the camera device as a box camera device, sequentially input the target image into multiple feature extraction layers in the second feature extraction network and at least one upsampling layer located in the middle of the multiple feature extraction layers to obtain second feature maps of corresponding scales output by the multiple feature extraction layers in the second feature extraction network.

[0080] As an exemplary embodiment, the second feature extraction network includes a second upsampling layer and a third upsampling layer, and the multiple feature extraction layers in the second feature extraction network include a seventh feature extraction layer, an eighth feature extraction layer, a ninth feature extraction layer, a tenth feature extraction layer, an eleventh feature extraction layer, a twelfth feature extraction layer and a thirteenth feature extraction layer.

[0081] The target image is sequentially input into multiple feature extraction layers and at least one upsampling layer located in the middle of the multiple feature extraction layers in the exemplary second feature extraction network, so that second feature maps of three scales can be obtained.

[0082] For a clearer and more intuitive understanding of the second feature extraction network in this exemplary embodiment, see Figure 4 , Figure 4 A schematic diagram of a second feature extraction network structure.

[0083] Input the target image into Figure 4 In the second feature extraction network shown in FIG, a specific process of obtaining a second feature map of corresponding scales output by multiple feature extraction layers includes:

[0084] 2a. Input the target image into the seventh feature extraction layer for feature extraction to obtain the seventh intermediate image.

[0085] 2b. Input the seventh intermediate image into the eighth feature extraction layer for feature extraction to obtain an eighth intermediate image.

[0086] 2c. Input the eighth intermediate image into the ninth feature extraction layer for feature extraction to obtain a ninth intermediate image.

[0087] 2d. Input the ninth intermediate image into the tenth feature extraction layer for feature extraction to obtain a second feature map of the fourth scale.

[0088] 2e. Input the ninth intermediate image to the second upsampling layer for upsampling to obtain a tenth intermediate image.

[0089] 2f. Combine the tenth intermediate image and the eighth intermediate image and input them into the eleventh feature extraction layer to obtain the eleventh intermediate image.

[0090] 2g. Input the eleventh intermediate image to the twelfth feature extraction layer for feature extraction to obtain a second feature map of the fifth scale.

[0091] 2h. Input the eleventh intermediate image to the third upsampling layer for upsampling to obtain the twelfth intermediate image.

[0092] 2i. The twelfth intermediate image and the seventh intermediate image are combined and input into the thirteenth feature extraction layer for feature extraction to obtain a second feature map of the sixth scale.

[0093] In the embodiment of the present application, the number of target categories of feature maps of different scales is the same.

[0094] In some embodiments, the receptive field of the second feature map at the fourth scale is 32*32, the receptive field of the second feature map at the fifth scale is 16*16, and the receptive field of the second feature map at the sixth scale is 8*8.

[0095] It is understandable that feature maps of more scales can be obtained by adding feature extraction layers and upsampling layers, etc. The structure of the feature extraction network is adjusted accordingly according to the requirements of the output feature map.

[0096] Step S205 : performing target detection on the target image according to the second feature map, and outputting a detection frame of the target object and a category identifier to which the target object belongs.

[0097] Optionally, target detection is performed on the target image according to the second feature map at the fourth scale, the second feature map at the fifth scale, and the second feature map at the sixth scale, and a detection frame of the target object and a category identifier to which the target object belongs are output.

[0098] As an exemplary implementation, target detection is performed on a target image based on feature maps of three scales, with receptive fields of 32*32, 16*16, and 8*8.

[0099] In some embodiments, the category identifier of the target object can be displayed in text. For example, the category identifier of the object can be marked with text in the upper right corner of the detection frame.

[0100] In some embodiments, the category identifier of the target object may also be represented by the color, shape, etc. of the detection frame. For example, a red detection frame represents a vehicle, and a yellow detection frame represents a pedestrian.

[0101] The above-mentioned method provided by the embodiment of the present disclosure obtains the target image and the type identification of the camera device through the camera device. In response to the type identification of the camera device being a dome camera device, the target image is sequentially input into multiple feature extraction layers in a first feature extraction network and at least one downsampling layer located in the middle of the multiple feature extraction layers to obtain a first feature map of corresponding scales output by the multiple feature extraction layers in the first feature extraction network. According to the first feature map, target detection is performed on the target image, and a detection frame of the target object and a category identification to which the target object belongs are output. In response to the type identification of the camera device being a gun camera device, the target image is sequentially input into multiple feature extraction layers in a second feature extraction network and at least one upsampling layer located in the middle of the multiple feature extraction layers to obtain a second feature map of corresponding scales output by the multiple feature extraction layers in the second feature extraction network. According to the second feature map, target detection is performed on the target image, and a detection frame of the target object and a category identification to which the target object belongs are output. It can input images acquired by different camera devices into different feature extraction networks for targeted feature extraction to output feature maps of different scales. Target detection can be performed on target images based on these feature maps of different scales, which can effectively improve the accuracy of target detection and recognition, improve the effect of target detection, and achieve accurate detection of target objects.

[0102] Corresponding to the aforementioned target detection method, the present disclosure also provides a target detection device, see Figure 5 The structural block diagram of a target detection device shown in FIG. mainly includes the following:

[0103] An acquisition module 510 is configured to acquire a target image and a type identifier of the camera device through a camera device;

[0104] a first feature module 520 configured to, in response to the camera device being identified as a dome camera device, input the target image into a first feature extraction network, and perform feature extraction and downsampling on the target image using the first feature extraction network to obtain a first feature map;

[0105] a second feature module 530 configured to, in response to the camera device being identified as a box camera device, input the target image into a second feature extraction network to perform feature extraction and upsampling on the target image using the second feature extraction network to obtain a second feature map;

[0106] The processing module 540 is used to perform target detection on the target image according to the first feature map or the second feature map, and output a detection result.

[0107] In some implementations, the first feature module 520 is specifically configured to:

[0108] In response to the type identification of the camera device as a dome camera device, the target image is sequentially input into multiple feature extraction layers in a first feature extraction network and at least one downsampling layer located in the middle of the multiple feature extraction layers to obtain first feature maps of corresponding scales output by the multiple feature extraction layers in the first feature extraction network.

[0109] In some embodiments, the first feature extraction network includes a first upsampling layer and a first downsampling layer, and the multiple feature extraction layers in the first feature extraction network include a first feature extraction layer, a second feature extraction layer, a third feature extraction layer, a fourth feature extraction layer, a fifth feature extraction layer, and a sixth feature extraction layer;

[0110] The first feature module 520 is specifically configured to:

[0111] Inputting the target image into a first feature extraction layer for feature extraction to obtain a first intermediate image;

[0112] Inputting the first intermediate image into a second feature extraction layer for feature extraction to obtain a second intermediate image;

[0113] Inputting the second intermediate image into a third feature extraction layer for feature extraction to obtain a first feature map of a first scale;

[0114] Inputting the second intermediate image into the first upsampling layer for upsampling to obtain a third intermediate image;

[0115] Combining the third intermediate image and the first intermediate image and inputting them into a fourth feature extraction layer for feature extraction to obtain a fourth intermediate image;

[0116] Inputting the fourth intermediate image into a fifth feature extraction layer for feature extraction to obtain a first feature map of a second scale;

[0117] Inputting the fourth intermediate image into the first downsampling layer for downsampling to obtain a fifth intermediate image;

[0118] The fifth intermediate image and the second intermediate image are combined and input into a sixth feature extraction layer for feature extraction to obtain a first feature map of a third scale.

[0119] In some embodiments, the second feature module 530 is specifically configured to:

[0120] In response to the type identification of the camera device being a box-type device, the target image is sequentially input into multiple feature extraction layers in a second feature extraction network and at least one upsampling layer located in the middle of the multiple feature extraction layers to obtain second feature maps of corresponding scales output by the multiple feature extraction layers in the second feature extraction network.

[0121] In some embodiments, the second feature extraction network includes a second upsampling layer and a third upsampling layer, and the multiple feature extraction layers in the second feature extraction network include a seventh feature extraction layer, an eighth feature extraction layer, a ninth feature extraction layer, a tenth feature extraction layer, an eleventh feature extraction layer, a twelfth feature extraction layer, and a thirteenth feature extraction layer;

[0122] The second feature module 530 is specifically used for:

[0123] Inputting the target image into a seventh feature extraction layer for feature extraction to obtain a seventh intermediate image;

[0124] inputting the seventh intermediate image into an eighth feature extraction layer for feature extraction to obtain an eighth intermediate image;

[0125] inputting the eighth intermediate image into a ninth feature extraction layer for feature extraction to obtain a ninth intermediate image;

[0126] Inputting the ninth intermediate image into a tenth feature extraction layer for feature extraction to obtain a second feature map at a fourth scale;

[0127] Inputting the ninth intermediate image into a second upsampling layer for upsampling to obtain a tenth intermediate image;

[0128] Combining the tenth intermediate image and the eighth intermediate image and inputting them into an eleventh feature extraction layer to obtain an eleventh intermediate image;

[0129] Inputting the eleventh intermediate image into a twelfth feature extraction layer for feature extraction to obtain a second feature map at a fifth scale;

[0130] Inputting the eleventh intermediate image into a third upsampling layer for upsampling to obtain a twelfth intermediate image;

[0131] The twelfth intermediate image and the seventh intermediate image are combined and input into a thirteenth feature extraction layer for feature extraction to obtain a second feature map at a sixth scale.

[0132] In some embodiments, the processing module 540 is specifically configured to:

[0133] Performing target detection on the target image according to the first feature map of the first scale, the first feature map of the second scale, and the first feature map of the third scale, and outputting a detection frame of the target object and a category identifier to which the target object belongs.

[0134] In some embodiments, the processing module 540 is specifically configured to:

[0135] Performing target detection on the target image according to the second feature map at the fourth scale, the second feature map at the fifth scale, and the second feature map at the sixth scale, outputting a detection frame of the target object and a category identifier to which the target object belongs.

[0136] The above-mentioned device provided by the embodiment of the present disclosure obtains a target image and a type identification of the camera device through a camera device; in response to the type identification of the camera device being a dome camera device, the target image is input into a first feature extraction network, so that the first feature extraction network is used to perform feature extraction and downsampling on the target image to obtain a first feature map; in response to the type identification of the camera device being a gun camera device, the target image is input into a second feature extraction network, so that the second feature extraction network is used to perform feature extraction and upsampling on the target image to obtain a second feature map; based on the first feature map or the second feature map, target detection is performed on the target image, and a detection result is output. Images obtained by different camera devices are input into different feature extraction networks for targeted feature extraction, which effectively improves the accuracy of target detection and recognition, improves the effect of target detection, and realizes accurate detection of target objects.

[0137] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0138] First, an embodiment of the present disclosure provides an electronic device, including:

[0139] at least one processor; and

[0140] a memory communicatively connected to at least one processor; wherein,

[0141] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform any of the aforementioned target detection methods.

[0142] An embodiment of the present disclosure further provides a computer program product, including a computer program, which implements any of the aforementioned target detection methods when executed by a processor.

[0143] Figure 6A schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0144] like Figure 6 As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. Various programs and data required for the operation of the device 600 can also be stored in the RAM 603. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0145] Various components in device 600 are connected to I / O interface 605, including an input unit 606, such as a keyboard, mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a magnetic disk, optical disk, etc.; and a communication unit 609, such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows device 600 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0146] The computing unit 601 can be a variety of general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as the target detection method. For example, in some embodiments, the target detection method can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as the storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the target detection method described above can be performed. Alternatively, in other embodiments, the computing unit 601 can be configured to perform the target detection method by any other appropriate means (e.g., by means of firmware).

[0147] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0148] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0149] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0150] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0151] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0152] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises through computer programs running on the respective computers and having a client-server relationship with each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.

[0153] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not a limitation herein.

[0154] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.

Claims

1. A target detection method, comprising: Acquire a target image and a type identifier of the camera device through a camera device; In response to the type identification of the camera device being a dome camera device, inputting the target image into a first feature extraction network, so as to perform feature extraction and downsampling on the target image using the first feature extraction network to obtain a first feature map; In response to the camera device being identified as a box camera device, inputting the target image into a second feature extraction network to perform feature extraction and upsampling on the target image using the second feature extraction network to obtain a second feature map; Perform target detection on the target image according to the first feature map or the second feature map, and output a detection result.

2. The method according to claim 1, wherein the first feature map comprises multiple scales; in response to the camera device being identified as a dome camera device, inputting the target image into a first feature extraction network to perform feature extraction and downsampling on the target image using the first feature extraction network to obtain the first feature map, comprising: In response to the type identification of the camera device as a dome camera device, the target image is sequentially input into multiple feature extraction layers in a first feature extraction network and at least one downsampling layer located in the middle of the multiple feature extraction layers to obtain first feature maps of corresponding scales output by the multiple feature extraction layers in the first feature extraction network.

3. The method according to claim 2, wherein the first feature extraction network comprises a first upsampling layer and a first downsampling layer, and the plurality of feature extraction layers in the first feature extraction network comprises a first feature extraction layer, a second feature extraction layer, a third feature extraction layer, a fourth feature extraction layer, a fifth feature extraction layer, and a sixth feature extraction layer; Inputting the target image into a first feature extraction network to obtain a first feature map includes: Inputting the target image into a first feature extraction layer for feature extraction to obtain a first intermediate image; Inputting the first intermediate image into a second feature extraction layer for feature extraction to obtain a second intermediate image; Inputting the second intermediate image into a third feature extraction layer for feature extraction to obtain a first feature map of a first scale; Inputting the second intermediate image into the first upsampling layer for upsampling to obtain a third intermediate image; Combining the third intermediate image and the first intermediate image and inputting them into a fourth feature extraction layer for feature extraction to obtain a fourth intermediate image; Inputting the fourth intermediate image into a fifth feature extraction layer for feature extraction to obtain a first feature map of a second scale; Inputting the fourth intermediate image into the first downsampling layer for downsampling to obtain a fifth intermediate image; The fifth intermediate image and the second intermediate image are combined and input into a sixth feature extraction layer for feature extraction to obtain a first feature map of a third scale.

4. The method according to claim 1, wherein the second feature map comprises multiple scales; in response to the camera device being identified as a box camera device, inputting the target image into a second feature extraction network to perform feature extraction and upsampling on the target image using the second feature extraction network to obtain the second feature map, comprising: In response to the type identification of the camera device being a box-type device, the target image is sequentially input into multiple feature extraction layers in a second feature extraction network and at least one upsampling layer located in the middle of the multiple feature extraction layers to obtain second feature maps of corresponding scales output by the multiple feature extraction layers in the second feature extraction network.

5. The method according to claim 4, wherein the second feature extraction network comprises a second upsampling layer and a third upsampling layer, and the plurality of feature extraction layers in the second feature extraction network comprises a seventh feature extraction layer, an eighth feature extraction layer, a ninth feature extraction layer, a tenth feature extraction layer, an eleventh feature extraction layer, a twelfth feature extraction layer, and a thirteenth feature extraction layer; Inputting the target image into a second feature extraction network to obtain a second feature map includes: Inputting the target image into a seventh feature extraction layer for feature extraction to obtain a seventh intermediate image; inputting the seventh intermediate image into an eighth feature extraction layer for feature extraction to obtain an eighth intermediate image; inputting the eighth intermediate image into a ninth feature extraction layer for feature extraction to obtain a ninth intermediate image; Inputting the ninth intermediate image into a tenth feature extraction layer for feature extraction to obtain a second feature map at a fourth scale; Inputting the ninth intermediate image into a second upsampling layer for upsampling to obtain a tenth intermediate image; Combining the tenth intermediate image and the eighth intermediate image and inputting them into an eleventh feature extraction layer to obtain an eleventh intermediate image; Inputting the eleventh intermediate image into a twelfth feature extraction layer for feature extraction to obtain a second feature map at a fifth scale; Inputting the eleventh intermediate image into a third upsampling layer for upsampling to obtain a twelfth intermediate image; The twelfth intermediate image and the seventh intermediate image are combined and input into a thirteenth feature extraction layer for feature extraction to obtain a second feature map at a sixth scale.

6. The method according to claim 3, wherein performing target detection on the target image based on the first feature map or the second feature map and outputting a detection result comprises: Performing target detection on the target image according to the first feature map of the first scale, the first feature map of the second scale, and the first feature map of the third scale, and outputting a detection frame of the target object and a category identifier to which the target object belongs.

7. The method according to claim 5, wherein performing target detection on the target image based on the first feature map or the second feature map and outputting a detection result comprises: Performing target detection on the target image according to the second feature map at the fourth scale, the second feature map at the fifth scale, and the second feature map at the sixth scale, outputting a detection frame of the target object and a category identifier to which the target object belongs.

8. A target detection device comprising: An acquisition module, configured to acquire a target image and a type identifier of the camera device through a camera device; a first feature module, configured to input the target image into a first feature extraction network in response to the type identification of the camera device being a dome camera device, so as to perform feature extraction and downsampling on the target image using the first feature extraction network to obtain a first feature map; a second feature module, configured to, in response to the camera device being identified as a box camera device, input the target image into a second feature extraction network, so as to perform feature extraction and upsampling on the target image using the second feature extraction network to obtain a second feature map; A processing module is used to perform target detection on the target image according to the first feature map or the second feature map, and output a detection result.

9. The apparatus according to claim 8, wherein the first feature module is specifically configured to: In response to the type identification of the camera device as a dome camera device, the target image is sequentially input into multiple feature extraction layers in a first feature extraction network and at least one downsampling layer located in the middle of the multiple feature extraction layers to obtain first feature maps of corresponding scales output by the multiple feature extraction layers in the first feature extraction network.

10. The apparatus according to claim 9, wherein the first feature extraction network comprises a first upsampling layer and a first downsampling layer, and the plurality of feature extraction layers in the first feature extraction network comprises a first feature extraction layer, a second feature extraction layer, a third feature extraction layer, a fourth feature extraction layer, a fifth feature extraction layer, and a sixth feature extraction layer; The first feature module is specifically used for: Inputting the target image into a first feature extraction layer for feature extraction to obtain a first intermediate image; Inputting the first intermediate image into a second feature extraction layer for feature extraction to obtain a second intermediate image; Inputting the second intermediate image into a third feature extraction layer for feature extraction to obtain a first feature map of a first scale; Inputting the second intermediate image into the first upsampling layer for upsampling to obtain a third intermediate image; Combining the third intermediate image and the first intermediate image and inputting them into a fourth feature extraction layer for feature extraction to obtain a fourth intermediate image; Inputting the fourth intermediate image into a fifth feature extraction layer for feature extraction to obtain a first feature map of a second scale; Inputting the fourth intermediate image into the first downsampling layer for downsampling to obtain a fifth intermediate image; The fifth intermediate image and the second intermediate image are combined and input into a sixth feature extraction layer for feature extraction to obtain a first feature map of a third scale.

11. The apparatus according to claim 8, wherein the second feature module is specifically configured to: In response to the type identification of the camera device being a box-type device, the target image is sequentially input into multiple feature extraction layers in a second feature extraction network and at least one upsampling layer located in the middle of the multiple feature extraction layers to obtain second feature maps of corresponding scales output by the multiple feature extraction layers in the second feature extraction network.

12. The apparatus according to claim 11, wherein the second feature extraction network comprises a second upsampling layer and a third upsampling layer, and the plurality of feature extraction layers in the second feature extraction network comprises a seventh feature extraction layer, an eighth feature extraction layer, a ninth feature extraction layer, a tenth feature extraction layer, an eleventh feature extraction layer, a twelfth feature extraction layer, and a thirteenth feature extraction layer; The second feature module is specifically used for: Inputting the target image into a seventh feature extraction layer for feature extraction to obtain a seventh intermediate image; inputting the seventh intermediate image into an eighth feature extraction layer for feature extraction to obtain an eighth intermediate image; inputting the eighth intermediate image into a ninth feature extraction layer for feature extraction to obtain a ninth intermediate image; Inputting the ninth intermediate image into a tenth feature extraction layer for feature extraction to obtain a second feature map at a fourth scale; Inputting the ninth intermediate image into a second upsampling layer for upsampling to obtain a tenth intermediate image; Combining the tenth intermediate image and the eighth intermediate image and inputting them into an eleventh feature extraction layer to obtain an eleventh intermediate image; Inputting the eleventh intermediate image into a twelfth feature extraction layer for feature extraction to obtain a second feature map at a fifth scale; Inputting the eleventh intermediate image into a third upsampling layer for upsampling to obtain a twelfth intermediate image; The twelfth intermediate image and the seventh intermediate image are combined and input into a thirteenth feature extraction layer for feature extraction to obtain a second feature map at a sixth scale.

13. The device according to claim 10, wherein the processing module is specifically configured to: Performing target detection on the target image according to the first feature map of the first scale, the first feature map of the second scale, and the first feature map of the third scale, and outputting a detection frame of the target object and a category identifier to which the target object belongs.

14. The device according to claim 12, wherein the processing module is specifically configured to: Performing target detection on the target image according to the second feature map at the fourth scale, the second feature map at the fifth scale, and the second feature map at the sixth scale, outputting a detection frame of the target object and a category identifier to which the target object belongs.

15. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.

16. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 7.

17. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Livestock animal fence entry detection method based on gun-ball linkage and BIM

    CN111612645A

  • Network, system and method for multi-view 3D mesh generation via deformation

    US10885707B1