The present disclosure discloses a method, device, electronic device and storage medium for
image processing, which belongs to the field of image recognition technology, including: when a picture to be recognized is obtained, the picture to be recognized is input into a target
convolutional neural network (CNN) model, the target CNN
network model is obtained by training a first
training set, the target CNN
network model is used to identify whether the input picture is a sensitive picture, and the first
training set includes picture samples marked with whether it is a sensitive picture; when the target CNN
network model identifies the picture to be recognized as a sensitive picture, a
heat map of the picture to be recognized generated by the target CNN network model is obtained, and the
heat map of the picture to be recognized includes at least one sensitive
image area; the image in at least one sensitive
image area is desensitized to obtain an output picture. The
image processing method, device, electronic device and storage medium provided by the present disclosure are adopted to at least solve the problem of low quality of
information sharing in the existing picture sharing process.