CN112685762B - Image processing method and device with privacy protection function, electronic equipment and medium - Google Patents

Image processing method and device with privacy protection function, electronic equipment and medium Download PDF

Info

Publication number
CN112685762B
CN112685762B CN202110269930.7A CN202110269930A CN112685762B CN 112685762 B CN112685762 B CN 112685762B CN 202110269930 A CN202110269930 A CN 202110269930A CN 112685762 B CN112685762 B CN 112685762B
Authority
CN
China
Prior art keywords
image
segmentation
block
blocks
key
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110269930.7A
Other languages
Chinese (zh)
Other versions
CN112685762A (en
Inventor
周迪
徐爱华
贺正方
汪鹏君
章坚武
何斌
郭春生
沈润杰
吴震东
朱忠攀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN202110269930.7A priority Critical patent/CN112685762B/en
Publication of CN112685762A publication Critical patent/CN112685762A/en
Application granted granted Critical
Publication of CN112685762B publication Critical patent/CN112685762B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the application discloses an image processing method and device with privacy protection, electronic equipment and a medium. The method comprises the following steps: detecting key parts of a blocking object in an image to be processed; determining a segmentation mode according to the detection result of the key part; and carrying out segmentation processing on the segmentation areas in the segmentation objects by adopting the segmentation mode to obtain image segments, and carrying out distributed storage on the image segments. According to the scheme, the segmentation mode is dynamically and adaptively determined according to the key part of the blocking object, the safety of the characteristics of the image to be processed is improved, and the problem that the storage difficulty is increased due to excessive fine-grained blocking is solved.

Description

Image processing method and device with privacy protection function, electronic equipment and medium
Technical Field
The embodiment of the application relates to the technical field of artificial intelligence, in particular to an image processing method and device with privacy protection, an electronic device and a medium.
Background
The image may contain private content, for example, a face image relates to the identity privacy of the user. If the whole face image is directly stored in the node, the face image of the user can be leaked once the leak exists in the node and is broken.
At present, a way for protecting privacy data in a user image comprises data encryption, but encrypted data is difficult to utilize if not decrypted, and if decrypted, the risk of privacy disclosure still exists. The image privacy data of the user can also be protected by adopting a fragmentation method, wherein the fragmentation method is generally to preset a fixed slice size and then slice the image. If the slice is too small, the additional information for recording the fragment attribute occupies a larger area, and the effective storage space is influenced; if the slice is too large, the slice contains more image privacy data, resulting in leakage of the whole face.
Disclosure of Invention
The embodiment of the application provides an image processing method and device with privacy protection, an electronic device and a medium, so that a segmentation mode is determined according to key part adaptability, image security is guaranteed, and meanwhile storage space is effectively saved.
In one embodiment, an embodiment of the present application provides an image processing method with privacy protection, including: detecting key parts of a blocking object in an image to be processed;
determining a segmentation mode according to the detection result of the key part;
and carrying out segmentation processing on the segmentation areas in the segmentation objects by adopting the segmentation mode to obtain image segments, and carrying out distributed storage on the image segments.
In another embodiment, an embodiment of the present application further provides an image processing apparatus with privacy protection, including: the detection module is used for detecting key parts of the blocking objects in the image to be processed;
the segmentation mode determination module is used for determining a segmentation mode according to the detection result of the key part;
and the segmentation module is used for segmenting the segmentation areas in the segmentation objects by adopting the segmentation mode to obtain image segments and storing the image segments in a distributed manner.
In another embodiment, an embodiment of the present application further provides an electronic device, including: one or more processors; a memory for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors implement the image processing method with privacy protection according to any one of the embodiments of the present application.
In one embodiment, the present application further provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the image processing method with privacy protection as described in any one of the embodiments of the present application.
In the embodiment of the application, the key part detection is carried out on the blocking object in the image to be processed; determining a segmentation mode according to the detection result of the key part; the segmentation mode is adopted to segment the segmentation area in the segmentation object to obtain image segments, the image segments are stored in a distributed mode, the segmentation mode of the image is determined according to the adaptability of the key part, customized segmentation is carried out on each image to be processed, the problem that the image safety and the easy storage are difficult to take into account due to the fact that the appropriate segmentation granularity is difficult to determine is solved, and therefore the safety of the key part is guaranteed through dynamic adjustment of the cutting mode and the image segments are easy to store.
Drawings
FIG. 1 is a flowchart of an image processing method with privacy protection according to an embodiment of the present application;
FIG. 2 is a first schematic diagram of a segmentation method according to an embodiment of the present application;
FIG. 3 is a second schematic diagram of a segmentation method according to an embodiment of the present application;
FIG. 4 is a schematic diagram of key locations provided in an embodiment of the present application;
FIG. 5 is a schematic diagram of distributed storage according to an embodiment of the present application;
FIG. 6 is a flowchart of an image processing method with privacy protection according to another embodiment of the present application;
FIG. 7 is a schematic diagram of a segmentation trajectory according to another embodiment of the present application;
FIG. 8 is a flowchart of an image processing method with privacy protection according to another embodiment of the present application;
FIG. 9 is a schematic diagram of image segmentation according to yet another embodiment of the present application;
FIG. 10 is a flowchart of an image processing method with privacy protection according to yet another embodiment of the present application;
FIG. 11 is a block-merging schematic diagram of a target image according to yet another embodiment of the present application;
fig. 12 is a schematic structural diagram of an image processing apparatus with privacy protection according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of an electronic device according to an embodiment of the present application
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some of the structures related to the present application are shown in the drawings, not all of the structures.
Fig. 1 is a flowchart of an image processing method with privacy protection according to an embodiment of the present application. The image processing method with privacy protection provided by the embodiment of the application can be applied to the condition of segmenting and storing the image. Typically, the embodiment of the present application is applicable to the case where each to-be-processed image is segmented by dynamically adjusting the segmentation method to protect privacy. The method may be specifically performed by an image processing apparatus with privacy protection, which may be implemented by means of software and/or hardware, which may be integrated in an electronic device capable of implementing the image processing method with privacy protection. Referring to fig. 1, the method of the embodiment of the present application specifically includes:
and S110, detecting key parts of the blocking objects in the image to be processed.
The image to be processed may be an image collected by an image collector, or may be an image frame extracted from a video. The number of the images to be processed may be at least one, and each image to be processed is processed by using the image processing method with privacy protection in the embodiment of the present application. In the embodiment of the present application, the image to be processed may also refer to an I-frame image screened from a video, that is, a key frame image. I-frames, also known as intra pictures, are usually the first frames in a group of GOP pictures, and are moderately compressed, serving as randomly accessed reference points, to serve as pictures. As the complete image can be reconstructed only by using the data of the I frame during decoding, and the I frame is generated without referring to other pictures, the I frame is subjected to blocking processing so as to ensure the safety of the image to be processed.
The blocking object may be an object to which an image feature that needs to be protected belongs, such as a human object, a vehicle object, a building object, and the like. The blocking object can be obtained by detecting the image to be processed based on the target detection neural network. The blocking object may be a front character object, a side character object, or a back character object. The key parts may be image features in the blocking object that need to be heavily protected, such as eyes, nose, mouth, etc. of the human target. The blocking object and the key part can be adaptively determined according to actual conditions, for example, according to the image characteristics required to be protected by a user.
Specifically, the key parts are image features which need to be protected in a key mode, when an image to be processed is segmented, the key parts need to be prevented from being displayed in an image segmentation block obtained through segmentation intensively and sufficiently, and the image features of a segmentation object which need to be protected are prevented from being leaked. In the embodiment of the application, the key part detection is performed on the block object, so as to perform targeted segmentation on the image to be processed according to the key part.
And S120, determining a segmentation mode according to the detection result of the key part.
The detection result may be the number, position, size information, and the like of the key parts. The segmentation method may be the number of segmented image blocks, size information, the position, length, trajectory, etc. of the segmentation line.
The segmentation mode can be different according to different key part detection results. For example, if the number of the key parts is zero, a preset specific segmentation mode may be selected, for example, segmenting the segmentation object into 3 × 3 image segments. If the number of the key parts is one, the dividing manner for one key part may be determined, for example, the key part is divided into two or three. If the number of key locations is two or more, the segmentation for the two or more key locations may be determined, e.g. by segmenting each key location into different image patches. As shown in fig. 2, the key parts are eyes, nose, and mouth, and the block region in the block object is divided into 4 image blocks, and each key part is located in a different image block. As shown in fig. 3, the block area in the block target may be divided into 9 image blocks, and each key part may be located in a different image block.
At present, an image is segmented according to a fixed segmentation mode, if image blocks obtained by segmentation are too large, the image blocks contain more image features, and the risk of image feature leakage exists. According to the technical scheme, the segmentation mode can be determined adaptively according to the detection result of the key part, so that the segmentation mode can be suitable for segmenting the current image to be processed, the leakage of privacy data in the image is avoided, and more storage resources are prevented from being occupied by image blocks.
S130, the segmentation mode is adopted to segment the segmentation area in the segmentation object to obtain image blocks, and the image blocks are stored in a distributed mode.
The block area in the block object may be an image area where the block object is located, or may be a partial area of the block object, such as a face area of a human target. The partition method can be adopted to perform partition processing on the partition areas in the partition object in a targeted manner, so as to avoid the privacy in the partition areas from being revealed.
The process of determining the block area of the block object comprises the following steps: taking the image area where the blocking object is located as a blocking area; or extracting a head image region from the block object as a block region. For example, the whole block object may be used as a block area, and the block object may be divided into a plurality of image blocks, or a face image area including a key part may be extracted as a division area and divided into a plurality of image blocks, so as to specifically divide a portion including an image privacy feature, thereby ensuring the security of image privacy.
In the embodiment of the application, the image blocks are stored in a distributed mode, so that the storage safety of the image blocks is improved, and the problem that image information is leaked due to the fact that the image blocks are stored in one node and a bug exists in the node and is broken through is solved. The distributed storage mode can be hash storage, consistent hash with load, consistent hash with virtual node and the like.
In this embodiment of the present application, the partitioning the image into blocks for distributed storage includes: and storing the serial numbers of the image blocks, the position information of the image blocks in the image to be processed and the serial numbers of the images to be processed to which the image blocks belong, so as to obtain the image blocks according to the serial numbers of the image blocks, the position information of the image blocks in the image to be processed and the serial numbers of the images to be processed to which the image blocks belong, and splicing and restoring the image blocks to obtain the image to be processed.
For example, the to-be-processed image to which each image block belongs has an independent sequence number, which may be represented by Frame-x. Each image partition has position information located in the image to be processed, for example, the offset (x, y) of a specific pixel point in the image partition relative to the image to be processed may be provided, and the specific pixel point may be an upper left corner vertex, an upper right corner vertex, a lower left corner vertex, a lower right corner vertex, or the like of the image partition. As shown in fig. 4, the offset of the pixel point at the top left corner of the image partition a with respect to the pixel point of the whole image to be processed is (3, 3), and the offset of the pixel point at the top left corner of the image partition b with respect to the pixel point of the whole image to be processed is (5, 3). Each image tile has an independent sequence number, which can be denoted by patch-y. And when the image blocks are stored, storing the information of the image blocks so as to find the image blocks according to the information, splicing and restoring to obtain the image to be processed.
For example, the process of performing distributed storage according to the above information may be: taking consistent hash storage as an example, as shown in fig. 5, hash values are obtained for storage nodes in the storage system, and a hash ring is formed according to the hash values. And each image block obtained by segmenting the image to be processed in the image to be stored is used as a file, each non-segmented image in the image to be stored is used as a file, and the files are sent to all storage nodes in the storage system in batches according to a preset time interval and a hash function. The method comprises the steps of taking the serial numbers of image blocks, the position information of the image blocks in an image to be processed and the serial numbers of the image to be processed to which block objects belong as data keys, calculating the hash value of the data keys, searching storage nodes with hash values larger than the hash value of the data keys clockwise of a hash ring, and storing the data keys of the image blocks and the image blocks on the storage nodes, so that the storage safety of the image blocks is ensured, distributed storage and load balance of the storage nodes are realized, only the adjacent storage nodes in the hash ring are influenced when the storage nodes are added and deleted, and no influence is caused on other storage nodes.
In the embodiment of the application, the key part detection is carried out on the blocking object in the image to be processed; determining a segmentation mode according to the detection result of the key part; the segmentation mode is adopted to segment the segmentation area in the segmentation object to obtain image segments, the image segments are stored in a distributed mode, the segmentation mode of the image is determined according to the adaptability of the key part, customized segmentation is carried out on each image to be processed, the problem that the image safety and the easy storage are difficult to take into account due to the fact that the appropriate segmentation granularity is difficult to determine is solved, and therefore the safety of the key part is guaranteed through dynamic adjustment of the cutting mode and the image segments are easy to store.
Fig. 6 is a flowchart of an image processing method with privacy protection according to another embodiment of the present application. For further optimization of the embodiments, details which are not described in detail in the embodiments of the present application are described in the embodiments. Referring to fig. 6, an image processing method with privacy protection provided in an embodiment of the present application may include:
and S210, detecting key parts of the blocking objects in the image to be processed.
S220, determining a segmentation track according to the position of the key part in the block object.
For example, the position of the key portion in the block object may be the positions of all the pixels in the key portion in the block object. And determining a segmentation track according to the positions of all pixel points in the key part in the block object. For example, a range that includes all pixel points of a single key part can be drawn, and the edge of the range is used as a segmentation track of the image block corresponding to the key part. And respectively determining the segmentation track of the image blocks corresponding to the single key part aiming at each key part, so that different key parts are positioned in different image blocks after segmentation is carried out through the segmentation track.
In an embodiment of the present application, determining a segmentation trajectory according to a position of the key portion in the segmented object includes: determining the minimum block to which each key part belongs according to the position of the key part in the block object; and determining a segmentation track according to the minimum block to which each key part belongs.
The minimum block may be a block including all pixel points of the key portion, for example, may be a circumscribed graphic region of the key portion, and the specific form of the circumscribed graphic region is not particularly limited, and may be, for example, a circle, a polygon, an irregular graphic, and the like. And determining a segmentation track according to the minimum block to which each key part belongs, and segmenting each key part through the segmentation track so as to enable different key parts to belong to different image blocks. The technical scheme has the advantages that the region where each key part is located can be clearly determined according to the minimum block to which each key part belongs, and then the segmentation track is determined so as to segment each key part into different image blocks, and the safety of the image features of the blocking object is guaranteed.
In this embodiment of the present application, determining a segmentation trajectory according to a minimum partition to which each of the key portions belongs includes: and setting a segmentation track in the area between the minimum blocks to which the key parts belong so as to segment the key parts into different image blocks.
For example, for the minimum block to which any one of the key parts belongs, other minimum blocks adjacent to the minimum block are traversed, and a segmentation track is set in an image region between the minimum block and the other adjacent minimum blocks. As shown in fig. 7, the key portions are two eyes, a nose and a mouth, the minimum block to which the key portion belongs is the rectangle in which each key portion in fig. 7 is located, and a segmentation track, i.e., a dotted line, is arranged between two adjacent rectangles to segment each key portion into different image blocks, so that the safety of the whole face information is ensured, and the whole face is prevented from being identified and leaked. According to the scheme, the segmentation track is arranged in the area between the minimum blocks, so that each key part is guaranteed to be segmented into different image blocks, the safety of the image is improved, the problem that information leakage is caused when the image blocks comprise too many image features during random segmentation is avoided, and the phenomenon that the image blocks are too small and too much amount occupies a large storage space and is not easy to store is avoided.
And S230, according to the segmentation track, carrying out segmentation processing on the block area to obtain image blocks.
Illustratively, the segmentation processing is carried out on the block areas according to the segmentation tracks, so that the segmentation tracks are dynamically determined according to the positions of the key parts for segmentation, and the adaptive segmentation can be carried out on the key parts which are distributed at different positions, so that the safety of image information is ensured, and excessive fragmentation segmentation is avoided.
And S240, storing the image blocks in a distributed manner.
According to the scheme in the embodiment of the application, the segmentation track is determined according to the position of the key part in the segmentation object, the position of the key part in the segmentation object is combined in a refined mode, and the segmentation is carried out on the segmentation area of the segmentation object, so that the key part is protected in a targeted mode, and the safety of image information is improved.
Fig. 8 is a flowchart of an image processing method with privacy protection according to yet another embodiment of the present application. In order to further optimize the embodiments, an implementation situation in practical application is specifically given, and details which are not described in detail in the embodiments of the present application are referred to in the embodiments. Referring to fig. 8, an image processing method with privacy protection provided in an embodiment of the present application may include:
s310, detecting key parts of the blocking objects in the image to be processed, wherein the key parts can comprise eyes.
Illustratively, as shown in fig. 9, three blocking objects, a front human figure object, a side human figure object, and a back human figure object, are detected in the image to be processed. For each block object, the number of eyes therein is detected.
S320, if the number of the eyes is one, the face of the block object is segmented into three image blocks along the direction from the top of the head to the lower jaw of the block object.
As shown in fig. 9, if only one eye is detected for one block object, it is determined that the block object is a lateral human target. At this time, the face of the human target is displayed as a side face, and in order to segment key parts on the side face, that is, glasses, a nose, and a mouth, the face of the blocking object can be segmented into three image blocks in a direction from the vertex to the chin of the blocking object. As shown in fig. 9, the face of the human target on the side is divided into three image blocks with two horizontal division lines. In the segmentation, since the segmentation line can be extended, the segmentation can be applied to the image to be processed where the blocking object is located, the whole image to be processed can be segmented into a plurality of image blocks, and the facial image can also be extracted and segmented. The segmentation may be performed in three equal parts, or the size of the segmented image blocks may be determined based on the size information of the key part.
S330, if the number of the eyes is two or zero, the face of the block object is divided into three first direction blocks along the direction from the top of the head to the lower jaw of the block object, and each first direction block is divided into three second direction blocks along the vertical direction from the top of the head to the lower jaw of the block object, so that nine image blocks are obtained.
For example, if the number of eyes is detected to be two or zero for one blocking object, it is determined that the blocking object is a human target on the front side or a human target on the back side. For the front human target and the back human target, the face of the blocking object can be divided into three first direction blocks by two dividing lines along the direction from the top of the head to the lower jaw of the blocking object, and then each first direction block is divided into three second direction blocks along the vertical direction from the top of the head to the lower jaw of the blocking object, so as to obtain nine image blocks. As shown in fig. 9, for a positive human target, the face of the blocking object is divided into three parts by two horizontal dividing lines, and is divided again by two vertical dividing lines after the previous division, so that nine image blocks are obtained. The segmentation in each direction may be equally or unequally divided, and the size of the segmentation range may be adaptively determined according to the size information of each key part, so that different key parts are located in different image blocks. For example, if the lateral width of the eyes is large and the lateral width of the nose is small, the width of the second-direction block located in the middle of the three second-direction blocks may be small, and the widths of the other two second-direction blocks may be large, thereby ensuring that both eyes and one nose are divided into different image blocks. Similarly, when segmenting, because the segmentation line can be extended, the segmentation can be applied to the image to be processed where the blocking object is located, the whole image to be processed can be segmented into a plurality of image blocks, and the facial image can also be extracted and segmented.
And S340, storing the image blocks in a distributed manner.
According to the technical scheme, for each image to be processed, the segmentation granularity can be dynamically adjusted according to the number and the position adaptability of the key parts, different key parts of the face are guaranteed to belong to different image blocks, the identity of a user cannot be identified from a single image block, the maximization of the segmentation size is guaranteed, and the situation that the storage difficulty is increased and the storage space is consumed due to the fact that the image blocks are too finely divided is avoided.
Fig. 10 is a flowchart of an image processing method with privacy protection according to another embodiment of the present application. For further optimization of the embodiments, details which are not described in detail in the embodiments of the present application are described in the embodiments. Referring to fig. 10, an image processing method with privacy protection provided in an embodiment of the present application may include:
and S410, detecting key parts of the blocking objects in the image to be processed.
In the embodiment of the present application, the detecting a key part of a blocking object in an image to be processed includes: performing key part detection on the block objects based on a target detection neural network; the target detection neural network is obtained by training a preset key part and characteristic information as training samples; for the detected key parts, determining the positions of the key parts in the block objects and the number of the key parts.
The target detection neural network can be RCNN, Fast-RCNN, Mask-RCNN, YOLO, SSD and other neural networks. The preset key parts can be set according to actual conditions, for example, the blocking object is an object target, the preset key parts can be set to be eyes, a nose and a mouth, and if the blocking object is an automobile, the preset key parts can be set to be windows, lamps, license plates and the like. And training the preset key parts and the characteristic information of the preset key parts as training samples to obtain a target detection neural network, so that the key parts of the block objects of the image to be processed are detected based on the target detection neural network, and the key parts in the block objects are determined. The information for specifying the key part by detecting the key part may be, for example, the number of key parts, the position of the key part in the block object, size information, or the like.
And S420, determining a segmentation mode according to the detection result of the key part.
And S430, carrying out segmentation processing on the segmentation areas in the segmentation objects by adopting the segmentation mode to obtain image segments.
S440, searching adjacent target image blocks aiming at the target image blocks which do not comprise the key parts in the image blocks.
For example, the image block may be identified, whether a key part is included in the image block is determined, and if the key part is not included, the image block is taken as a target image block for subsequent processing. In the segmentation process, a row-column seat label is set according to the position of each image block, the first image block seat label at the upper left corner is (0, 0), the column coordinates of each image block increase sequentially towards the right, and the row coordinates of each image block increase sequentially towards the bottom, for example, the image block seat label at the 1 st row and the 5 th column is (0, 4), and the image block seat label at the 2 nd row and the 5 th column is (1, 4). Image patches containing key sites are marked. And taking the unmarked image blocks as target image blocks and carrying out subsequent processing.
Specifically, the target image blocks are traversed, and adjacent target image blocks are determined. For example, as shown in fig. 11, if the target image partition 1 and the target image partition 2 are adjacent target image partitions, the target image partition 2 and the target image partition 3 are adjacent target image partitions, and the target image partition 4 is not adjacent to another target image partition, the target image partition 1 and the target image partition 2, and the target image partition 3 are processed in this embodiment.
S450, if the adjacent side lengths of the adjacent target image blocks are equal, combining the adjacent target image blocks into one image block.
For example, as shown in fig. 11, if the adjacent side lengths of the target image block 1 and the target image block 2 are equal, the target image block 1 and the target image block 2 are merged into one image block. The adjacent side lengths of the target image block 2 and the target image block 3 are not equal, and the adjacent side length of the target image block 2 is smaller than the adjacent side length of the target image block 3, so that the target image block 2 and the target image block 3 are not merged, and the merged image block is ensured to be a regular graph, for example, the image block obtained by merging the target image block 1 and the target image block 2 in fig. 11 is still rectangular, and is easy to store, manage and splice.
For example, the steps S440-S450 may be continuously and circularly performed on the image blocks obtained after merging until the target image blocks meeting the condition are all merged, or the edge of the image to be processed is traversed.
And S460, storing the image in a distributed mode in a blocking mode.
According to the scheme in the embodiment of the application, the image blocks not including the key parts are combined, so that integration of non-key image blocks is realized, the problem that the number of the image blocks is large, storage resources are consumed, the splicing and restoring efficiency can be improved, and the adaptive segmentation of the image to be processed is realized.
Fig. 12 is a schematic structural diagram of an image processing apparatus with privacy protection according to an embodiment of the present application. The device is suitable for the case of segmenting and storing the image. Typically, the embodiment of the present application is applicable to a case where the to-be-processed image is dynamically adjusted and divided to protect privacy. The apparatus may be implemented by software and/or hardware, and the apparatus may be integrated in an electronic device. Referring to fig. 12, the apparatus specifically includes:
a detection module 510, configured to perform key part detection on a blocking object in an image to be processed;
a segmentation mode determination module 520, configured to determine a segmentation mode according to the detection result of the key portion;
the segmentation module 530 is configured to perform segmentation processing on the segmentation areas in the segmentation objects by using the segmentation method to obtain image segments, and perform distributed storage on the image segments.
In this embodiment of the present application, the segmentation mode determining module 520 includes:
a segmentation track determining unit, configured to determine a segmentation track according to a position of the key portion in the block object;
accordingly, the segmentation module 530 includes:
and the image block determining unit is used for carrying out segmentation processing on the block areas according to the segmentation tracks to obtain image blocks.
In an embodiment of the present application, the segmentation track determining unit is specifically configured to:
determining the minimum block to which each key part belongs according to the position of the key part in the block object;
and determining a segmentation track according to the minimum block to which each key part belongs.
In an embodiment of the present application, the segmentation track determining unit is specifically configured to:
and setting a segmentation track in the area between the minimum blocks to which the key parts belong so as to segment the key parts into different image blocks.
In an embodiment of the application, the critical part comprises an eye;
accordingly, the segmentation mode determination module 520 includes:
a first segmentation manner determination unit configured to segment a face of a segmented object into three image segments in a direction from a vertex to a mandible of the segmented object if the number of eyes is one;
and a second segmentation mode determination unit, configured to segment the face of the segmented object into three first-direction segments along a direction from the vertex to the mandible of the segmented object if the number of the eyes is two or zero, and segment each first-direction segment into three second-direction segments along a vertical direction from the vertex to the mandible of the segmented object, so as to obtain nine image segments.
In an embodiment of the present application, the apparatus further includes:
a first blocking area determining module, configured to use an image area where the blocking object is located as a blocking area; alternatively, the first and second electrodes may be,
and the second block area determining module is used for extracting a head image area from the block object to be used as a block area.
In an embodiment of the present application, the apparatus further includes:
the adjacent block searching module is used for searching adjacent target image blocks aiming at the target image blocks which do not comprise the key parts in the image blocks;
and the merging module is used for merging the adjacent target image blocks into one image block if the adjacent side lengths of the adjacent target image blocks are equal.
In this embodiment, the detecting module 510 includes:
a key part detection unit, configured to perform key part detection on the segmented object based on a target detection neural network; the target detection neural network is obtained by training a preset key part and characteristic information as training samples;
an information determining unit, configured to determine, for the detected key parts, positions of the key parts in the blocking object and the number of the key parts.
In an embodiment of the present application, the segmentation module 530 includes:
and the storage unit is used for storing the serial numbers of the image blocks, the position information of the image blocks in the image to be processed and the serial numbers of the images to be processed to which the image blocks belong, so as to obtain the image blocks according to the serial numbers of the image blocks, the position information of the image blocks in the image to be processed and the serial numbers of the images to be processed to which the image blocks belong, and splicing and restoring the image blocks to obtain the image to be processed.
The image processing device with privacy protection, which is provided by the embodiment of the application, can execute the image processing method with privacy protection provided by any embodiment of the application, and has corresponding functional modules and beneficial effects of the execution method.
Fig. 13 is a schematic structural diagram of an electronic device according to an embodiment of the present application. FIG. 13 illustrates a block diagram of an exemplary electronic device 612 suitable for use in implementing embodiments of the present application. The electronic device 612 shown in fig. 13 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 13, the electronic device 612 may include: one or more processors 616; a memory 628 for storing one or more programs, which when executed by the one or more processors 616, enable the one or more processors 616 to implement the image processing method with privacy protection provided by the embodiment of the present application, including:
detecting key parts of a blocking object in an image to be processed;
determining a segmentation mode according to the detection result of the key part;
and carrying out segmentation processing on the segmentation areas in the segmentation objects by adopting the segmentation mode to obtain image segments, and carrying out distributed storage on the image segments.
The components of the electronic device 612 may include, but are not limited to: one or more processors 616, a memory 628, and a bus 618 that connects the various device components (including the memory 628 and the processors 616).
Bus 618 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, transaction ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
The electronic device 612 typically includes a variety of computer device-readable storage media. These storage media may be any available storage media that can be accessed by the electronic device 612 and includes both volatile and nonvolatile storage media, removable and non-removable storage media.
The memory 628 may include computer device readable storage media in the form of volatile memory, such as Random Access Memory (RAM) 630 and/or cache memory 632. The electronic device 612 may further include other removable/non-removable, volatile/nonvolatile computer device storage media. By way of example only, storage system 634 may be used to read from and write to non-removable, nonvolatile magnetic storage media (not shown in FIG. 13, commonly referred to as a "hard drive"). Although not shown in FIG. 13, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical storage medium) may be provided. In such cases, each drive may be connected to bus 618 by one or more data storage media interfaces. Memory 628 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the application.
A program/utility 640 having a set (at least one) of program modules 642 may be stored, for example, in memory 628, such program modules 642 including, but not limited to, an operating device, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. The program modules 642 generally perform the functions and/or methods of the embodiments described herein.
The electronic device 612 may also communicate with one or more external devices 614 and/or a display 624, one or more devices that enable a user to interact with the electronic device 612, and/or any device (e.g., a network card, a modem, etc.) that enables the electronic device 612 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 622. Also, the electronic device 612 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 620. As shown in FIG. 13, the network adapter 620 communicates with the other modules of the electronic device 612 via the bus 618. It should be appreciated that although not shown in FIG. 13, other hardware and/or software modules may be used in conjunction with the electronic device 612, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID devices, tape drives, and data backup storage devices, among others.
The processor 616 executes various functional applications and data processing by executing at least one of other programs of the programs stored in the memory 628, for example, to implement an image processing method with privacy protection provided by the embodiment of the present application.
One embodiment of the present application provides a storage medium containing computer-executable instructions that, when executed by a computer processor, perform a method of image processing with privacy protection, comprising:
detecting key parts of a blocking object in an image to be processed;
determining a segmentation mode according to the detection result of the key part;
and carrying out segmentation processing on the segmentation areas in the segmentation objects by adopting the segmentation mode to obtain image segments, and carrying out distributed storage on the image segments.
The computer storage media of the embodiments of the present application may take any combination of one or more computer-readable storage media. The computer readable storage medium may be a computer readable signal storage medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor device, apparatus, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, 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. In embodiments of the present application, a computer readable storage medium may be any tangible storage medium that can contain, or store a program for use by or in connection with an instruction execution apparatus, device, or apparatus.
A computer readable signal storage medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal storage medium may also be any computer readable storage medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution apparatus, device, or apparatus.
Program code embodied on a computer readable storage medium may be transmitted using any appropriate storage medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or device. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present application and the technical principles employed. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims (9)

1. An image processing method with privacy protection, the method comprising:
detecting key parts of a blocking object in an image to be processed;
determining a segmentation mode according to the detection result of the key part;
the segmentation mode is adopted to segment the block areas in the block objects to obtain image blocks, and the image blocks are stored in a distributed mode so that the image blocks are stored in different storage nodes and are prevented from being stored in one storage node; wherein the content of the first and second substances,
the determining a segmentation mode according to the detection result of the key part comprises:
determining a segmentation track according to the position of the key part in the block object;
correspondingly, the process of segmenting the block region in the block object by adopting the segmentation mode comprises the following steps:
according to the segmentation track, carrying out segmentation processing on the block area to obtain image blocks; wherein the content of the first and second substances,
determining a segmentation track according to the position of the key part in the block object, including:
determining the minimum block to which each key part belongs according to the position of the key part in the block object;
determining a segmentation track according to the minimum blocks to which the key parts belong; wherein, the first and the second end of the pipe are connected with each other,
determining a segmentation track according to the minimum block to which each key part belongs, wherein the determination comprises the following steps:
and setting a segmentation track in the area between the minimum blocks to which the key parts belong so as to segment the key parts into different image blocks.
2. The method of claim 1, wherein the critical sites comprise eyes;
correspondingly, according to the detection result of the key part, determining a segmentation mode comprises the following steps:
if the number of eyes is one, segmenting a face for a segmented object into three image segments along a vertex-to-mandible direction of the segmented object;
if the number of the eyes is two, the face of the block object is divided into three first direction blocks along the direction from the top of the head to the lower jaw of the block object, and each first direction block is divided into three second direction blocks along the vertical direction from the top of the head to the lower jaw of the block object, so that nine image blocks are obtained.
3. The method of claim 1, wherein the determining of the blocking area of the blocking object comprises:
taking the image area where the blocking object is located as a blocking area; alternatively, the first and second electrodes may be,
and extracting a head image area from the block object to be used as a block area.
4. The method according to claim 1, wherein after segmenting the segmented object into image segments according to the information of the key parts, the method further comprises:
searching adjacent target image blocks aiming at the target image blocks which do not comprise the key part in the image blocks;
and if the adjacent side lengths of the adjacent target image blocks are equal, combining the adjacent target image blocks into one image block.
5. The method according to any one of claims 1-4, wherein performing key region detection on a blocking object in an image to be processed comprises:
performing key part detection on the block objects based on a target detection neural network; the target detection neural network is obtained by training a preset key part and characteristic information as training samples;
for the detected key parts, determining the positions of the key parts in the block objects and the number of the key parts.
6. The method of any of claims 1-4, wherein the storing the image patches in a distributed manner comprises:
and storing the serial numbers of the image blocks, the position information of the image blocks in the image to be processed and the serial numbers of the images to be processed to which the image blocks belong, so as to obtain the image blocks according to the serial numbers of the image blocks, the position information of the image blocks in the image to be processed and the serial numbers of the images to be processed to which the image blocks belong, and splicing and restoring the image blocks to obtain the image to be processed.
7. An image processing apparatus with privacy protection, characterized in that the apparatus comprises:
the detection module is used for detecting key parts of the blocking objects in the image to be processed;
the segmentation mode determination module is used for determining a segmentation mode according to the detection result of the key part;
the segmentation module is used for segmenting the segmented area in the segmented object by adopting the segmentation mode to obtain image segments, and storing the image segments in a distributed manner so as to store the image segments in different storage nodes and avoid the image segments from being stored in one storage node; wherein the content of the first and second substances,
the determining a segmentation mode according to the detection result of the key part comprises:
determining a segmentation track according to the position of the key part in the block object;
correspondingly, the process of segmenting the block region in the block object by adopting the segmentation mode comprises the following steps:
according to the segmentation track, carrying out segmentation processing on the block area to obtain image blocks; wherein, the first and the second end of the pipe are connected with each other,
determining a segmentation track according to the position of the key part in the block object, including:
determining the minimum blocks to which the key parts belong according to the positions of the key parts in the block objects;
determining a segmentation track according to the minimum blocks to which the key parts belong; wherein the content of the first and second substances,
determining a segmentation track according to the minimum block to which each key part belongs, wherein the determination comprises the following steps:
and setting a segmentation track in the area between the minimum blocks to which the key parts belong so as to segment the key parts into different image blocks.
8. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the image processing method with privacy protection of any one of claims 1-6.
9. A computer-readable storage medium on which a computer program is stored, which program, when executed by a processor, carries out the image processing method with privacy protection of any one of claims 1 to 6.
CN202110269930.7A 2021-03-12 2021-03-12 Image processing method and device with privacy protection function, electronic equipment and medium Active CN112685762B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110269930.7A CN112685762B (en) 2021-03-12 2021-03-12 Image processing method and device with privacy protection function, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110269930.7A CN112685762B (en) 2021-03-12 2021-03-12 Image processing method and device with privacy protection function, electronic equipment and medium

Publications (2)

Publication Number Publication Date
CN112685762A CN112685762A (en) 2021-04-20
CN112685762B true CN112685762B (en) 2022-05-10

Family

ID=75455510

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110269930.7A Active CN112685762B (en) 2021-03-12 2021-03-12 Image processing method and device with privacy protection function, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN112685762B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112653713A (en) * 2021-01-22 2021-04-13 深圳市房多多网络科技有限公司 Image downloading protection method and device and computing equipment
CN116501904B (en) * 2023-06-28 2023-09-22 中国人民解放军总医院 Distributed storage method, device, equipment and medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106453385B (en) * 2016-11-01 2019-07-26 西安电子科技大学 Fine granularity face method for secret protection in a kind of social networks
US10607484B2 (en) * 2017-12-28 2020-03-31 Intel Corporation Privacy-preserving distributed visual data processing
CN111563837B (en) * 2020-07-16 2020-11-10 浙江宇视科技有限公司 Image processing system and method

Also Published As

Publication number Publication date
CN112685762A (en) 2021-04-20

Similar Documents

Publication Publication Date Title
CN112685762B (en) Image processing method and device with privacy protection function, electronic equipment and medium
US9852289B1 (en) Systems and methods for protecting files from malicious encryption attempts
CN111262701B (en) Replay attack detection method, system, equipment and storage medium
US10235304B2 (en) Multi-crypto-color-group VM/enclave memory integrity method and apparatus
CN111402120B (en) Labeling image processing method and device
US11316925B2 (en) Video data storage method and device in cloud storage system
CN108229190B (en) Transparent encryption and decryption control method, device, program, storage medium and electronic equipment
US10466924B1 (en) Systems and methods for generating memory images of computing devices
US10209905B2 (en) Reusing storage blocks of a file system
CN111310134A (en) Screen watermark generation method, device and equipment
EP3989227A1 (en) Systems and methods for producing a privacy-protected video clip
CN112839227B (en) Image coding method, device, equipment and medium
US11019496B2 (en) Method and electronic device for identifying a pseudo wireless access point
CN111475779B (en) Image processing method, device, equipment and storage medium
CN111556339B (en) Video information privacy protection system and method based on sensitive information measurement
US11347849B2 (en) Ransomware detection and prevention
US9647846B1 (en) Systems and methods for verifying the authenticity of graphical images
CN114356475A (en) Display processing method, device, equipment and storage medium
CN105975860A (en) Trust file management method, device and equipment
CN110888682A (en) Display method and device and electronic equipment
CN112584236B (en) Image erasing method and device, electronic equipment and storage medium
CN113449542B (en) Face-changing identification method, device, equipment and medium
KR20200069111A (en) Method and apparatus for verifying control-flow integrity of virtual machine kernel
CN114707126B (en) Network disk document watermark adding method and device, network disk and storage medium
CN110223369B (en) Frame buffer write-back method and device of TBR architecture and computer storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant