Camera target detection method, device and equipment and storage medium

By obtaining and processing real-time video streams in the camera background service program of the photography terminal, the target detection results are directly fed back to the camera application, solving the problems of real-time and low efficiency of camera object detection in the prior art, and achieving efficient and real-time Object detection and display.

CN118984422APending Publication Date: 2024-11-19HONGHU WANLIAN (JIANGSU) TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411040186.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-11-19

AI Technical Summary

Technical Problem

The existing camera object detection methods have problems of low real-time and low efficiency on the Hongmeng operating system, mainly because the camera video stream processing link is long, involves multiple data transmissions and processing, and are limited by network bandwidth and performance.

Method used

By obtaining real-time video streams in the camera background service program of the photography terminal and calling the object detection interface for processing, the video stream with object detection results is obtained to the camera application, real-time display is achieved, data transmission and processing links are reduced, and data transmission and processing links are improved. Efficiency and real-time.

Benefits of technology

It improves the efficiency and real-time nature of target detection, reduces system complexity, realizes target detection of photo terminals, and improves the intelligence of user experience and applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118984422A_ABST
    Figure CN118984422A_ABST
Patent Text Reader

Abstract

The invention discloses a camera target detection method and device, equipment and a storage medium. The method comprises the following steps: when a camera background service program detects that a camera application starts a target detection option, obtaining a real-time video stream collected by a camera, and calling a target detection interface to process the real-time video stream; performing target detection processing on the real-time video stream through the target detection interface to obtain a target video stream with a target detection result, and feeding back the target video stream to the camera background service program; sending a target video stream with a target detection result to a camera application program through a camera background service program; and displaying the target video stream with the target detection result in a video preview interface in real time through a camera application. Through the technical scheme of the invention, the target detection of the photographing terminal can be realized, and the efficiency and real-time performance of target detection are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of target detection, and in particular to a camera target detection method, device, equipment and storage medium. Background Art

[0002] On the Hongmeng operating system, object detection on the real-time video stream of the camera is an important application scenario. The existing method is usually to obtain the camera video stream by calling the Hongmeng operating system camera interface through the camera application of the camera terminal, and then upload the video stream to the application layer of the camera application, and then call the open source object detection third-party library through the system interface to perform object detection. The detection result needs to be reported to the camera application, and finally the camera application merges the detection result with the original camera video data and outputs it as a new video stream.

[0003] However, this approach has obvious disadvantages. First, the entire camera video stream object detection processing link is long, involving multiple data transmission and processing, which increases the latency and complexity of the system. Second, uploading the camera video stream to the application layer for processing may be limited by network bandwidth and performance, affecting the real-time and efficiency of detection.

[0004] In summary, the existing camera target detection methods have low real-time performance and efficiency for target detection. Summary of the invention

[0005] The present invention provides a camera target detection method, device, equipment and storage medium, which can solve the problem that the existing camera target detection method has low real-time performance and low efficiency in target detection.

[0006] In a first aspect, an embodiment of the present invention provides a camera target detection method, which is executed by a camera terminal installed with a Hongmeng operating system, and the method includes:

[0007] When the camera background service detects that the camera application has turned on the target detection option, it obtains the real-time video stream collected by the camera and calls the target detection interface to process the real-time video stream;

[0008] Perform target detection processing on the real-time video stream through the target detection interface, and obtain the target video stream with the target detection result and feed it back to the camera background service program;

[0009] Send the target video stream with the target detection results to the camera application through the camera background service program;

[0010] The target video stream with the target detection result is displayed in real time in the video preview interface through the camera application.

[0011] In a second aspect, an embodiment of the present invention provides a camera target detection device, the device comprising:

[0012] The real-time video stream acquisition module is used to acquire the real-time video stream collected by the camera when the camera background service program detects that the camera application has turned on the target detection option, and calls the target detection interface to process the real-time video stream;

[0013] The target detection module is used to perform target detection processing on the real-time video stream through the target detection interface, and obtain the target video stream with the target detection result and feed it back to the camera background service program;

[0014] The video stream sending module is used to send the target video stream with the target detection result to the camera application through the camera background service program;

[0015] The real-time display module is used to display the target video stream with the target detection result in real time in the video preview interface through the camera application.

[0016] In a third aspect, an embodiment of the present invention provides an electronic device, the electronic device comprising:

[0017] at least one processor; and

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

[0019] 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 a camera target detection method according to any embodiment of the present invention.

[0020] In a fourth aspect, 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 a camera target detection method described in any embodiment of the present invention when executed.

[0021] The technical solution of the embodiment of the present invention is to first obtain the real-time video stream collected by the camera when detecting that the camera application has turned on the target detection option through the camera background service program, and call the target detection interface to process the real-time video stream, then perform target detection processing on the real-time video stream through the target detection interface, obtain a target video stream with the target detection result and feed it back to the camera background service program, then send the target video stream with the target detection result to the camera application through the camera background service program, and finally display the target video stream with the target detection result in real time in the video preview interface through the camera application, thereby solving the problem that the existing camera target detection method has low real-time and efficiency in target detection, realizing target detection of the photo-taking terminal, and improving the efficiency and real-time of target detection.

[0022] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present 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

[0023] 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.

[0024] Figure 1 is a flow chart of a camera target detection method provided according to Embodiment 1 of the present invention;

[0025] Figure 2 is a flow chart of a camera target detection method provided according to Embodiment 2 of the present invention;

[0026] Figure 3 is a structural schematic diagram of a camera target detection device provided according to Embodiment 3 of the present invention;

[0027] Figure 4 It is a structural schematic diagram of an electronic device for implementing a camera target detection method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0028] 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.

[0029] It should be noted that the terms "first", "second", 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, any variation of the terms "including" and "having" is 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 clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] Embodiment 1

[0031] Figure 1 This is a flowchart of a camera target detection method provided in Embodiment 1 of the present invention. This embodiment is applicable to the situation where a camera terminal equipped with the Hongmeng system performs camera target detection. The method can be executed by a camera target detection device. The camera target detection device can be implemented in the form of hardware and / or software. The camera target detection device can be configured in a camera terminal equipped with the Hongmeng operating system.

[0032] like Figure 1 As shown, the method includes:

[0033] S110. When the camera background service program detects that the camera application has turned on the target detection option, the real-time video stream collected by the camera is obtained, and the target detection interface is called to process the real-time video stream.

[0034] Among them, the camera background service program refers to the program running in the background of the camera application, which is used to manage related functions of the camera, such as obtaining video streams, processing images, etc.; further, the target detection option is a setting option in the camera application, which is used to turn on or off the target detection function through user touch operations; further, the real-time video stream is the video data collected in real time by the camera of the photo-taking terminal, which is transmitted in the form of continuous frames.

[0035] Optionally, in this embodiment, the target detection option is set by using the global system properties in the Hongmeng operating system; the camera background service program determines whether the camera application has turned on the target detection option by detecting the global system properties.

[0036] Among them, the global system properties refer to the globally visible system properties in the operating system, which can be used to store and transmit system-level information. In this embodiment, the target detection option is set by using the global system properties in the Hongmeng operating system. The camera background service program determines whether the camera application has turned on the target detection option by detecting the value of the global system property. When it is detected that the target detection option is turned on, the camera background service program will obtain the real-time video stream collected by the camera, and call the target detection interface to process the real-time video stream to implement the target detection function. This method can improve the efficiency and real-time performance of target detection, while reducing the links for data transmission and processing and reducing the complexity of the system.

[0037] S120, performing target detection processing on the real-time video stream through the target detection interface, obtaining a target video stream with the target detection result and feeding it back to the camera background service program.

[0038] In this embodiment, the camera background service program performs target detection processing on the real-time video stream by calling the target detection interface. The target detection interface analyzes each frame of the video stream, identifies the target therein, and associates the target detection result with the corresponding frame. After the processing is completed, the target video stream with the target detection result will be fed back to the camera background service program. The camera background service program can perform further processing based on the target detection result, such as displaying the target detection result on the interface of the camera application, or saving the target video stream to local storage. This method can realize real-time target detection and feedback, and improve the intelligence and practicality of the camera application.

[0039] S130 , sending the target video stream with the target detection result to the camera application program through the camera background service program.

[0040] In this embodiment, the camera background service program is responsible for receiving the target video stream and sending it to the camera application. After the camera application receives the target video stream, it can further process and display it. This method realizes data transmission and interaction between the camera background service program and the camera application, so that the camera application can obtain the target detection results in real time and perform corresponding operations as needed. Such a design can improve the efficiency and real-time performance of the system, and also provide users with a richer and smarter camera application experience. Users can directly see the results of target detection in the camera application and shoot, edit or perform other operations based on these results. In general, sending the target video stream with target detection results to the camera application through the camera background service program is a key step in realizing the integration of camera functions and target detection functions, which brings more convenience and possibilities to users.

[0041] S140: Displaying the target video stream with the target detection result in real time in a video preview interface through a camera application.

[0042] Specifically, the application layer of the camera application receives and processes the target video stream from the camera background service program. On the video preview interface, the user can watch the video screen after target detection processing in real time, which contains relevant information about the target detection results. This real-time display function provides users with intuitive visual feedback, allowing users to instantly understand the target situation in the video. Users can perform corresponding operations based on the target detection results, such as tracking specific targets, taking photos or recording videos. By displaying the target video stream with target detection results in the video preview interface, the camera application enhances the user experience, making it smarter and more convenient. Users can more easily capture targets of interest and perform further processing and sharing.

[0043] Optionally, in this embodiment, the camera target detection method further includes:

[0044] When the camera background service program detects that the camera application has not turned on the target detection option, it obtains the real-time video stream captured by the camera and sends the real-time video stream to the camera application; the real-time video stream is displayed in real time in the video preview interface through the camera application.

[0045] Specifically, the camera background service program monitors the status of the camera application, and when it detects that the target detection option is not turned on, it promptly obtains the real-time video stream collected by the camera. The camera background service program interacts with the camera to ensure that high-quality real-time video data can be obtained. Once the camera background service program obtains the real-time video stream, it transmits it to the camera application. After the camera application receives the real-time video stream, it will display it in real time in the video preview interface. Users can watch the real-time video stream through the interface of the camera application and preview the pictures captured by the camera in real time. This real-time display function enables users to see the real-time picture of the camera in time, which is convenient for users to shoot, record or other operations. Users can adjust the camera parameters such as focal length, exposure, etc. as needed to obtain satisfactory shooting effects. Through the collaboration of the camera background service program and the camera application, the acquisition and display of the real-time video stream when the target detection option is not turned on is realized. This provides users with a flexible way of use, allowing them to choose whether to turn on the target detection function according to specific needs, and also ensures that the camera can be used normally for shooting and previewing when target detection is not required.

[0046] The technical solution of the embodiment of the present invention is to first obtain the real-time video stream collected by the camera when the camera background service program detects that the camera application has turned on the target detection option, and call the target detection interface to process the real-time video stream. Then, the real-time video stream is subjected to target detection processing through the target detection interface to obtain a target video stream with the target detection result and feed it back to the camera background service program. Then, the target video stream with the target detection result is sent to the camera application through the camera background service program. Finally, the target video stream with the target detection result is displayed in real time in the video preview interface through the camera application, thereby realizing target detection of the photo-taking terminal and improving the efficiency and real-time performance of target detection.

[0047] Embodiment 2

[0048] Figure 2 A flowchart of a camera target detection method provided in Embodiment 2 of the present invention. This embodiment is refined based on the above-mentioned embodiment. In this embodiment, the method of performing target detection processing on a real-time video stream through a target detection interface and obtaining a target video stream with target detection results and feeding it back to the camera background service program is refined.

[0049] like Figure 2 As shown, the method includes:

[0050] S210. When the camera background service program detects that the camera application has turned on the target detection option, the real-time video stream collected by the camera is obtained, and the target detection interface is called to process the real-time video stream.

[0051] S220. Call the neural network processor built into the camera terminal through the target detection interface according to the preloaded target detection model, perform target detection processing on the real-time video stream, obtain the target video stream with the target detection result, and feed it back to the camera background service program.

[0052] Through the target detection interface, the built-in neural network processor in the camera terminal is called to perform target detection processing on the real-time video stream based on the pre-loaded target detection model. In this process, the powerful computing power and specialized algorithms of the neural network processor are used to carefully analyze and process each frame of the real-time video stream to accurately identify the target and obtain relevant target detection results. Finally, the target video stream with the target detection results is obtained and fed back to the camera background service program.

[0053] It is worth mentioning that the neural network processor mentioned here can be an independent NPU (Neural-network Processing Unit) module. As a dedicated hardware chip, it has excellent neural network computing performance and can efficiently handle target detection tasks. At the same time, it can also be a part contained in the CPU, working with the CPU to complete the target detection processing of real-time video streams. Whether as an independent chip or integrated into the CPU, the neural network processor plays a vital role in the target detection process. It provides solid technical support and guarantee for accurate and fast target detection, so that the entire target detection process can be carried out more efficiently and accurately. In this way, the effect and performance of target detection can be continuously improved, bringing better user experience and services to users.

[0054] Among them, the target detection interface is used to call the neural network processor built into the photographing terminal according to the preloaded target detection model to perform target detection processing on the real-time video stream, including: loading the pre-trained target detection model through the target detection interface; preprocessing the real-time video stream through the neural network processor built into the photographing terminal to obtain a preprocessed video stream; inputting the preprocessed video stream into the loaded target detection model to obtain target detection data matching the real-time video stream; using the neural network processor to combine the real-time video stream with the target detection data to obtain a target video stream with target detection results.

[0055] In a specific implementation scenario of this embodiment, the pre-trained target detection model is loaded through the target detection interface. In this process, the target detection interface enables the target detection model to be accurately loaded and prepared for subsequent use. Then, the real-time video stream is fully preprocessed with the help of the neural network processor built into the camera terminal. In this link, the real-time video stream is subjected to a series of preprocessing operations such as data format conversion and image optimization by the neural network processor, and finally a carefully processed preprocessed video stream is obtained. Then, the preprocessed video stream is accurately input into the loaded target detection model. Inside the target detection model, the preprocessed video stream is deeply analyzed and calculated through complex algorithms and model structures, so as to obtain target detection data that accurately matches the real-time video stream. Finally, the neural network processor is used to play its key role again, and the real-time video stream and the target detection data are cleverly combined. In this combination process, the neural network processor, with its efficient computing power and precise processing logic, fuses the real-time video stream and the target detection data together, and then successfully obtains the target video stream with the target detection result. Such a target video stream not only contains the information of the original real-time video stream, but also integrates the precise target detection results, providing a rich and valuable data foundation for subsequent analysis, application and display.

[0056] Furthermore, the neural network processor is used to combine the real-time video stream with the target detection data to obtain a target video stream with target detection results, including: based on each target coordinate in the target detection data, marking the target detection result in the real-time video stream in the form of a rectangular frame at the position of the target coordinate to obtain a real-time video stream with at least one rectangular frame; obtaining a target category matching the current target coordinates in the target detection data, and displaying it in the form of text at the set position of the current rectangular frame to obtain the target video stream with the target detection result.

[0057] Optionally, in this embodiment, based on the target coordinates contained in the target detection data, the target detection result is accurately marked in the real-time video stream in the form of a rectangular frame at the position corresponding to the target coordinate, so as to obtain a real-time video stream with at least one rectangular frame. Then, the target category matching the current target coordinates can be further obtained in the target detection data, and clearly displayed in clear text form at a specific set position of the current rectangular frame. In addition, the target score and target coordinate detection result are also obtained, wherein the target score represents the confidence of the current target, and finally the target video stream with the target detection result, target score, target coordinate detection result and target category text display is obtained.

[0058] S230 , sending the target video stream with the target detection result to the camera application through the camera background service program.

[0059] S240: Displaying the target video stream with the target detection result in real time in a video preview interface through a camera application.

[0060] The technical solution of the embodiment of the present invention is as follows: first, when the camera background service program detects that the camera application has turned on the target detection option, the real-time video stream collected by the camera is obtained, and the target detection interface is called to process the real-time video stream. Then, the target detection interface is used to call the neural network processor built into the photo-taking terminal according to the preloaded target detection model to perform target detection processing on the real-time video stream, and the target video stream with the target detection result is obtained and fed back to the camera background service program. Then, the target video stream with the target detection result is sent to the camera application through the camera background service program. Finally, the target video stream with the target detection result is displayed in real time in the video preview interface through the camera application, thereby realizing target detection of the photo-taking terminal and improving the efficiency and real-time performance of target detection.

[0061] Embodiment 3

[0062] Figure 3 This is a schematic diagram of the structure of a camera target detection device provided in Embodiment 3 of the present invention. Figure 3 As shown, the device comprises:

[0063] The real-time video stream acquisition module 310 is used to acquire the real-time video stream collected by the camera through the camera background service program when detecting that the camera application has turned on the target detection option, and call the target detection interface to process the real-time video stream;

[0064] The target detection module 320 is used to perform target detection processing on the real-time video stream through the target detection interface, and obtain a target video stream with the target detection result and feed it back to the camera background service program;

[0065] The video stream sending module 330 is used to send the target video stream with the target detection result to the camera application through the camera background service program;

[0066] The real-time display module 340 is used to display the target video stream with the target detection result in real time in the video preview interface through the camera application.

[0067] The technical solution of the embodiment of the present invention is to first obtain the real-time video stream collected by the camera when the camera background service program detects that the camera application has turned on the target detection option, and call the target detection interface to process the real-time video stream. Then, the real-time video stream is subjected to target detection processing through the target detection interface to obtain a target video stream with the target detection result and feed it back to the camera background service program. Then, the target video stream with the target detection result is sent to the camera application through the camera background service program. Finally, the target video stream with the target detection result is displayed in real time in the video preview interface through the camera application, thereby realizing target detection of the photo-taking terminal and improving the efficiency and real-time performance of target detection.

[0068] Based on the above embodiment, the target detection module 320 is specifically used for:

[0069] Through the target detection interface, according to the preloaded target detection model, the neural network processor built into the camera terminal is called to perform target detection processing on the real-time video stream, and the target video stream with the target detection result is obtained and fed back to the camera background service program.

[0070] Based on the above embodiment, the target detection module 320 specifically includes:

[0071] A model loading unit, used to load a pre-trained target detection model through a target detection interface;

[0072] A preprocessing unit, used to preprocess the real-time video stream through a neural network processor built into the camera terminal to obtain a preprocessed video stream;

[0073] A monitoring target detection data acquisition unit, used for inputting the pre-processed video stream into the loaded target detection model to obtain target detection data matching the real-time video stream;

[0074] A data combination unit is used to combine the real-time video stream with the target detection data using the neural network processor to obtain a target video stream with target detection results.

[0075] Based on the above embodiment, the data combination unit further includes:

[0076] A first marking unit is used to mark the target detection result in the real-time video stream in the form of a rectangular frame at the position of the target coordinate based on each target coordinate in the target detection data, so as to obtain a real-time video stream with at least one rectangular frame;

[0077] The second marking unit is used to obtain the target category matching the current target coordinates in the target detection data, and display it in the form of text at the set position of the current rectangular frame to obtain the target video stream with the target detection result.

[0078] Based on the above embodiment, the camera target detection device further includes:

[0079] The real-time preview module is used to obtain the real-time video stream captured by the camera and send the real-time video stream to the camera application when the camera background service program detects that the camera application has not turned on the target detection option; the real-time video stream is displayed in real time in the video preview interface through the camera application.

[0080] A camera target detection device provided by an embodiment of the present invention can execute a camera target detection method provided by any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.

[0081] Embodiment 4

[0082] Figure 4 A schematic diagram of the structure of an electronic device 10 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, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing 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.

[0083] like Figure 4As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

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

[0085] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 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 11 executes the various methods and processes described above, such as a camera target detection method.

[0086] Accordingly, the method comprises:

[0087] When the camera background service detects that the camera application has turned on the target detection option, it obtains the real-time video stream collected by the camera and calls the target detection interface to process the real-time video stream;

[0088] Perform target detection processing on the real-time video stream through the target detection interface, and obtain the target video stream with the target detection result and feed it back to the camera background service program;

[0089] Send the target video stream with the target detection results to the camera application through the camera background service program;

[0090] The target video stream with the target detection result is displayed in real time in the video preview interface through the camera application.

[0091] In some embodiments, a camera target detection method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the camera target detection method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform a camera target detection method in any other appropriate manner (e.g., by means of firmware).

[0092] 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.

[0093] 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.

[0094] 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 combination 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.

[0095] 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).

[0096] 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.

[0097] 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.

[0098] 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.

Claims

1. A camera target detection method, characterized in that: The method is performed by a camera terminal installed with Hongmeng operating system, and includes: When the camera background service detects that the camera application has turned on the target detection option, it obtains the real-time video stream collected by the camera and calls the target detection interface to process the real-time video stream; Perform target detection processing on the real-time video stream through the target detection interface, and obtain the target video stream with the target detection result and feed it back to the camera background service program; Send the target video stream with the target detection results to the camera application through the camera background service program; The target video stream with the target detection result is displayed in real time in the video preview interface through the camera application.

2. The method according to claim 1, characterized in that The target detection interface is used to perform target detection processing on the real-time video stream, and the target video stream with the target detection result is fed back to the camera background service program, including: Through the target detection interface, according to the preloaded target detection model, the neural network processor built into the camera terminal is called to perform target detection processing on the real-time video stream, and the target video stream with the target detection result is obtained and fed back to the camera background service program.

3. The method according to claim 2, characterized in that The target detection interface is used to call the neural network processor built into the camera terminal according to the preloaded target detection model to perform target detection processing on the real-time video stream, including: Load the pre-trained object detection model through the object detection interface; Preprocessing the real-time video stream through a neural network processor built into the camera terminal to obtain a preprocessed video stream; Inputting the preprocessed video stream into the loaded target detection model to obtain target detection data matching the real-time video stream; The real-time video stream is combined with the target detection data using the neural network processor to obtain a target video stream with target detection results.

4. The method according to claim 3, characterized in that The real-time video stream is combined with the target detection data using the neural network processor to obtain a target video stream with target detection results, including: Based on each target coordinate in the target detection data, the target detection result is marked in the real-time video stream in the form of a rectangular frame at the position of the target coordinate, so as to obtain a real-time video stream with at least one rectangular frame; The target category matching the current target coordinates is obtained in the target detection data, and is displayed in the form of text at the set position of the current rectangular frame to obtain the target video stream with the target detection result.

5. The method according to claim 1, characterized in that The method further comprises: When the camera background service program detects that the camera application does not have the target detection option turned on, the real-time video stream collected by the camera is obtained, and the real-time video stream is sent to the camera application; The real-time video stream is displayed in real time in the video preview interface through the camera application.

6. The method according to claim 1, characterized in that The target detection options are set by using global system properties in the Hongmeng operating system; The camera background service program determines whether the camera application has enabled the target detection option by detecting the global system property.

7. A camera target detection device, characterized in that: The method is performed by a camera terminal installed with Hongmeng operating system, and includes: The real-time video stream acquisition module is used to acquire the real-time video stream collected by the camera through the camera background service program when it detects that the camera application has turned on the target detection option, and calls the target detection interface to process the real-time video stream; The target detection module is used to perform target detection processing on the real-time video stream through the target detection interface, and obtain the target video stream with the target detection result and feed it back to the camera background service program; The video stream sending module is used to send the target video stream with the target detection result to the camera application through the camera background service program; The real-time display module is used to display the target video stream with the target detection result in real time in the video preview interface through the camera application.

8. The method according to claim 7, characterized in that The target detection module is specifically used for: Through the target detection interface, according to the preloaded target detection model, the neural network processor built into the camera terminal is called to perform target detection processing on the real-time video stream, and the target video stream with the target detection result is obtained and fed back to the camera background service program.

9. 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 camera target detection method according to any one of claims 1 to 6.

10. 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 camera target detection method according to any one of claims 1 to 6 when executed.