Method, apparatus, device and storage medium for processing image
By combining a pre-trained object detection network and bounding box technique with Gaussian convolution blurring, the problem of efficient desensitization of privacy and confidential information in street view images is solved, improving processing efficiency while maintaining image quality.
Patent Information
- Application Number
- CN202210482727.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-05
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2042-05-05
AI Technical Summary
How to efficiently process different types of privacy and confidential information in street view images to meet the desensitization needs of the surveying and mapping geographic information field.
Object detection is performed on street view images using a pre-trained object detection network. Objects are labeled using bounding boxes and desensitized based on adjustment information, including blurring. Specifically, the blurring range is determined within the bounding boxes and Gaussian convolution is performed by gradually narrowing the range.
It effectively desensitizes sensitive information in street view images, improves image processing efficiency, and ensures a natural transition between blurred areas and the background, resulting in a visually smooth effect.
Smart Images

Figure CN114782910B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of artificial intelligence, in particular to the technical field of computer vision and deep learning, and more particularly to a method, device and equipment for processing images and a storage medium. BACKGROUND
[0002] Street view images, as an effective information carrier of surveying and mapping geographic information, are widely used in street view maps, real scene navigation and unmanned driving. Chinese surveying and mapping laws and regulations clearly stipulate that several types of information existing in street view images need to be desensitized. Since these information randomly appears in real scene images and different types of information have different characteristics, the processing methods are also different. Therefore, how to efficiently process different types of privacy and confidential information has been a research hotspot in the field of surveying and mapping geographic information. SUMMARY
[0003] The present disclosure provides a method, device and equipment for processing images and a storage medium.
[0004] According to a first aspect, a method for processing images is provided, comprising: obtaining a target image; performing object detection on the target image by using a pre-trained object detection network, and labeling the detected objects by using a label box; in response to receiving adjustment information for the label box, determining the labeled objects according to the adjustment information; and performing desensitization processing on the labeled objects.
[0005] In some embodiments, the obtaining of the target image comprises: taking a street view image collected by a collection vehicle during driving as the target image.
[0006] In some embodiments, the desensitization processing on the labeled objects comprises: performing at least one blur processing on the labeled objects.
[0007] In some embodiments, the at least one blur processing on the labeled objects comprises: determining a range of each blur processing within the label box of the object; and performing the at least one blur processing in the determined range respectively.
[0008] In some embodiments, the determination of the range of each blur processing within the label box of the object comprises: determining a target rectangle at each blur processing within the label box; and determining a maximum inscribed ellipse in the target rectangle as the range of each blur processing.
[0009] In some embodiments, the determination of the target rectangle at each blur processing within the label box comprises: determining the label box as a target rectangle for the first blur processing; and determining a target rectangle from a maximum inscribed ellipse of the last blur processing.
[0010] In some embodiments, the performing the at least one blurring processing in the determined range respectively comprises: determining a blurring value for each blurring processing; and performing the at least one blurring processing according to the blurring value in the determined range.
[0011] In some embodiments, the method further comprises: determining an adjusted bounding box according to the adjustment information; and retraining the object detection network according to the target image and the adjusted bounding box.
[0012] According to a second aspect, an apparatus for processing an image is provided, comprising: an image obtaining unit configured to obtain a target image; an object detecting unit configured to perform object detection on the target image by using a pre-trained object detection network, and label a detected object by using a bounding box; an object updating unit configured to, in response to receiving adjustment information for the bounding box, determine a labeled object according to the adjustment information; and a desensitization processing unit configured to perform desensitization processing on the labeled object.
[0013] According to a third aspect, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect.
[0014] According to a fourth aspect, a non-transitory computer-readable storage medium storing computer instructions is provided, and the computer instructions are used to enable a computer to perform the method described in the first aspect.
[0015] According to a fifth aspect, a computer program product is provided, comprising a computer program, and the computer program, when executed by a processor, implements the method described in the first aspect.
[0016] The technology according to the present disclosure can perform desensitization processing on an image, and improve image processing efficiency.
[0017] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present disclosure, nor to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0018] The accompanying drawings are used to better understand the present scheme, and do not limit the present disclosure. Among them:
[0019] Figure 1 is an exemplary system architecture diagram to which an embodiment of the present disclosure can be applied;
[0020] Figure 2 is a flowchart of one embodiment of a method for processing an image according to the present disclosure;
[0021] Figure 3 is a schematic diagram of one application scenario of a method for processing an image according to the present disclosure;
[0022] Figure 4 is a flowchart of another embodiment of a method for processing an image according to the present disclosure;
[0023] Figure 5 is a blur processing range schematic diagram of face desensitization processing of a method for processing an image according to the present disclosure;
[0024] Figure 6 is a structural schematic diagram of one embodiment of an apparatus for processing an image according to the present disclosure;
[0025] Figure 7 is a block diagram of an electronic device for implementing a method for processing an image according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0026] Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, which include various details of the embodiments of the present disclosure to help the understanding of the present disclosure. These should be considered in their context only as exemplary. Thus, those of ordinary skill in the art will recognize various changes and modifications of the embodiments described herein, which do not depart from the scope and spirit of the present disclosure. Also, for the sake of brevity and clarity, descriptions of well-known functions and constructions are omitted from the following description.
[0027] It should be noted that the embodiments in the present disclosure and the features in the embodiments can be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
[0028] Figure 1 An exemplary system architecture 100 is shown that can apply embodiments of a method for processing an image or an apparatus for processing an image of the present disclosure.
[0029] As shown in Figure 1 , the system architecture 100 can include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a communication link medium between the terminal devices 101, 102, 103 and the server 105. The network 104 can include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0030] The user can use the terminal device 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, 102, 103, such as image processing applications, image labeling applications, etc.
[0031] The terminal device 101, 102, 103 can be hardware or software. When the terminal device 101, 102, 103 is hardware, it can be various electronic devices, including but not limited to smartphones, tablet computers, vehicle-mounted computers, laptop computers, desktop computers, etc. When the terminal device 101, 102, 103 is software, it can be installed in the above-mentioned electronic devices. It can be implemented as multiple software or software modules (for example, to provide distributed services), or as a single software or software module. No specific limitation is made here.
[0032] The server 105 can be a server that provides various services, such as a background server that provides an object detection network for the terminal device 101, 102, 103. The background server can train an initial object detection network using training samples to obtain a trained object detection network, and feed back the trained object detection network to the terminal device 101, 102, 103.
[0033] It should be noted that the server 105 can be hardware or software. When the server 105 is hardware, it can be implemented as a distributed server cluster composed of multiple servers, or as a single server. When the server 105 is software, it can be implemented as multiple software or software modules (for example, to provide distributed services), or as a single software or software module. No specific limitation is made here.
[0034] It should be noted that the method for processing an image provided by the embodiments of the present disclosure can be executed by the terminal device 101, 102, 103, or by the server 105. Accordingly, the apparatus for processing an image can be provided in the terminal device 101, 102, 103, or in the server 105.
[0035] It should be understood that Figure 1 The number of terminal devices, networks, and servers in
[0036] With reference to Figure 2 , a flow 200 of one embodiment of a method for processing an image according to the present disclosure is shown. The method for processing an image of the present embodiment includes the following steps:
[0037] Step 201, obtaining a target image.
[0038] In this embodiment, the execution subject of the method for processing images (for example Figure 1 The terminal device or server shown in the above embodiment can obtain the target image in various ways. Here, the target image can include a street view image of various objects, such as roads, human faces, etc.
[0039] In step 202, the target image is subjected to object detection using a pre-trained object detection network, and the detected objects are labeled using a bounding box.
[0040] After obtaining the target image, the execution subject can use a pre-trained object detection network to detect objects in the target image. Here, the object detection network can be used to detect sensitive objects in the target image. The above-mentioned sensitive objects can be various types of objects pre-set, such as human faces, license plate numbers, etc. The execution subject can label the detected objects using a bounding box. The above-mentioned bounding box can be a rectangle, an ellipse, or various irregular shapes, etc. In some specific applications, the above-mentioned sensitive object can be a human face, and the above-mentioned bounding box can be a rectangle. When labeling a human face using a bounding box, the following criteria can be used: the upper limit is the top of the hair or hat, etc. The lower limit is the chin, and the left and right limits are the ears (when the ears are not visible, the edge of the face). When the face is obscured or truncated by more than 2 / 3, the bounding box is not labeled, and the obscured part is inferred and associated, and the truncated part does not need to be associated. If it is a side face, the nose is exposed, and the side face is labeled. When labeling a human face, only human faces with a minimum bounding box length greater than 15 pixels are labeled, i.e. human faces with a size smaller than this are ignored.
[0041] The above-mentioned object detection network can be trained using a large number of sample images and their corresponding label results. The above-mentioned object detection network can be a network for detecting a single class of objects, or a network for detecting multiple classes of objects. When the object is a human face, the above-mentioned object detection network can be a YOLO-v4 network, an SSD network, a Faster RCNN network, etc.
[0042] In step 203, in response to receiving adjustment information for the bounding box, the labeled object is determined according to the adjustment information.
[0043] In this embodiment, the execution subject can also output the generated bounding box to a technician. The technician can confirm or modify the above-mentioned bounding box through a terminal. If the above-mentioned bounding box is modified, adjustment information will be generated accordingly. After receiving the above-mentioned adjustment information, the execution subject can determine the labeled object according to the size and position of the bounding box in the adjustment information.
[0044] At step 204, the marked object is desensitized.
[0045] The execution subject can further desensitize the marked object. Here, the desensitization can include blurring the marked object, performing mosaic processing, and the like. In the desensitization, the execution subject can perform different types of desensitization on different types of objects. For example, blurring the human face, blocking the license plate number, and the like.
[0046] Referring back to Figure 3 , a schematic diagram of one application scenario of the method for processing an image according to the present disclosure is shown. In Figure 3 , the application scenario, the acquisition vehicle 301 collects street view images on the road and uploads the collected street view images to the server 302. After receiving each street view image, the server 302 labels the object with a label box. Then the label box is output to the technician, and the adjustment information of the technician on the label box is received. Finally, the adjusted object is determined according to the adjustment information, and the object is identified as an object that needs to be desensitized. Then the sensitive object in the street view image is desensitized. The desensitized street view image can be used to construct a real scene map.
[0047] The method for processing an image provided by the above embodiments of the present disclosure can desensitize the image and improve the image processing efficiency.
[0048] Referring back to Figure 4 , a flowchart 400 of another embodiment of the method for processing an image according to the present disclosure is shown. As Figure 4 indicated, the method of the present embodiment can include the following steps:
[0049] At step 401, the street view image collected by the acquisition vehicle during driving is taken as a target image.
[0050] In the present embodiment, the execution subject can take the street view image collected by the acquisition vehicle during driving as a target image.
[0051] At step 402, the object detection network is used to detect the object in the target image, and the label box is used to label the detected object.
[0052] At step 403, the marked object is blurred at least once.
[0053] The main purpose of the blurring processing is to blur the private pixel blocks contained in the image bounding box so that they cannot be clearly recognized, thereby achieving the purpose of protecting personal privacy. The image after the blurring processing needs to meet two characteristics, one is that the person contained in the image cannot be identified, and the other is that the processed sensitive information image block and the surrounding background image transition naturally and the visual effect is not conspicuous. In this embodiment, the execution subject can perform at least one blurring processing on the annotated object. In the blurring processing, a Gaussian blur or the like can be used. Specifically, the execution subject can perform a first blurring processing on the annotated object, and then judge the degree of recognition of the annotated object. If the annotated object can still be recognized, a second blurring processing is performed, and this process is repeated until the annotated object cannot be recognized. In the recognition, an object recognition algorithm can be used for recognition.
[0054] Considering that the Gaussian blur is a general image low-pass filter, it calculates the transformation coefficient of each pixel in the image by using a normal distribution, as shown in the following formula. Where (u, v) is the row and column pixel coordinates of the image, and σ is the standard deviation of the normal distribution.
[0055]
[0056] Unlike the traditional image denoising and smoothing requirements, this embodiment needs to perform deep blurring on the sensitive information image block so that the details of the blurred image cannot be recognized, and therefore directly applying the traditional Gaussian filter to the sensitive information block cannot achieve the ideal effect. Specifically, the blurring processing can be implemented by steps 4031 and 4032 in the following implementation mode:
[0057] Step 4031, determining the range of each blurring processing in the annotation box of the object.
[0058] In the blurring processing, the execution subject can first determine the range of each blurring processing in the annotation box of the object. Specifically, the execution subject can gradually reduce the range of each blurring processing, and the ratio between the ranges of adjacent two blurring processings can be fixed. For example, the range of each blurring processing is a concentric rectangular box, and the ratio of adjacent two rectangular boxes is 1.1. Specifically, a kernel can be used to determine the range of each blurring processing, that is, the center point of the convolution action does not change, but the action radius gradually decreases with the increase of the convolution times. In the formula, s i is the convolution action radius scaling factor corresponding to the i-th convolution operation, n is the total number of Gaussian convolution actions, l is the short side size of the sensitive information bounding box, and l min is the minimum bounding box short side threshold of the convolution action. As can be seen from the following formula, when i = 1, the convolution action range is the entire sensitive area, and when i = n, the convolution action range is the short side length equal to l minThe rectangular region. Since only a single Gaussian convolution is performed on the sensitive information boundary region, a smooth transition between the convolution result and the background can be guaranteed.
[0059]
[0060] Step 4032: Perform at least one fuzzing process within the defined range.
[0061] The executing entity may perform fuzzing on an object at least once within each defined range. During fuzzing, the executing entity may also determine the degree of fuzziness for that particular fuzzing operation.
[0062] In some optional implementations of this embodiment, step 4031 can be specifically implemented by... Figure 4 The following steps (not shown) are used to achieve this: determine the target rectangle for each blurring process within the annotation box; determine the largest inscribed ellipse within the target rectangle as the range for each blurring process.
[0063] In this implementation, the executing entity can determine the target rectangle for each blurring process within the annotation box of each object. This target rectangle can be concentric with the annotation box, and the target rectangle blurred each time is smaller than the target rectangle from the previous blurring process. That is, the target rectangle for the first blurring process is the largest. Then, the executing entity can determine the largest inscribed ellipse within the target rectangle as the range for each blurring process. When the annotated object is a face, this preserves more background information around the face, further improving the blurring effect.
[0064] In some optional implementations of this embodiment, the executing entity may determine the bounding box as the target rectangle for the first blurring process; and determine the target rectangle from the largest inscribed ellipse of the previous blurring process.
[0065] In this implementation, the executing entity can use the object's bounding box as the target rectangle for the first blurring process. Then, the largest inscribed ellipse of the bounding box is used as the range for the first blurring process. For the second blurring process, the executing entity can further determine the target rectangle from the largest inscribed ellipse. Then, the largest inscribed ellipse within the target rectangle is used as the range for the second blurring process. In some specific applications, the range for the final blurring process is smaller than a preset threshold.
[0066] Taking a face as an example for desensitization, faces in images mostly appear as approximately elliptical shapes. To preserve more background information around the face, this invention first calculates the maximum inscribed ellipse of the rectangular bounding box during convolution operations, and then masks the image based on the inscribed ellipse, such as... Figure 5 As shown, this ensures that the convolution operation only applies to the region inside the elliptical mask, further enhancing the blurring effect.Figure 5 The range in the first desensitization process is the outermost oval frame. The range in the second desensitization process is a rectangular frame within the largest oval frame, and the range in the third desensitization process is an oval frame within the above-mentioned rectangular frame. By analogy, until the desensitization number reaches a preset threshold, or the determined range reaches a preset threshold. At this time, the desensitization process is ended.
[0067] In some optional implementations of the embodiment, the step 4032 can be implemented by the following steps not shown in the figure: Figure 4 In the embodiment, the following steps not shown in the figure are implemented: determining the blur value of each blur process; and performing at least one blur process in the determined range according to the blur value.
[0068] In the embodiment, the execution subject can first determine the blur value of each blur process. Specifically, the execution subject can determine the blur value of each blur process according to the formula of Gaussian blur. Then, the execution subject can perform the blur process in the range of the blur process according to the above-mentioned blur value.
[0069] In some optional implementations of the embodiment, the method can further include the following steps: determining an adjusted bounding box according to the adjustment information; and retraining the object detection network according to the target image and the adjusted bounding box.
[0070] In the embodiment, the execution subject can output the bounding boxes of the objects to a preset technician to display in a visual form. The technician can adjust the bounding boxes. The adjustment information is input through a visual tool. The adjustment can include but is not limited to: local fine-tuning of the bounding box of an inaccurate detection bounding box; manually supplementing the missed private information; one-key deleting the misdetected private information; recording and automatically collecting related images for the above-mentioned adjustment, addition and deletion operations, and the like. The adjustment information can include the position, size, color and the like of the bounding box. The execution subject can determine an adjusted bounding box according to the adjustment information. Then, the execution subject can retrain the object detection network by taking the target image and the adjusted bounding box as training samples.
[0071] The method for processing an image provided by the above-mentioned embodiments of the disclosure can continuously apply a Gaussian convolution with different action ranges in the sensitive area for multiple times to achieve a deep blur effect, while ensuring a smooth transition between the blurred area and the surrounding background. The image after the blur processing cannot identify the person contained therein through image recognition, and the processed sensitive information image block and the surrounding background image transition naturally, and the visual effect is not conspicuous.
[0072] Further reference is made to Figure 6As an implementation of the method shown in the above figures, the present disclosure provides one embodiment of an apparatus for processing images, which corresponds to the method embodiment shown in Figure 2 The apparatus can be specifically applied to various electronic devices.
[0073] As shown in Figure 6 The apparatus 600 for processing images of the present embodiment includes an image acquisition unit 601, an object detection unit 602, and a desensitization processing unit 603.
[0074] The image acquisition unit 601 is configured to acquire a target image.
[0075] The object detection unit 602 is configured to perform object detection on the target image by using a pre-trained object detection network, and label the detected object by using a label box.
[0076] The object updating unit 603 is configured to, in response to receiving adjustment information for the label box, determine the labeled object according to the adjustment information.
[0077] The desensitization processing unit 604 is configured to perform desensitization processing on the labeled object.
[0078] In some optional implementations of the present embodiment, the image acquisition unit 601 can be further configured to acquire a street view image collected by a collection vehicle during driving as the target image.
[0079] In some optional implementations of the present embodiment, the desensitization processing unit 604 can be further configured to perform at least one blur processing on the labeled object.
[0080] In some optional implementations of the present embodiment, the desensitization processing unit 604 can be further configured to determine the range of each blur processing within the label box of the object, and perform at least one blur processing in the determined range respectively.
[0081] In some optional implementations of the present embodiment, the desensitization processing unit 604 can be further configured to determine a target rectangle at each blur processing within the label box, and determine a maximum inscribed ellipse in the target rectangle as the range of each blur processing.
[0082] In some optional implementations of the present embodiment, the desensitization processing unit 604 can be further configured to determine the label box as the target rectangle for the first blur processing, and determine the target rectangle from the maximum inscribed ellipse of the last blur processing.
[0083] In some optional implementation of the embodiment, the desensitization processing unit 604 can be further configured to: determine a blur value for each blur processing; and perform the at least one blur processing according to the blur value within the determined range.
[0084] In some optional implementation of the embodiment, the apparatus 600 can further comprise a training unit configured to: determine an adjusted bounding box according to the adjustment information; and retrain the object detection network according to the target image and the adjusted bounding box.
[0085] It should be understood that each unit in the apparatus 600 for processing an image corresponds to each step in the method described with reference to Figure 2 in the description. Therefore, the operations and features described above for the method for processing an image are equally applicable to the apparatus 600 and the units contained therein, and are not described here.
[0086] In the technical solutions of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in the technical solutions comply with relevant laws and regulations and do not violate public order and good customs.
[0087] According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0088] Figure 7 A block diagram of an electronic device 700 is shown that performs a method for processing an image according to embodiments of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit the implementations of the present disclosure described and / or claimed in this document.
[0089] As shown in Figure 7 The electronic device 700 includes a processor 701 that can perform various suitable actions and processes in accordance with computer programs stored in a read-only memory (ROM) 702 or computer programs loaded into a random access memory (RAM) 703 from the storage 708. Various programs and data used by the electronic device 700 can also be stored in the RAM 703 as needed. The processor 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An I / O interface (input / output interface) 705 is also connected to the bus 704.
[0090] A number of components in the electronic device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a magnetic disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the electronic device 700 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0091] The processor 701 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized 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 701 performs various methods and processes described above, such as the method for processing an image. For example, in some embodiments, the method for processing an image can be implemented as a computer software program tangibly embodied in a machine-readable storage medium, such as the storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded onto the RAM 703 and executed by the processor 701, one or more steps of the method for processing an image described above can be performed. Alternatively, in other embodiments, the processor 701 can be configured to perform the method for processing an image by any other appropriate means, such as by means of firmware.
[0092] Various implementations of the systems and techniques described above herein can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0093] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be encapsulated in a computer program product. These program codes or computer program products can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor 701, produces the functions / operations specified in the flowcharts and / or block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, and partially on a remote machine or entirely on a remote machine or server.
[0094] In the context of the present disclosure, a machine-readable storage medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable storage medium can be a machine-readable signal storage medium or a machine-readable storage medium. Machine-readable storage media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media can include, but are not limited to, an electrical connection based on one or more wires, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0095] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0096] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0097] The computer system can include clients and servers. This relationship can be. The servers are typically remote from the clients with the interactions typically taking place over a communication network. The relationship between a client and a server is one of client-server relationship. The server can be a cloud server, also known as cloud computing server or cloud host, which is a host product in the cloud computing service system. The server can also be a server of a distributed system or a server combined with a blockchain.
[0098] It should be understood that the various forms of flow shown above can be reordered, added to, or have steps deleted. For example, the steps recited in the present disclosure can be performed in parallel, in series, or in a different order, as long as the desired results of the technical solutions of the present disclosure are achieved, which are not limited herein.
[0099] The above detailed description does not constitute a limitation on the protection scope of the present disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present disclosure shall fall within the protection scope of the present disclosure.
Claims
1. A method for processing an image, comprising: obtaining a target image; performing object detection on the target image by using a pre-trained object detection network, and labeling the detected object by using a bounding box; in response to receiving adjustment information for the bounding box, determining the labeled object according to the adjustment information; determining a range for each of a plurality of blurring processes within the bounding box of the object, and performing blurring within the determined range, wherein the range for each of the plurality of blurring processes decreases successively, and the center point of the range for each of the plurality of blurring processes is the same.
2. The method of claim 1, wherein, The obtaining of the target image comprises: obtaining a street view image collected by a collection vehicle during driving as the target image.
3. The method of claim 1, wherein, The determining of the range for each of the plurality of blurring processes within the bounding box of the object comprises: determining a target rectangle for each of the plurality of blurring processes within the bounding box; determining a maximum inscribed ellipse in the target rectangle as the range for each of the plurality of blurring processes.
4. The method of claim 3, wherein, The determining of the target rectangle for each of the plurality of blurring processes within the bounding box comprises: determining the bounding box as the target rectangle for a first blurring process; and determining the target rectangle from a maximum inscribed ellipse of a previous blurring process.
5. The method of claim 1, wherein, The performing of blurring within the determined range comprises: determining a blurring value for the blurring; and performing at least one blurring within the determined range according to the blurring value.
6. The method according to any one of claims 1 to 5, wherein, The method further comprises: determining an adjusted bounding box according to the adjustment information; and retraining the object detection network according to the target image and the adjusted bounding box. 7.An apparatus for processing an image, comprising: an image obtaining unit configured to obtain a target image; an object detecting unit configured to perform object detection on the target image by using a pre-trained object detection network, and label the detected object by using a bounding box; an object updating unit configured to, in response to receiving adjustment information for the bounding box, determine the labeled object according to the adjustment information; and a desensitization processing unit configured to determine a range for each of a plurality of blurring processes within the bounding box of the object, and perform blurring within the determined range, wherein the range for each of the plurality of blurring processes decreases successively, and the center point of the range for each of the plurality of blurring processes is the same. 8.An electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6. 9.A non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1-6. 10.A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1-6.
Citation Information
Patent Citations
Image annotation method and terminal device
CN108573279A
Preserving privacy in surveillance
US20190068895A1