Target detection method and device, electronic equipment and computer program product
By using training images under multiple lighting conditions and a style transfer model in the object detection model, the problem of the model's sensitivity to lighting conditions is solved, and high-precision object detection under different lighting conditions is achieved.
Patent Information
- Application Number
- CN202510771159.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2025-11-07
AI Technical Summary
Existing deep learning-based target detection models have low accuracy in detecting targets in images where lighting conditions are not ideal.
By training the object detection model, a training dataset is constructed using training images with illumination levels greater than or equal to a preset level and training images with illumination levels less than a preset level. This dataset is then combined with a style transfer model to generate low-light images, thereby improving the model's detection capabilities under different lighting conditions.
It achieves accurate target detection under different lighting conditions, improving the detection accuracy of targets in images.
Smart Images

Figure CN120912937A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of detection technology, and in particular to a target detection method, apparatus, electronic device, and computer program product. Background Technology
[0002] With the rapid development of computer vision technology, deep learning-based object detection algorithms are better able to meet the challenges of complex tasks.
[0003] In an exemplary technique, a model is trained using images, enabling the trained model to detect targets based on the images to be detected.
[0004] However, the acquisition of images used for training is related to lighting, making the model quite sensitive to the lighting conditions of the images to be detected. As a result, the model has low detection accuracy for targets in images where the lighting conditions are not met, that is, the detection accuracy of targets in the images is low. Summary of the Invention
[0005] Based on the above-mentioned technological status, this application provides a target detection method, apparatus, electronic device, and computer program product to solve the problem of low detection accuracy of targets in images.
[0006] To achieve the above-mentioned technical objectives, this application proposes the following technical solution:
[0007] Firstly, this application provides a target detection method, including:
[0008] Acquire the target image to be detected;
[0009] The target image is input into the target detection model to obtain the location of the target object in the target image and the category of the target object, as output by the target detection model.
[0010] The target detection model is trained based on multiple first training samples and multiple second training samples. The first training samples include training images with illuminance greater than or equal to a preset illuminance, and the second training samples include training images with illuminance less than the preset illuminance.
[0011] In some implementations, prior to acquiring the target image to be detected, the following steps are also included:
[0012] Acquire multiple first training samples and multiple second training samples. The first training samples include training images with illuminance greater than or equal to a preset illuminance, and the second training samples include training images with illuminance less than a preset illuminance.
[0013] The preset model is trained based on each of the first training samples and each of the second training samples to obtain the target detection model.
[0014] In some embodiments, the training of the preset model according to each of the first training samples and each of the second training samples comprises:
[0015] training the preset model according to each of the first training samples to obtain an intermediate model;
[0016] training the intermediate model according to each of the second training samples to obtain the target detection model.
[0017] In some embodiments, the training of the preset model according to each of the first training samples and each of the second training samples comprises:
[0018] constructing a training data set according to each of the first training samples and each of the second training samples;
[0019] training the preset model based on the training samples in the training data set to obtain a target detection model.
[0020] In some embodiments, the obtaining of the plurality of second training samples comprises:
[0021] inputting a first training image in the first training sample into a style transfer model to obtain a second training image output by the style transfer model, the collection illumination of the first training image being greater than or equal to a preset illumination, and the collection illumination of the second training image being less than the preset illumination;
[0022] constructing a second training sample according to the label of the first training sample and the second training image.
[0023] In some embodiments, before the inputting of the first training image in the first training sample into the style transfer model, the method further comprises:
[0024] obtaining a plurality of groups of third training samples, each group of the third training samples comprising two third training images of different illuminations collected at the same position, the collection illumination of one of the third training images being greater than or equal to a preset illumination, and the collection illumination of the other of the third training images being less than the preset illumination;
[0025] training a preset model according to each group of the third training samples to obtain a style transfer model.
[0026] In a second aspect, the present application provides a target detection device, comprising:
[0027] an acquisition module configured to acquire a first transportation task to be executed, a transportation time period of the first transportation task, and a risk level, and acquire driving information of each first driver to be matched.
[0028] determining, according to the driving information, a target driver who is idle in the transportation time period from among the first drivers;
[0029] predicting, according to a current mental state score included in the driving information of the target driver, a target mental state score of the target driver in the transportation time period, in a case where the driving score included in the driving information of the target driver is greater than or equal to the score corresponding to the risk level;
[0030] sending, to a terminal device associated with the target driver, a task order corresponding to the first transportation task, in a case where the target mental state score is greater than or equal to a preset threshold.
[0031] In a third aspect, the present application provides an electronic device, comprising a memory and a processor, wherein,
[0032] The memory is connected with the processor, and is configured to store a program.
[0033] The processor is configured to realize the target detection method according to the first aspect or any implementation manner of the first aspect by running the program in the memory.
[0034] In a fourth aspect, the present application provides a computer program product, wherein the computer program is executed by a processor to realize the target detection method according to the first aspect or any implementation manner of the first aspect.
[0035] In a fifth aspect, the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to realize the target detection method according to the first aspect or any implementation manner of the first aspect.
[0036] The target detection method, device, electronic device and computer program product provided by the embodiments of the present application obtain a target image to be detected, input the target image into a target detection model, and obtain the position of a target object in the target image and the category of the target object output by the target detection model. In the present application, the detection model is trained based on training images collected under illumination greater than or equal to a preset illumination and training images collected under illumination less than the preset illumination, so that the target detection model can accurately detect target objects in images collected under high illumination and accurately detect target objects in images collected under low illumination, that is, target objects in images collected under all lighting conditions can be accurately detected by the model, and the detection accuracy of the target in the image is improved. BRIEF DESCRIPTION OF DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced. Obviously, the accompanying drawings in the following description only need to be drawn for part of the embodiments of the present application, and for the ordinary skilled in the art, other drawings can be obtained without creative labor on the basis of the provided drawings.
[0038] Figure 1 A scene schematic diagram of a target detection method provided by an embodiment of the present application
[0039] Figure 2 A flow of a target detection method provided by an embodiment of the present application Figure 1 ;
[0040] Figure 3 A flow of a target detection method provided by an embodiment of the present application Figure 2 ;
[0041] Figure 4 A flow of a target detection method provided by an embodiment of the present application Figure 3 ;
[0042] Figure 5 A flow of a target detection method provided by an embodiment of the present application Figure 4 ;
[0043] Figure 6 A schematic diagram of high-illumination converted into low-illumination provided by an embodiment of the present application
[0044] Figure 7 A flow of a target detection method provided by an embodiment of the present application Figure 5 ;
[0045] Figure 8 A module schematic diagram of a target detection device provided by an embodiment of the present application
[0046] Figure 9 A structure schematic diagram of an electronic device provided by an embodiment of the present application DETAILED DESCRIPTION
[0047] The technical solutions in the embodiments of the present application will be described clearly and completely below with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by the ordinary skilled in the art without creative labor are within the scope of protection of the present application.
[0048] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards, and provide corresponding operation portal for user to choose authorization or refusal.
[0049] With the rapid development of computer vision technology, target detection algorithms based on deep learning can better cope with the challenges of complex tasks.
[0050] In an example technology, an image pair model is trained, so that the trained model detects a target based on a to-be-detected image pair.
[0051] However, the collection of images used for training is related to illumination, so that the model is more sensitive to the illumination conditions of the to-be-detected image, thereby reducing the detection accuracy of the model for the target in the image whose illumination condition does not meet the condition, that is, the detection accuracy of the target in the image.
[0052] Therefore, the embodiments of the present application aim to provide a target detection method, device, electronic equipment and computer program product. Since the target detection model is trained based on training images with collected illumination greater than or equal to a preset illumination and training images with collected illumination less than the preset illumination, the detection model trained makes the target detection model not only accurately detect target objects in images collected under high illumination, but also accurately detect target objects in images collected under low illumination, that is, target objects in images collected under all illumination conditions can be accurately detected by the model, thereby improving the detection accuracy of the target in the image.
[0053] Among them, the target detection method, device, electronic equipment and computer program product provided by the embodiments of the present application can be applied to any scene of target detection, for example, tracking scene of people or objects, identification scene of people or objects.
[0054] Reference Figure 1 , Figure 1This is a schematic diagram illustrating the target detection method of this application. The target detection device 100 acquires an image of the target to be detected, which can be input from an external device or by a user. The target detection device 100 includes a target detection model 110, which is trained by acquiring training images with illumination levels greater than or equal to a preset illumination level and training images with illumination levels less than a preset illumination level. Therefore, the target detection model 110 can identify objects within images acquired under all illumination conditions. The target detection device 100 inputs the target image into the target detection model 110, and the target detection model 110 outputs the position of the target object in the target image and the category of the target object, thus enabling the target detection device 100 to output the position and category of the target object.
[0055] Exemplary method
[0056] Figure 2 A flowchart of a target detection method provided in this application embodiment Figure 1 .like Figure 2 As shown, the target detection method provided in this embodiment includes:
[0057] Step S201: Obtain the target image to be detected.
[0058] In this embodiment, the executing entity is a target detection device, which can be a computer, server, or other similar device. For ease of description, the term "device" will be used to refer to the target detection device below.
[0059] The device acquires an image of the target to be detected. The target image may be an image containing a water target, such as an object or a person. The object may be an unmanned surface vessel, a boat, or the like.
[0060] Step S202: Input the target image into the target detection model to obtain the position of the target object in the target image and the category of the target object output by the target detection model. The target detection model is trained based on multiple first training samples and multiple second training samples. The first training samples include training images with illuminance greater than or equal to a preset illuminance, and the second training samples include training images with illuminance less than the preset illuminance.
[0061] The device includes a target detection model, which is trained based on multiple first training samples and multiple second training samples. The first training samples include training images with illuminance greater than or equal to a preset illuminance, and the second training samples include training images with illuminance less than a preset illuminance. Illuminance refers to the luminous flux received per unit area of an object's surface, representing the degree of illumination; the acquired illuminance is the illumination used to acquire the image.
[0062] The preset model is trained by the first training sample and the second training sample to obtain a target detection model, so that the target detection model can detect targets in images collected under high illumination (high illumination refers to illumination greater than or equal to a preset illumination) and low illumination (low illumination refers to illumination less than the preset illumination), that is, the target detection model can accurately detect targets in images collected under all illumination conditions.
[0063] After obtaining the target image, the device inputs the target image into the target detection model, and the target detection model performs target detection on the target image to obtain the position of the target object in the target image and the category of the target object. For example, the position of the target object in the target image is a detection box of the target object in the target image, and the category of the target object is set in the detection box, that is, the device can output an image containing the detection box and the category of the target object.
[0064] In this embodiment, the target image to be detected is obtained, the target image is input into the target detection model, and the position of the target object in the target image and the category of the target object output by the target detection model are obtained. In this embodiment, since the target detection model is trained based on training images collected under illumination greater than or equal to a preset illumination and training images collected under illumination less than the preset illumination, the detection model obtained by training enables the target detection model to accurately detect target objects in images collected under high illumination and accurately detect target objects in images collected under low illumination, that is, target objects in images collected under all illumination conditions can be accurately detected by the model, and the detection accuracy of targets in images is improved.
[0065] Figure 3 A target detection method provided in this embodiment Figure 2 , based on Figure 4 The embodiment shown in FIG. 1 further includes the following steps before step S201:
[0066] In step S301, a plurality of first training samples and a plurality of second training samples are obtained, the first training sample includes a training image collected under illumination greater than or equal to a preset illumination, and the second training sample includes a training image collected under illumination less than the preset illumination.
[0067] In this embodiment, the device can be used to train a model. For example, the device obtains a plurality of first training samples and a plurality of second training samples, the first training sample contains a first training image collected under illumination greater than or equal to a preset illumination, and the second training sample contains a second training image collected under illumination less than the preset illumination.
[0068] The first training image is an image collected under high light conditions. The device can obtain the first training image and associated image information from a database. The image information includes the light of the collected image. The first training sample can be obtained by labeling the first training image according to the light of the collected image in the image information. The labeling content can be light or illumination.
[0069] The second training image is an image collected under low light conditions. The device can obtain the second training image and associated image information from a database. The image information includes the light of the collected image. The second training sample can be obtained by labeling the second training image according to the light of the collected image in the image information. The labeling content can be light or illumination.
[0070] In step S302, the preset model is trained according to each first training sample and each second training sample to obtain a target detection model.
[0071] A plurality of first training samples and a plurality of second training samples are obtained by the above method. The device trains the preset model according to each first training sample and each second training sample to obtain a target detection model. For example, a training data set is constructed according to each first training sample and each second training sample. The training data set contains both the first training sample and the second training sample. The preset model is trained according to the training samples in the training data set to obtain the target detection model.
[0072] After obtaining the target detection model, the target detection model can be deployed in the device. For example, the format of the target detection model is converted, such as converting the format of the target detection model to TensorRT format to improve the inference speed and efficiency of the target detection model. The converted target detection model is deployed to an edge computing platform. The edge computing platform can include 512 computing units and 64 acceleration modules, with a current capacity of 32G. The edge computing platform is the device. According to tests, the processing speed of the device reaches 20 frames per second under an input resolution of 1920x1080 pixels. Comparing the inference results of the high-illumination image training model (existing model) and the low-illumination and high-illumination image training target detection model, it can be found that under the same video stream, the target detection model can identify more targets than the existing model. For example, for water target detection images, the number of image frames detected by the low-illumination model (target detection model) is more than that detected by the high-illumination model. In addition, for intelligent life-saving images, the number of image frames detected by the low-illumination model is more than that detected by the high-illumination model.
[0073] In the embodiment, the device obtains a plurality of first training samples and a plurality of second training samples, and trains a preset model by using each first training sample and each second training sample, so as to obtain a target detection model capable of detecting a target in an image collected under all illumination conditions.
[0074] Figure 3 A flow of a target detection method provided in the embodiment Figure 5 . Based on Figure 4 the embodiment shown in the figure, step S302 includes:
[0075] Step S401, training the preset model according to each first training sample to obtain an intermediate model.
[0076] Step S402, training the intermediate model according to each second training sample to obtain a target detection model.
[0077] In the embodiment, the device first trains the preset model by using each first training sample,
[0078] to obtain an intermediate model. The intermediate model can be an existing model.
[0079] After obtaining the intermediate model, the intermediate model is trained by using each second training sample, so as to obtain a target detection model.
[0080] It should be noted that the existing model is obtained by training an image collected in the daytime. The image collected in the daytime has high illumination, and thus the existing model can be used as the intermediate model. The existing model is trained by using each second training sample, so as to obtain a target detection model. In this way, the training efficiency of the model can be improved.
[0081] In the embodiment, the preset model is first trained by using the first training sample to obtain an intermediate model capable of detecting a target in an image collected under high illumination. The intermediate model is fine-tuned by using the second training sample with low illumination, so as to obtain a model capable of detecting a target in an image collected under all illuminations.
[0082] Figure 3 A flow of a target detection method provided in the embodiment Figure 4 . Based on Figure 6 or Figure 7 the embodiment shown in the figure, step S301 includes:
[0083] Step S501, inputting a first training image in the first training sample to a style transfer model to obtain a second training image output by the style transfer model. The collection illumination of the first training image is greater than or equal to a preset illumination, and the collection illumination of the second training image is less than the preset illumination.
[0084] In this embodiment, the training image with a collection illumination lower than the preset illumination can be obtained through the style transfer model. The style transfer model refers to a model capable of transferring the style in an image, for example, the style of buildings in the image. Illustratively, the style transfer model performs style transfer on an input image, and the output image is the same as the buildings and scenery in the input image, and the illumination of the output image is lower than that of the input image. After the input image passes through the style transfer model, the illumination of the output image is relatively low.
[0085] To this end, the device inputs the first training image into the style transfer model, and the style transfer model performs style transfer on the first training image to obtain a second training image. After the first training image, the illumination of the second training image is relatively low, that is, the collection illumination of the second training image is lower than the preset illumination.
[0086] Referring to Figure 5 , the two high-illumination images are input into the style transfer model to obtain two corresponding low-illumination images.
[0087] In step S502, a second training sample is constructed according to the label of the first training sample and the second training image.
[0088] After obtaining the second training image, since the second training image is obtained by performing style transfer on the first training image based on the style transfer model, the label of the second training image can follow the label of the first training image. The label refers to the name or category of the target in the first training image, etc.
[0089] In this embodiment, converting the high-illumination image into a low-illumination image for training of the target detection model can effectively improve the accuracy of the network in the target detection model in a low-light environment. Compared with directly collecting a low-illumination data set to train the target detection model, the method of generating a low-illumination data set based on a high-illumination image has lower cost, higher efficiency, and can also improve the utilization rate of the existing high-illumination data set.
[0090] Figure 5 A flow of a target detection method provided by an embodiment of the present application Exemplary apparatus Based on the embodiment shown in Figure 8 , step S501 further includes:
[0091] In step S701, a plurality of third training samples are obtained. One group of third training samples includes two third training images collected at the same position and with different illuminations. The collection illumination of one third training image is greater than or equal to the preset illumination, and the collection illumination of the other third training image is less than the preset illumination.
[0092] In this embodiment, the device obtains multiple sets of third training samples, one set of third training samples including two third training images of different illuminations collected at the same position, one third training image being collected at an illumination greater than or equal to a preset illumination, and the other third training image being collected at an illumination less than the preset illumination. It can be understood that the image of position A collected in the daytime and the image of position A collected in the evening or at night constitute a set of third training samples. It should be noted that when collecting the image, the image should include multiple scenes, and the scenes should include as many targets and categories as possible, so that the style transfer model can effectively learn the state of the target in the environment. In addition, the same position refers to a place with the same environment, for example, the image of the water in the daytime can be collected at position A, and the image of the water at night can be collected at position B, and the environments of positions A and B are both water environments, so positions A and B can be determined as the same position, that is, the two collected images are taken as a set of third training samples.
[0093] In step S702, the set model is trained according to each set of third training samples to obtain the style transfer model.
[0094] In this embodiment, after obtaining multiple sets of third training samples, the set model is trained based on the multiple sets of third training samples to obtain the style transfer model.
[0095] The set model is a cross-domain image conversion framework based on deep learning, and the core is that the style transfer can be realized without relying on paired labeled data. The model introduces a cycle consistency constraint mechanism to force the two generator networks G AB and F BA to maintain content consistency in the bidirectional conversion process. Specifically, the source domain image x is converted to the target domain by G AB to generate y, and then reconstructed to x' by the inverse generator F BA. The model establishes a closed-loop verification system by minimizing the difference between x and x'. This self-supervised cycle verification mechanism effectively solves the semantic alignment problem in the unpaired data scenario, and ensures that the core visual features remain unchanged during the style conversion process.
[0096] In this embodiment, the set model is trained by multiple sets of third training samples to obtain the style transfer model, so that the high-illumination image is converted into a low-illumination image through the style transfer model.
[0097] Figure 8
[0098] Corresponding to the above-mentioned target detection method, the embodiment of the application also provides a target detection device. Exemplary electronic device is a module schematic diagram of a target detection device provided by the embodiment of the application. As shown in Figure 9 The target detection device 800 provided by the embodiment of the application includes:
[0099] The acquisition module 810 is configured to acquire a target image to be detected.
[0100] The input module 820 is configured to input the target image into a target detection model to obtain a position of a target object in the target image and a category of the target object output by the target detection model, where the target detection model is trained based on a plurality of first training samples and a plurality of second training samples, the first training samples include training images collected at an illumination greater than or equal to a preset illumination, and the second training samples include training images collected at an illumination less than the preset illumination.
[0101] In some implementations, the target detection apparatus 800 is configured to:
[0102] acquire a plurality of first training samples and a plurality of second training samples, the first training samples including training images collected at an illumination greater than or equal to a preset illumination, and the second training samples including training images collected at an illumination less than the preset illumination;
[0103] train a preset model according to each of the first training samples and each of the second training samples to obtain the target detection model.
[0104] In some implementations, the target detection apparatus 800 is configured to:
[0105] train a preset model according to each of the first training samples to obtain an intermediate model;
[0106] train the intermediate model according to each of the second training samples to obtain the target detection model.
[0107] In some implementations, the target detection apparatus 800 is configured to:
[0108] construct a training data set according to each of the first training samples and each of the second training samples;
[0109] train a preset model based on the training samples in the training data set to obtain the target detection model.
[0110] In some implementations, the target detection apparatus 800 is configured to:
[0111] input a first training image in the first training samples into a style transfer model to obtain a second training image output by the style transfer model, the first training image being collected at an illumination greater than or equal to a preset illumination, and the second training image being collected at an illumination less than the preset illumination;
[0112] construct the second training sample according to a label of the first training sample and the second training image.
[0113] In some implementations, the target detection apparatus 800 is configured to:
[0114] obtaining a plurality of groups of third training samples, each group of third training samples comprising two third training images of different illuminations collected at the same position, one third training image being collected at an illumination greater than or equal to the preset illumination, and the other third training image being collected at an illumination less than the preset illumination;
[0115] According to each group of third training samples, the preset model is trained to obtain a style transfer model.
[0116] The target detection device provided in the embodiment belongs to the same application concept as the target detection method provided in the embodiments of the present application, can execute the target detection method provided in any of the embodiments of the present application, and has the corresponding function modules and beneficial effects of executing the target detection method. Technical details not described in detail in the embodiment can be referred to the specific processing content of the target detection method provided in the embodiments of the present application, which will not be described here.
[0117] The functions implemented by each module in the target detection device can be implemented by the same or different processors, which is not limited in the embodiments of the present application.
[0118] It should be understood that the modules in the above system can be implemented in the form of processor calling software. For example, the system includes a processor, the processor is connected with a memory, the memory stores instructions, and the processor calls the instructions stored in the memory to implement any of the above methods or to implement the functions of the modules of the device, wherein the processor can be a general processor, such as CPU or microprocessor, and the memory can be a memory in the device or a memory outside the system. Alternatively, the modules in the system can be implemented in the form of hardware circuit. The functions of part or all of the modules can be implemented by designing the hardware circuit. The hardware circuit can be understood as one or more processors. For example, in one implementation, the hardware circuit is ASIC, and the functions of part or all of the modules are implemented by designing the logical relationship of elements in the circuit. For another example, in another implementation, the hardware circuit can be implemented by PLD. Taking FPGA as an example, it can include a large number of logic gate circuits, and the connection relationship between the logic gate circuits is configured by a configuration file, so as to implement the functions of part or all of the modules. All the modules of the above system can be implemented in the form of processor calling software, or all the modules can be implemented in the form of hardware circuit, or part of the modules can be implemented in the form of processor calling software, and the remaining part can be implemented in the form of hardware circuit.
[0119] In the embodiments of the present application, the processor is a circuit with signal processing capability. In one implementation, the processor can be a circuit with instruction reading and running capability, such as a CPU, a microprocessor, a GPU, or a DSP, etc. In another implementation, the processor can implement certain functions through a logic relationship of a hardware circuit, which is fixed or can be reconfigured. For example, the processor is an ASIC or a PLD implemented hardware circuit, such as an FPGA, etc. In the reconfigurable hardware circuit, the processor loads a configuration document to implement the hardware circuit configuration. It can be understood that the processor loads instructions to implement the functions of the above modules.
[0120] It can be seen that each module in the above system can be one or more processors (or processing circuits) configured to implement the above method, such as a CPU, a GPU, an NPU, a TPU, a DPU, a microprocessor, a DSP, an ASIC, an FPGA, or a combination of at least two of these processor forms.
[0121] In addition, each module in the above system can be integrated together or can be independently implemented. In one implementation, these modules are integrated together to implement a SOC. The SOC can include at least one processor for implementing any of the above methods or the functions of the modules of the device. The at least one processor can be different, such as including a CPU and an FPGA, a CPU and an artificial intelligence processor, a CPU and a GPU, etc.
[0122] Electronic device
[0123] The embodiments of the present application propose another structural diagram of an electronic device, referring to Exemplary computer program product and storage medium as shown, including a memory 900 and a processor 910; the memory 900 is connected with the processor 910 and is used for storing programs; the processor 910 is used for implementing the target detection method disclosed in any of the above embodiments by running the programs stored in the memory 900.
[0124] Specifically, the above electronic device can further include a bus, a communication interface 920, an input device 930, and an output device 940. The electronic device can further include a data transceiving module, an image monitoring module, and a signal monitoring module.
[0125] The processor 910, the memory 900, the communication interface 920, the input device 930, the output device 940, the switch component 950, and the power supply module 960 are connected with each other through the bus. Among them:
[0126] The bus can include a path for communicating information among the various components in the electronic device.
[0127] The processor 910 can be a general processor, such as a general central processing unit (CPU), a microprocessor, or the like, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of programs of the present application. It can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a ready-to-use programmable gate array (FPGA), or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.
[0128] The processor 910 can include a main processor, and can also include a baseband chip, a modem, or the like.
[0129] The processor 910 can include a main processor, and can also include a baseband chip, a modem, or the like.
[0130] The memory 900 stores programs for implementing the technical solutions of the present application, and can also store operating systems and other key services. Specifically, the program can include program code, and the program code includes computer operation instructions. More specifically, the memory 900 can include read-only memory (ROM), other types of static storage devices that can store static information and instructions, random access memory (RAM), other types of dynamic storage devices that can store information and instructions, disk storage, flash, and the like.
[0131] The input device 930 can include a device that receives data and information input by a user, such as a keyboard, a mouse, a camera, a scanner, a light pen, a voice input device, a touch screen, a pedometer, or a gravity sensor, and the like.
[0132] The output device 940 can include a device that allows information to be output to a user, such as a display screen, a printer, a speaker, and the like.
[0133] The communication interface 920 can include a device using any transceiver to communicate with other devices or communication networks, such as Ethernet, a radio access network (RAN), a wireless local area network (WLAN), and the like.
[0134] The processor 910 executes the programs stored in the memory 900 and calls other devices, which can be used to implement each step of any one of the target detection methods provided by the embodiments of the present application.
[0135] The embodiment of the present application also provides a chip, which comprises a processor and a data interface, and the processor reads and runs a program stored on a memory through the data interface to execute the target detection method described in any of the above embodiments. The specific processing process and advantages can be referred to the above description of the target detection method.
[0136]
[0137] In addition to the above method and device, the embodiment of the present application can also be a computer program product, which comprises computer program instructions, and the computer program instructions make the processor execute the steps of the target detection method according to various embodiments of the present application described in any of the above embodiments of the present application when the processor runs.
[0138] The computer program product can be written in any combination of one or more programming languages to perform the operations of the embodiments of the present application, and the programming languages include object-oriented programming languages such as Java, C++, and conventional procedural programming languages such as 'C' language or similar programming languages. The program code can be completely executed on a user computing device, partially executed on a user device, executed as an independent software package, partially executed on a user computing device and partially executed on a remote computing device, or completely executed on a remote computing device or server.
[0139] In addition, the embodiment of the present application can also be a storage medium, which stores a computer program, and the computer program makes the processor execute the steps of the target detection method according to various embodiments of the present application described in any of the above embodiments of the present application when the processor runs. The steps of the target detection method can be implemented as described above.
[0140] For each of the above method embodiments, in order to simply describe, they are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited to the action sequence described, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0141] It should be noted that each of the embodiments in the specification is described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, it is described more simply, and the relevant parts can be referred to the part of the method embodiment.
[0142] The steps in the methods of the embodiments of the present application can be adjusted in sequence, combined and deleted according to actual needs, and the technical features described in the embodiments can be replaced or combined.
[0143] The units of the devices in the embodiments of the present application can be combined, divided and deleted according to actual needs.
[0144] In several embodiments provided by the present application, it should be understood that the disclosed terminal, device and method can be implemented by other ways. For example, the terminal embodiments described above are only schematic, for example, the division of the modules or sub-modules is only a logical function division, and there can be another division way in actual implementation, for example, a plurality of sub-modules or modules can be combined or integrated into another module, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed mutual ones can be indirect coupling or communication connection through some interfaces, devices or modules, and can be electrical, mechanical or other forms.
[0145] The modules or sub-modules described as separate components can or can not be physically separate, and the components of the modules or sub-modules can or can not be physical modules or sub-modules, that is, they can be located in one place or distributed on a plurality of network modules or sub-modules. Some or all of the modules or sub-modules can be selected according to actual needs to achieve the purpose of the embodiments.
[0146] In addition, each functional module or sub-module in the embodiments of the present application can be integrated in one processing module, or each module or sub-module can exist physically, or two or more modules or sub-modules can be integrated in one module. The integrated module or sub-module can be realized in the form of hardware or software functional module or sub-module.
[0147] The skilled person can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been described in general terms in the above description. Whether the functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0148] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software unit executed by a processor, or a combination of both. The software unit can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0149] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0150] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A target detection method characterized by, The method comprises the following steps: obtaining a target image to be detected; inputting the target image into a target detection model to obtain a position of a target object in the target image and a category of the target object output by the target detection model, wherein the target detection model is trained based on a plurality of first training samples and a plurality of second training samples, the first training samples comprise training images collected under an illumination greater than or equal to a preset illumination, and the second training samples comprise training images collected under an illumination less than the preset illumination.
2. The object detection method of claim 1, wherein, Before the step of obtaining the target image to be detected, the method further comprises the following steps: obtaining a plurality of first training samples and a plurality of second training samples, the first training samples comprising training images collected under an illumination greater than or equal to a preset illumination, and the second training samples comprising training images collected under an illumination less than the preset illumination; training a preset model according to each of the first training samples and each of the second training samples to obtain the target detection model.
3. The object detection method of claim 2, wherein, The step of training the preset model according to each of the first training samples and each of the second training samples comprises the following steps: training the preset model according to each of the first training samples to obtain an intermediate model; training the intermediate model according to each of the second training samples to obtain the target detection model.
4. The object detection method of claim 2, wherein, The step of training the preset model according to each of the first training samples and each of the second training samples comprises the following steps: constructing a training data set according to each of the first training samples and each of the second training samples; training the preset model based on the training samples in the training data set to obtain the target detection model.
5. The object detection method of claim 2, wherein, The step of obtaining a plurality of second training samples comprises the following steps: inputting a first training image in the first training samples into a style transfer model to obtain a second training image output by the style transfer model, the first training image being collected under an illumination greater than or equal to a preset illumination, and the second training image being collected under an illumination less than the preset illumination; constructing a second training sample according to a label of the first training sample and the second training image.
6. The object detection method of claim 5, wherein, Before the step of inputting the first training image in the first training samples into the style transfer model, the method further comprises the following steps: obtaining a plurality of third training samples, each of the third training samples comprising two third training images collected under the same position and different illuminations, one of the third training images being collected under an illumination greater than or equal to a preset illumination, and the other one of the third training images being collected under an illumination less than the preset illumination; training a preset model according to each of the third training samples to obtain the style transfer model.
7. A target detection apparatus characterized by comprising: The method comprises the following steps: an obtaining module, configured to obtain a target image to be detected; an inputting module, configured to input the target image into a target detection model to obtain a position of a target object in the target image and a category of the target object output by the target detection model, wherein the target detection model is trained based on a plurality of first training samples and a plurality of second training samples, the first training samples comprise training images collected under an illumination greater than or equal to a preset illumination, and the second training samples comprise training images collected under an illumination less than the preset illumination.
8. An electronic device, comprising: The method comprises the following steps: an obtaining module, configured to obtain a target image to be detected; an inputting module, configured to input the target image into a target detection model to obtain a position of a target object in the target image and a category of the target object output by the target detection model, wherein the target detection model is trained based on a plurality of first training samples and a plurality of second training samples, the first training samples comprise training images collected under an illumination greater than or equal to a preset illumination, and the second training samples comprise training images collected under an illumination less than the preset illumination. The method comprises the following steps: an obtaining module, configured to obtain a target image to be detected; an inputting module, configured to input the target image into a target detection model to obtain a position of a target object in the target image and a category of the target object output by the target detection model, wherein the target detection model is trained based on a plurality of first training samples and a plurality of second training samples, the first training samples comprise training images collected under an illumination greater than or equal to a preset illumination, and the second training samples comprise training images collected under an illumination less than the preset illumination. The memory is connected with the processor and is configured to store a program. The processor is configured to realize the target detection method in any one of claims 1 to 6 by running the program in the memory.
9. A computer-readable storage medium, characterized in that, A computer program is stored in the computer readable storage medium, and the computer program is run by the processor to realize the target detection method in any one of claims 1 to 6.
10. A computer program product, characterised in that, A computer program is stored in the computer readable storage medium, and the computer program is run by the processor to realize the target detection method in any one of claims 1 to 6. A computer program is stored in the computer readable storage medium, and the computer program is run by the processor to realize the target detection method in any one of claims 1 to 6.
Citation Information
Patent Citations
Method and device for detecting object in scene image
CN115240125A
Low-illumination image target detection method and device based on improved YOLOv8
CN119048877A
Low-illumination target detection method and device based on YOLOv7-tiny improvement
CN119169267A
Target detection model training method and device, readable storage medium and electronic equipment
CN119810590A
Model training method and device, target detection method and device, equipment and storage medium
CN119942261A