Object position detection method, device, electronic device and storage medium

By using pre-trained classification models to extract heat maps and calculate the location of the center point, and combined with image segmentation large model, the problem of inaccurate quality of object position detection in the prior art is solved, and more efficient and accurate detection results are achieved.

CN119251483BActive Publication Date: 2025-04-01NANJING YIMU INTELLIGENT TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411794306.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-04-01
Estimated Expiration
2044-12-09

AI Technical Summary

Technical Problem

The existing object position detection methods rely on manual labeling quality and are prone to inaccurate quality and require a lot of manual participation, resulting in inefficiency.

Method used

By using the pre-trained classification model to extract the heat map of the target object in the detected image, calculate the central point position of the heat map, and input the image, response area and central point position to the preset image segmentation model to obtain the position detection result of the target object.

Benefits of technology

It reduces manual dependence, improves the efficiency of the data labeling process, and improves the accuracy of the detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119251483B_ABST
    Figure CN119251483B_ABST
Patent Text Reader

Abstract

The present invention discloses an object position detection method, device, electronic device and storage medium. The method comprises extracting a heat map of at least one target object in an image to be detected using a pre-trained classification model, wherein the heat map represents the response area of ​​at least one target object to the classification result; calculating the center point position of the response area; inputting the image to be detected, the response area and the center point position into a preset image segmentation model to obtain the position detection result of at least one target object in the image to be detected. The technical solution of the present invention reduces manual dependence, improves the efficiency of the data annotation process, and improves the accuracy of the detection results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision technology, and in particular to an object position detection method, device, electronic equipment and storage medium. Background Art

[0002] Target positioning or target detection, that is, target position detection, is the basic research of vision research. At present, target detection is mainly carried out through deep learning. However, the premise of deep learning model application is that a large amount of manually annotated data is needed to train the model. The annotation process of these data requires the collection of a large amount of data and consumes a lot of manpower.

[0003] At present, how to improve the efficiency of manual labeling is a hot issue in the field of visual AI (Artificial Intelligence). In the actual data labeling process, the most labor-intensive part is the accurate labeling of the target position, which is segmentation labeling in the visual field. At present, there are several ways to improve the efficiency of manual labeling. The first method is semi-automatic learning, which is to manually label a part of the data to train the model, and then the model infers the remaining data. The correct inference is directly used as the label, and the wrong inference is manually modified. This method still requires manual labeling of part of the data, and the quantity and quality of manual labeling directly affect the training effect of the initial model, which still requires a lot of manpower; the second method is the segmentation labeling method based on manual prompts, represented by SAM (Segment Anything Model, visual large model). This method requires each target to be manually given a point or box prompt. In actual use, an average of more than two prompts are required for one target to obtain a better segmentation prediction result, which still requires a certain amount of manpower. Summary of the invention

[0004] The present invention provides an object position detection method, device, electronic device and storage medium to solve the problem that the existing object position detection method relies on manual labeling and the quality is easily inaccurate, reduces manual dependence, improves the efficiency of the data labeling process, and improves the accuracy of the detection results.

[0005] According to one aspect of the present invention, there is provided a method for detecting an object position, the method comprising:

[0006] Extracting a heat map of at least one target object in the image to be detected using a pre-trained classification model, wherein the heat map represents a response area of ​​the at least one target object to a classification result;

[0007] Calculate the center point position of the response area;

[0008] The image to be detected, the response area and the center point position are input into a preset image segmentation model to obtain a position detection result of the at least one target object in the image to be detected.

[0009] According to another aspect of the present invention, there is provided an object position detection device, the device comprising:

[0010] A heat map extraction module, used to extract a heat map of at least one target object in the image to be detected using a pre-trained classification model, wherein the heat map represents a response area of ​​the at least one target object to the classification result;

[0011] A center point position calculation module, used to calculate the center point position of the response area;

[0012] The position detection result acquisition module is used to input the image to be detected, the response area and the center point position into a preset image segmentation model to obtain the position detection result of the at least one target object in the image to be detected.

[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0014] at least one processor; and

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

[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the object position detection method described in any embodiment of the present invention.

[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the object position detection method described in any embodiment of the present invention when executed.

[0018] The technical solution of the embodiment of the present invention uses a pre-trained classification model to extract a heat map of at least one target object in the image to be detected, where the heat map represents the response area of ​​at least one target object to the classification result; calculates the center point position of the response area; inputs the image to be detected, the response area and the center point position into a preset image segmentation model to obtain a position detection result of at least one target object in the image to be detected, and adopts a technical means of using the classification model to calculate the heat map as the approximate position of the target object in the image, and further inputting the approximate position of the target object into the image segmentation model to obtain the precise position of the target object, thereby solving the problem that the existing object position detection method relies on manual labeling and the quality is easily inaccurate, reduces manual dependence, improves the efficiency of the data labeling process, and improves the accuracy of the detection results.

[0019] 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 invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0021] Figure 1a A flowchart of an object position detection method provided in Embodiment 1 of the present invention;

[0022] Figure 1b An example diagram of a heat map grad cam obtained by a classification model is provided for an embodiment of the present invention;

[0023] Figure 1c An example diagram of obtaining a heat map mask through a classification model is provided for an embodiment of the present invention;

[0024] Figure 1d An example diagram of a position detection result of a target object obtained by using an image segmentation model is provided for an embodiment of the present invention;

[0025] Figure 2 A schematic diagram of the structure of an object position detection device provided in Embodiment 2 of the present invention;

[0026] Figure 3 It is a schematic diagram of the structure of an electronic device for implementing the object position detection method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0028] It should be noted that the terms "target", "initial", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0029] Embodiment 1

[0030] Figure 1a This is a flow chart of an object position detection method provided in the first embodiment of the present invention. This embodiment is applicable to the case of detecting the position of an object in an image. The method can be executed by an object position detection device. The object position detection device can be implemented in the form of hardware and / or software. The object position detection device can be configured in a server. Figure 1a As shown, the method includes:

[0031] S110. Extract a heat map of at least one target object in the image to be detected using a pre-trained classification model, where the heat map represents a response area of ​​the at least one target object to the classification result.

[0032] The pre-trained classification model may be a model for classifying and detecting objects in an image. The classification detection results of the pre-trained classification model for objects in an image may refer to, for example, birds, cars, pedestrians, etc., or even more detailed categories. At least one target object in the image to be detected may refer to an object in the image, and an image to be detected may contain one or more target objects. A heat map may refer to a response area to a classification result in the image to be detected, such as Figure 1b The heat map shown represents the response area of ​​the image to the bird detection result.

[0033] In this embodiment, a pre-trained classification model can be used to perform object classification detection on the image to be detected, and a heat map corresponding to the classification result can be obtained.

[0034] In an optional embodiment, the pre-trained classification model can be pre-trained in the following manner: obtain a sample image set, each sample image in the sample image set includes at least one object, and at least one object has a corresponding classification label; input the current sample image into the initial classification model to output a target sample image, and the target sample image carries the classification result of at least one object; construct a loss function based on the gap between the classification result of at least one object and the classification label of at least one object of the current sample image, and optimize the initial classification model based on the loss function; after each sample image in the sample image set has been processed by the initial classification model, a pre-trained classification model is obtained.

[0035] In this embodiment, the sample images used to train the classification model can be pre-labeled with classification labels. This embodiment only requires labeling the sample images with classification labels, which is simpler than labeling the segmentation mask in the prior art, saves manpower, and greatly improves the efficiency of the data labeling process.

[0036] In this embodiment, each sample image in the sample image set can be input into the initial classification model to train the initial classification model. Specifically, after the initial classification model processes the current sample image, it outputs a target sample image containing a predicted classification result, and further constructs a loss function based on the gap between the predicted classification result of the target sample image and the pre-annotated classification label of the current sample image, thereby optimizing the initial classification model based on the loss function until all sample images in the sample image set are processed, and a pre-trained classification model can be obtained. Exemplarily, the predicted classification result of the target sample image may include the category to which the object belongs and the area box where the object is located.

[0037] It should be noted that when the present embodiment annotates classification labels for sample images, if a sample image contains multiple or multiple target objects, a classification label can be annotated for each target in the sample image, that is, the sample image can be annotated with multiple classification labels. In this case, the classification model trained is a multi-classification model.

[0038] Based on the above-mentioned pre-trained classification model, extracting a heat map of at least one target object in the image to be detected using the pre-trained classification model can include: inputting the image to be detected into the pre-trained classification model to obtain a classification result of at least one target object in the image to be detected, and displaying the classification result of the target object in the form of a heat map.

[0039] For example, the image to be detected is input into the pre-trained classification model, and the thermal map grad cam corresponding to the image to be detected can be obtained, such as Figure 1b shown.

[0040] S120, calculating the center point position of the response area.

[0041] In an optional implementation, calculating the center point position of the response area may include: obtaining a current response area; obtaining a target response area from the current response area, wherein the pixel value of each pixel in the target response area is greater than a preset pixel threshold; and calculating the center point position of the target response area.

[0042] The current response area may refer to the currently processed thermal map grad cam. The target response area may refer to the thermal map mask corresponding to the current response area. The preset pixel threshold may refer to a pixel boundary value in the process of obtaining the target response area based on the current response area. The target response area may be the approximate position of the target object in the image to be detected.

[0043] In this embodiment, the pre-trained classification model can obtain the thermal map grad cam of the image to be detected (equivalent to the current response area) after processing the image to be detected, and further use the preset pixel threshold to perform pixel screening on the thermal map gradcam of the image to be detected to obtain the thermal map mask of the image to be detected (such as Figure 1c As shown, it is equivalent to the target response area). The specific screening method is to use the pixels whose pixel values ​​in the thermal map grad cam of the image to be detected are greater than the preset pixel threshold as the pixels in the thermal map mask of the image to be detected. The center point position of the thermal map mask of the image to be detected is further calculated.

[0044] S130, inputting the image to be detected, the response area and the center point position into a preset image segmentation model to obtain a position detection result of at least one target object in the image to be detected.

[0045] The preset image segmentation model may refer to a model that obtains image segmentation regions by inputting prompts and performing image segmentation according to the prompts. Exemplarily, the preset image segmentation model of this embodiment may adopt an open source SAM visual model.

[0046] Based on the optional implementation of S120 above, the image to be detected, the response area and the center point position are input into a preset image segmentation model to obtain a position detection result of at least one target object in the image to be detected, which may include: inputting the image to be detected, the target response area and the center point position of the target response area into a preset image segmentation model to obtain a position detection result of at least one target object in the image to be detected.

[0047] In this embodiment, the image to be detected, the heat map mask of the image to be detected, and the center point position of the heat map mask are specifically input as prompt information into the preset image segmentation model, so that the preset image segmentation model outputs the position detection result of the target object in the image to be detected through the technical means of image segmentation. Among them, the position detection result of the target object in the image to be detected can be, for example, Figure 1d As shown, the fine mask of the target object can be selected as the position detection result.

[0048] Furthermore, the image to be detected, the target response area and the center point position of the target response area are input into a preset image segmentation model to obtain a position detection result of at least one target object in the image to be detected, which may include: when the image to be detected includes one target object, the image to be detected, the target response area and the center point position of the target response area are input into the preset image segmentation model to obtain the position detection result of the target object in the image to be detected; when the image to be detected includes multiple target objects, the image to be detected, the currently processed target response area and the center point position of the currently processed target response area are input into the preset image segmentation model to obtain the position detection result of the currently processed target object in the image to be detected.

[0049] In this embodiment, the target object in the image to be detected can be one or more. When the target object is one, the image to be detected, the thermal map mask of the image to be detected, and the center point position of the thermal map mask can be directly input into the preset image segmentation model to obtain the position detection result of the target object. When there are multiple target objects, each target object of the image to be detected can have a corresponding thermal map mask, so each thermal map mask and the center point position of the corresponding thermal map mask can be respectively input into the preset image segmentation model for position detection.

[0050] The technical solution of this embodiment uses a pre-trained classification model to extract a heat map for at least one target object in the image to be detected, where the heat map represents the response area of ​​at least one target object to the classification result; calculates the center point position of the response area; inputs the image to be detected, the response area and the center point position into a preset image segmentation model to obtain a position detection result of at least one target object in the image to be detected. The technical solution uses a classification model to calculate a heat map as the approximate position of the target object in the image, and further uses the approximate position of the target object as a subject to input the image segmentation model to obtain the precise position of the target object. This solves the problem that the existing object position detection method relies on manual labeling and is prone to inaccuracy in quality, reduces manual dependence, improves the efficiency of the data labeling process, and improves the accuracy of the detection results.

[0051] Embodiment 2

[0052] Figure 2 FIG. 2 is a schematic diagram of a structure of an object position detection device provided in Embodiment 2 of the present invention. Figure 2 As shown, the device includes: a heat map extraction module 210, a center point position calculation module 220 and a position detection result acquisition module 230. Among them:

[0053] A heat map extraction module 210 is used to extract a heat map of at least one target object in the image to be detected using a pre-trained classification model, wherein the heat map represents a response area of ​​the at least one target object to a classification result;

[0054] A center point position calculation module 220, used to calculate the center point position of the response area;

[0055] The position detection result acquisition module 230 is used to input the image to be detected, the response area and the center point position into a preset image segmentation model to obtain the position detection result of the at least one target object in the image to be detected.

[0056] The technical solution of the embodiment of the present invention uses a pre-trained classification model to extract a heat map of at least one target object in the image to be detected, where the heat map represents the response area of ​​at least one target object to the classification result; calculates the center point position of the response area; inputs the image to be detected, the response area and the center point position into a preset image segmentation model to obtain a position detection result of at least one target object in the image to be detected, and adopts a technical means of using the classification model to calculate the heat map as the approximate position of the target object in the image, and further inputting the approximate position of the target object into the image segmentation model to obtain the precise position of the target object, thereby solving the problem that the existing object position detection method relies on manual labeling and the quality is easily inaccurate, reduces manual dependence, improves the efficiency of the data labeling process, and improves the accuracy of the detection results.

[0057] Optionally, the object position detection device further includes a classification model pre-training module, which is used to:

[0058] Acquire a sample image set, wherein each sample image in the sample image set includes at least one object, and the at least one object has a corresponding classification label;

[0059] Inputting the current sample image into the initial classification model to output a target sample image, wherein the target sample image carries the classification result of the at least one object;

[0060] constructing a loss function according to the difference between the classification result of the at least one object and the classification label of the at least one object of the current sample image, and optimizing the initial classification model according to the loss function;

[0061] After each sample image in the sample image set is processed by the initial classification model, the pre-trained classification model is obtained.

[0062] Optionally, the heat map extraction module 210 may be specifically used for:

[0063] The image to be detected is input into the pre-trained classification model to obtain a classification result of at least one target object in the image to be detected, and the classification result of the target object is displayed in the form of a heat map.

[0064] Optionally, the center point position calculation module 220 may be specifically used for:

[0065] Get the current response area;

[0066] Acquire a target response area from the current response area, wherein a pixel value of each pixel in the target response area is greater than a preset pixel threshold;

[0067] Calculate the center point position of the target response area.

[0068] Optionally, the position detection result acquisition module 230 may include:

[0069] The position detection result acquisition unit is used to input the image to be detected, the target response area and the center point position of the target response area into a preset image segmentation model to obtain the position detection result of at least one target object in the image to be detected.

[0070] Optionally, the position detection result acquisition unit may be specifically used for:

[0071] In the case where the image to be detected includes a target object, the image to be detected, the target response area and the center point position of the target response area are input into a preset image segmentation model to obtain a position detection result of the target object in the image to be detected;

[0072] In the case that the image to be detected includes multiple target objects, the image to be detected, the currently processed target response area and the center point position of the currently processed target response area are input into a preset image segmentation model to obtain the position detection result of the currently processed target object in the image to be detected.

[0073] The object position detection device provided in the embodiment of the present invention can execute the object position detection method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0074] Embodiment 3

[0075] Figure 3 A schematic diagram of an electronic device 300 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers or various forms of mobile devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0076] like Figure 3 As shown, the electronic device 300 includes at least one processor 301, and a memory connected to the at least one processor 301 in communication, such as a read-only memory (ROM) 302, a random access memory (RAM) 303, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 301 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 302 or the computer program loaded from the storage unit 308 to the random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 can also be stored. The processor 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0077] A number of components in the electronic device 300 are connected to the I / O interface 305, including: an input unit 306, such as a keyboard, a mouse, etc.; an output unit 307, such as various types of displays, speakers, etc.; a storage unit 308, such as a disk, an optical disk, etc.; and a communication unit 309, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 309 allows the electronic device 300 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0078] The processor 301 may be a variety of general and / or dedicated processing components with processing and computing capabilities. Some examples of the processor 301 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 301 performs the various methods and processes described above, such as an object position detection method.

[0079] In some embodiments, the object position detection method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 308. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 300 via the ROM 302 and / or the communication unit 309. When the computer program is loaded into the RAM 303 and executed by the processor 301, one or more steps of the object position detection method described above may be performed. Alternatively, in other embodiments, the processor 301 may be configured to perform the object position detection method in any other appropriate manner (e.g., by means of firmware).

[0080] Various implementations of the systems and techniques described above 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), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including 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.

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

[0082] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may 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.

[0083] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device 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 a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0084] The systems and techniques described herein may be implemented in a computing system that includes backend 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 frontend components (e.g., a user computer with 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 backend components, middleware components, or frontend components. The components of the system may 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), a blockchain network, and the Internet.

[0085] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0086] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0087] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for detecting an object position, characterized in that: include: Extracting a heat map of at least one target object in the image to be detected using a pre-trained classification model, wherein the heat map represents a response area of ​​the at least one target object to a classification result; Acquire a current response area, acquire a target response area from the current response area, the pixel value of each pixel in the target response area is greater than a preset pixel threshold, and calculate the center point position of the target response area; In the case where the image to be detected includes one target object, the image to be detected, the target response area and the center point position of the target response area are input into a preset image segmentation model to obtain a position detection result of the target object in the image to be detected; in the case where the image to be detected includes multiple target objects, the image to be detected, the currently processed target response area and the center point position of the currently processed target response area are input into a preset image segmentation model to obtain a position detection result of the currently processed target object in the image to be detected.

2. The method according to claim 1, characterized in that The pre-trained classification model is pre-trained in the following way: Acquire a sample image set, wherein each sample image in the sample image set includes at least one object, and the at least one object has a corresponding classification label; Inputting the current sample image into the initial classification model to output a target sample image, wherein the target sample image carries the classification result of the at least one object; constructing a loss function according to the difference between the classification result of the at least one object and the classification label of the at least one object of the current sample image, and optimizing the initial classification model according to the loss function; After each sample image in the sample image set is processed by the initial classification model, the pre-trained classification model is obtained.

3. The method according to claim 1, characterized in that Extracting a heat map of at least one target object in the image to be detected using a pre-trained classification model includes: The image to be detected is input into the pre-trained classification model to obtain a classification result of at least one target object in the image to be detected, and the classification result of the target object is displayed in the form of a heat map.

4. An object position detection device, characterized in that: include: A heat map extraction module, used to extract a heat map of at least one target object in the image to be detected using a pre-trained classification model, wherein the heat map represents a response area of ​​the at least one target object to the classification result; A center point position calculation module is used to obtain a current response area, obtain a target response area from the current response area, and calculate the center point position of the target response area when the pixel value of each pixel in the target response area is greater than a preset pixel threshold; The position detection result acquisition module is used to input the image to be detected, the target response area and the center point position of the target response area into a preset image segmentation model to obtain the position detection result of the target object in the image to be detected when the image to be detected includes one target object; and to input the image to be detected, the currently processed target response area and the center point position of the currently processed target response area into a preset image segmentation model to obtain the position detection result of the currently processed target object in the image to be detected when the image to be detected includes multiple target objects.

5. The device according to claim 4, characterized in that Also included is a classification model pre-training module for: Acquire a sample image set, wherein each sample image in the sample image set includes at least one object, and the at least one object has a corresponding classification label; Inputting the current sample image into the initial classification model to output a target sample image, wherein the target sample image carries the classification result of the at least one object; constructing a loss function according to the difference between the classification result of the at least one object and the classification label of the at least one object of the current sample image, and optimizing the initial classification model according to the loss function; After each sample image in the sample image set is processed by the initial classification model, the pre-trained classification model is obtained.

6. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the object position detection method according to any one of claims 1 to 3.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the object position detection method according to any one of claims 1 to 3 when executed.

Citation Information

Patent Citations

  • Visual perception method, system and device for accurately identifying multiple targets in street battle

    CN117994558A