WO2020155713A1 - 图像处理方法及装置、网络训练方法及装置 - Google Patents

图像处理方法及装置、网络训练方法及装置 Download PDF

Info

Publication number
WO2020155713A1
WO2020155713A1 PCT/CN2019/114769 CN2019114769W WO2020155713A1 WO 2020155713 A1 WO2020155713 A1 WO 2020155713A1 CN 2019114769 W CN2019114769 W CN 2019114769W WO 2020155713 A1 WO2020155713 A1 WO 2020155713A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
processed
motion
target object
guide
Prior art date
Application number
PCT/CN2019/114769
Other languages
English (en)
French (fr)
Inventor
詹晓航
潘新钢
刘子纬
林达华
吕健勤
Original Assignee
北京市商汤科技开发有限公司
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 北京市商汤科技开发有限公司 filed Critical 北京市商汤科技开发有限公司
Priority to SG11202105631YA priority Critical patent/SG11202105631YA/en
Priority to JP2021524161A priority patent/JP2022506637A/ja
Publication of WO2020155713A1 publication Critical patent/WO2020155713A1/zh
Priority to US17/329,534 priority patent/US20210279892A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/20Movements or behaviour, e.g. gesture recognition
    • G06V40/23Recognition of whole body movements, e.g. for sport training
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • G06F18/253Fusion techniques of extracted features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • G06F18/254Fusion techniques of classification results, e.g. of results related to same input data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/246Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/255Detecting or recognising potential candidate objects based on visual cues, e.g. shapes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • G06V10/443Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components by matching or filtering
    • G06V10/449Biologically inspired filters, e.g. difference of Gaussians [DoG] or Gabor filters
    • G06V10/451Biologically inspired filters, e.g. difference of Gaussians [DoG] or Gabor filters with interaction between the filter responses, e.g. cortical complex cells
    • G06V10/454Integrating the filters into a hierarchical structure, e.g. convolutional neural networks [CNN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/80Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level
    • G06V10/809Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level of classification results, e.g. where the classifiers operate on the same input data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]

Definitions

  • the present disclosure relates to the field of image processing technology, and in particular to an image processing method and device, and a network training method and device.
  • intelligent systems can simulate humans to learn the motion characteristics of objects from the motion of objects, so as to realize high-level vision tasks such as object detection and segmentation through the learned motion characteristics.
  • the present disclosure proposes an image processing method and device, a network training method and device technical solution.
  • an image processing method including:
  • the guide group includes at least one guide point, the guide point is used to indicate the position of the sampling pixel, the size and direction of the movement speed of the sampling pixel ;
  • the sampling pixels are the pixels of the target object in the image to be processed;
  • the performing optical flow prediction based on the guide points in the guide group and the image to be processed to obtain the motion of the target object in the image to be processed includes:
  • the positions of the sampling pixels indicated by the guiding points in the guiding group, and the image to be processed Stream prediction obtains the motion of the target object in the image to be processed.
  • the performing optical flow prediction based on the guide points in the guide group and the image to be processed to obtain the motion of the target object in the image to be processed includes:
  • the sparse motion corresponding to the target object in the image to be processed is generated according to the size and direction of the motion speed of the sampling pixels indicated by the guide point in the guidance group, and the sparse motion is used to indicate each of the target objects.
  • performing optical flow prediction based on the guide points in the guide group and the image to be processed to obtain the motion of the target object in the image to be processed includes:
  • the guiding points and the image to be processed in the guiding group are input to a first neural network to perform optical flow prediction to obtain the motion of the target object in the image to be processed.
  • performing optical flow prediction according to the sparse motion, the binary mask, and the image to be processed to obtain the motion of the target object in the image to be processed includes:
  • the performing optical flow prediction on the third feature to obtain the motion of the target object in the image to be processed includes:
  • the propagation results corresponding to the respective propagation networks are input into the fusion network for fusion processing to obtain the motion of the target object in the image to be processed.
  • the determining the guide group set for the target object on the image to be processed includes:
  • the performing optical flow prediction based on the guide points in the guide group and the image to be processed to obtain the motion of the target object in the image to be processed includes:
  • the method further includes:
  • a video is generated according to the image to be processed and the new image corresponding to each guide group.
  • determining the guidance group set for the target object on the image to be processed includes:
  • a plurality of guide groups are generated according to the at least one first guide point, the directions of the first guide points in the same guide group are the same, and the directions of the first guide points in different guide groups are different.
  • performing optical flow prediction based on the guide points in the guide group and the image to be processed to obtain the motion of the target object in the image to be processed includes:
  • the method further includes:
  • the corresponding motions of the first target object in the image to be processed are fused under the guidance of each guidance group to obtain a mask corresponding to the first target object in the image to be processed.
  • the method further includes:
  • the optical flow prediction is performed in turn according to the first guiding point and the to-be-processed image in each guidance group to obtain that the first target object in the to-be-processed image is guided by each guidance group
  • the corresponding sports include:
  • the optical flow prediction is performed to obtain that the first target object in the image to be processed is in each guide group Under the guidance of the corresponding movement.
  • a network training method including:
  • the first sample group includes a to-be-processed image sample and a first motion corresponding to a target object in the to-be-processed image sample;
  • the parameters of the first neural network are adjusted.
  • the first neural network is a conditional motion propagation network.
  • the performing sampling processing on the first motion to obtain the sparse motion and binary mask corresponding to the target object in the image sample to be processed includes:
  • an image processing apparatus including:
  • the first determining module is configured to determine a guide group set for the target object on the image to be processed, the guide group includes at least one guide point, and the guide point is used to indicate the position of the sampling pixel and the sampling pixel
  • the magnitude and direction of the movement speed; the sampling pixels are the pixels of the target object in the image to be processed;
  • the prediction module is configured to perform optical flow prediction according to the guide points in the guide group and the image to be processed to obtain the motion of the target object in the image to be processed.
  • the prediction module is further used for:
  • the positions of the sampling pixels indicated by the guiding points in the guiding group, and the image to be processed Stream prediction obtains the motion of the target object in the image to be processed.
  • the prediction module is further used for:
  • the sparse motion corresponding to the target object in the image to be processed is generated according to the size and direction of the motion speed of the sampling pixels indicated by the guide point in the guidance group, and the sparse motion is used to indicate each of the target objects.
  • the prediction module is further used for:
  • the guiding points and the image to be processed in the guiding group are input to a first neural network to perform optical flow prediction to obtain the motion of the target object in the image to be processed.
  • the prediction module includes:
  • a sparse motion coding module configured to perform feature extraction on the sparse motion and binary mask corresponding to the target object in the image to be processed to obtain the first feature
  • An image encoding module configured to perform feature extraction on the image to be processed to obtain a second feature
  • the connecting module is used to connect the first feature and the second feature to obtain a third feature
  • the dense motion decoding module is used to perform optical flow prediction on the third feature to obtain the motion of the target object in the image to be processed.
  • the dense motion decoding module is also used to:
  • the propagation results corresponding to the various propagation networks are input into the fusion network for fusion processing to obtain the motion of the target object in the image to be processed.
  • the first determining module is further configured to:
  • the prediction module is further used to:
  • the device further includes:
  • a mapping module configured to map the to-be-processed image according to the corresponding motion of the target object under the guidance of each guidance group to obtain a new image corresponding to each guidance group;
  • the video generation module is used to generate a video according to the image to be processed and the new image corresponding to each guide group.
  • the first determining module is further configured to:
  • a plurality of guide groups are generated according to the at least one first guide point, the directions of the first guide points in the same guide group are the same, and the directions of the first guide points in different guide groups are different.
  • the prediction module is further used to:
  • the device further includes:
  • the fusion module is used for fusing the corresponding motions of the first target object in the image to be processed under the guidance of each guidance group to obtain a mask corresponding to the first target object in the image to be processed.
  • the device further includes:
  • the second determining module is configured to determine at least one second guiding point set on the image to be processed, wherein the movement speed of the second guiding point is 0;
  • the prediction module is also used for:
  • a network training method and the device includes:
  • An acquiring module configured to acquire a first sample group, the first sample group including a to-be-processed image sample and a first motion corresponding to a target object in the to-be-processed image sample;
  • a processing module configured to perform sampling processing on the first motion to obtain a sparse motion and a binary mask corresponding to the target object in the image sample to be processed;
  • the prediction module is used to input the sparse motion corresponding to the target object in the to-be-processed image sample, the binary mask, and the to-be-processed image sample into the first neural network for optical flow prediction, to obtain the to-be-processed image sample The second movement corresponding to the target object in the middle;
  • a determining module configured to determine the motion loss of the first neural network according to the first motion and the second motion
  • the adjustment module is configured to adjust the parameters of the first neural network according to the motion loss.
  • the first neural network is a conditional motion propagation network.
  • the processing module is further configured to:
  • an electronic device including:
  • a memory for storing processor executable instructions
  • the processor is configured to execute the above method.
  • a computer-readable storage medium having computer program instructions stored thereon, and the computer program instructions implement the above method when executed by a processor.
  • a computer program including computer readable code, and when the computer readable code is executed in an electronic device, a processor of the electronic device executes for realizing the above method.
  • optical flow prediction can be performed according to the guide points included in the guide group and the image to be processed, Get the motion of the target object in the image to be processed.
  • the motion of the target object can be predicted based on the guidance of the guide point, and the quality of predicting the motion of the target object can be improved without relying on the assumption of strong association between the target object and its motion.
  • Fig. 1 shows a flowchart of an image processing method according to an embodiment of the present disclosure
  • Fig. 2 shows an exemplary schematic diagram of guiding point setting for an image to be processed in the present disclosure
  • Figure 3 shows an exemplary optical flow diagram of the present disclosure
  • FIG. 4 shows a schematic diagram of sparse motion and binary mask of an example of the present disclosure
  • Fig. 5 shows a flowchart of an image processing method according to an embodiment of the present disclosure
  • Fig. 6 shows a schematic diagram of a first neural network according to an embodiment of the present disclosure
  • Fig. 7 shows a flowchart of an image processing method according to an embodiment of the present disclosure
  • FIG. 8 is a schematic diagram of an exemplary video generation process of the present disclosure.
  • Fig. 9 shows a flowchart of an image processing method according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic diagram of an exemplary mask generation process of the present disclosure.
  • Fig. 11 shows a flowchart of a network training method according to an embodiment of the present disclosure
  • Fig. 12 shows a structural block diagram of an image processing device according to an embodiment of the present disclosure
  • Fig. 13 shows a structural block diagram of a network training device according to an embodiment of the present disclosure
  • Fig. 14 is a block diagram showing an electronic device 800 according to an exemplary embodiment
  • Fig. 15 is a block diagram showing an electronic device 1900 according to an exemplary embodiment.
  • Fig. 1 shows a flowchart of an image processing method according to an embodiment of the present disclosure.
  • the image processing method can be executed by a terminal device or other processing device, where the terminal device can be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, or a personal digital assistant (Personal Digital Assistant). , PDA), handheld devices, computing devices, vehicle-mounted devices, wearable devices, etc.
  • Other processing devices can be servers or cloud servers.
  • the image processing method can be implemented by a processor calling computer-readable instructions stored in a memory.
  • the method may include:
  • Step 101 Determine a guide group set for the target object on the image to be processed, the guide group includes at least one guide point, and the guide point is used to indicate the position of the sampling pixel and the speed of the sampling pixel. Size and direction.
  • At least one guiding point may be set for the target object on the image to be processed, and the at least one guiding point may form a guiding group.
  • any guiding point may correspond to a sampling pixel, and the guiding point may include the position of the sampling pixel corresponding to the guiding point, the magnitude and direction of the movement speed of the sampling pixel.
  • multiple sampling pixels may be determined on the target object in the image to be processed, and guiding points (including setting the magnitude and direction of the movement speed of the sampling pixels) may be set on the multiple sampling pixels.
  • Fig. 2 shows an exemplary schematic diagram of guiding point setting for an image to be processed in the present disclosure.
  • the target object in the to-be-processed image is a person, that is, this example needs to predict the movement of the person.
  • guide points can be set at key positions such as the human body and head.
  • the guide points can be represented in the form of arrows, where the length of the arrow maps the movement speed of the sampling pixels indicated by the guide points (below Referred to as the magnitude of the movement speed indicated by the guide point), the direction of the arrow can be mapped to the direction of the movement speed of the sampling pixel indicated by the guide point (hereinafter referred to as the direction of the movement speed indicated by the guide point).
  • the user can set the direction of the movement speed indicated by the guide point by setting the direction of the arrow, and the size of the movement speed indicated by the guide point can be set by setting the length of the arrow (or, the movement indicated by the guide point can be input through the input box Speed); or, after selecting the position of the guide point, you can enter the direction of the movement speed indicated by the guide point through the input box (the direction of the movement speed indicated by the guide point can be through the angle (0 ⁇ 360°) To indicate) and the size of the movement speed.
  • the present disclosure does not specifically limit the setting method of the guide point.
  • Step 102 Perform optical flow prediction according to the guide points in the guide group and the image to be processed to obtain the motion of the target object in the image to be processed.
  • the optical flow prediction is performed according to the guide points in the guide group and the image to be processed to obtain the motion of the target object in the image to be processed.
  • the guiding points and the image to be processed in the guiding group are input to a first neural network to perform optical flow prediction to obtain the motion of the target object in the image to be processed.
  • the above-mentioned first neural network may be a network obtained by training through a large number of training samples, and used for propagating the magnitude and direction of the movement speed indicated by the guide point in a full image to perform optical flow prediction.
  • the guidance points (position, movement speed, and direction) set for the target object in the guidance group and the image to be processed can be input into the first neural network for optical flow prediction, so as to pass the set
  • the guide point guides the motion of the pixel corresponding to the target object in the image to be processed, and obtains the motion of the target object in the image to be processed.
  • the above-mentioned first neural network may be a conditional motion propagation network.
  • Fig. 3 shows an exemplary optical flow diagram of the present disclosure.
  • one guiding point is set for the left foot of the person in the image to be processed, and one guiding point is set for each of the left foot and left leg of the person in the image to be processed.
  • Point set a guide point for the left foot, left leg, and head of the person in the image to be processed, set a guide point for the left foot, left leg, head, and torso of the person in the image to be processed, Set a guide point for the left foot, left leg, head, torso, and right leg of the person in the image to be processed.
  • the first neural network can be a conditional motion propagation network.
  • optical flow prediction can be performed according to the guide points included in the guide group and the image to be processed, and the image to be processed can be obtained Movement of the target object.
  • the motion of the target object can be predicted based on the guidance of the guide point, and the quality of predicting the motion of the target object can be improved without relying on the assumption of a strong association between the target object and its motion.
  • step 102 the optical flow prediction is performed according to the guide points in the guide group and the image to be processed to obtain the motion of the target object in the image to be processed ,
  • the positions of the sampling pixels indicated by the guiding points in the guiding group, and the image to be processed Stream prediction obtains the motion of the target object in the image to be processed.
  • the guidance points in the guidance group and the image to be processed can be input to the first neural network, and the first neural network inputs the magnitude and direction of the movement speed indicated by the guidance points, and the guidance in the guidance group
  • the position of the sampling pixel indicated by the guide point is propagated in the whole image on the image to be processed, so as to guide the movement of the target object in the image to be processed according to the guide point to obtain the movement of the target object in the image to be processed.
  • step 102 the optical flow prediction is performed according to the guide points in the guide group and the image to be processed to obtain the motion of the target object in the image to be processed ,
  • the sparse motion corresponding to the target object in the image to be processed is generated according to the size and direction of the motion speed of the sampling pixels indicated by the guide point in the guidance group, and the sparse motion is used to indicate each of the target objects.
  • Fig. 4 shows a schematic diagram of the sparse motion and binary mask of an example of the present disclosure.
  • the sparse motion corresponding to the target object in the image to be processed can be generated according to the magnitude and direction of the motion speed indicated by all the guidance points in the guidance group, and the sparse motion is used to indicate the motion speed of each sampled pixel of the target object.
  • the size and direction of the image to be processed (as shown in Figure 2, the sparse motion corresponding to the guide point can refer to Figure 4); the target in the image to be processed can be generated according to the position indicated by all the guide points in the guide group
  • the binary mask corresponding to the object the binary mask can be used to indicate the position of each sampling pixel of the target object (as shown in Fig. 2 for the image to be processed, the binary mask corresponding to the guiding point can refer to Fig. 4 ).
  • the sparse motion, the binary mask, and the image to be processed can be input into the first neural network for optical flow prediction, and the motion of the target object in the image to be processed can be obtained.
  • the first neural network can be a conditional motion propagation network.
  • the motion of the target object can be predicted based on the guidance of the guide point, and the quality of predicting the motion of the target object can be improved without relying on the assumption of a strong association between the target object and its motion.
  • Fig. 5 shows a flowchart of an image processing method according to an embodiment of the present disclosure
  • Fig. 6 shows a schematic diagram of a first neural network according to an embodiment of the present disclosure.
  • the first neural network may include a first coding network, a second coding network, and a decoding network (as shown in FIG. 6).
  • the optical flow prediction of the binary mask and the image to be processed to obtain the motion of the target object in the image to be processed may include:
  • Step 1021 Perform feature extraction on the sparse motion and binary mask corresponding to the target object in the image to be processed to obtain a first feature
  • the sparse motion and binary mask corresponding to the target object in the image to be processed can be input into the first coding network for feature extraction to obtain the first feature.
  • the above-mentioned first encoding network may be a neural network used to encode the sparse motion and binary mask of the target object to obtain a compact sparse motion feature, and the compact sparse motion feature is the first feature.
  • the first coding network may be a neural network composed of two Conv-BN-ReLU-Pooling blocks (convolution-batch normalization-activation-pooling).
  • Step 1022 Perform feature extraction on the image to be processed to obtain a second feature.
  • the image to be processed may be input into the second coding network for feature extraction to obtain the second feature.
  • the above-mentioned second encoding network can be used to encode the image to be processed to extract the kinematic attributes of the target object from the static image to be processed (for example, extract the characteristics of a person's calf as a rigid body structure, overall movement, etc.) to obtain deep features ,
  • This deep feature is the second feature.
  • the second coding network is a neural network, for example, it can be a neural network composed of AlexNet/ResNet-50 and a convolutional layer.
  • Step 1023 Perform concatenation processing on the first feature and the second feature to obtain a third feature.
  • the first feature and the second feature are both tensors
  • the first feature and the second feature can be connected to obtain a third feature, which is also a tensor.
  • the dimension of the third feature obtained can be (c1+c2) ⁇ h ⁇ w.
  • Step 1024 Perform optical flow prediction on the third feature to obtain the motion of the target object in the image to be processed.
  • the above-mentioned third feature can be input into the decoding network for optical flow prediction to obtain the motion of the target object in the image to be processed.
  • the foregoing decoding network is used to perform optical flow prediction according to the third feature, and the output of the decoding network is the motion of the target object in the image to be processed.
  • the foregoing decoding network may include at least two propagation networks and a fusion network, and the optical flow prediction of the third feature may be performed to obtain the motion of the target object in the image to be processed.
  • the propagation results corresponding to the respective propagation networks are input into the fusion network for fusion processing to obtain the motion of the target object in the image to be processed.
  • the foregoing decoding network may include at least two propagation networks and a converged network, and each propagation network may include a maximum pooling layer and two stacked Conv-BN-ReLU blocks.
  • the converged network Can include a single convolutional layer.
  • the above-mentioned third feature can be input into each propagation network, and each propagation network will propagate the above-mentioned third feature to the full image of the image to be processed, so as to restore the full image motion of the image to be processed through the third feature, and obtain each propagation network The corresponding propagation result.
  • the decoding network may include three propagation networks, which are constructed by convolutional neural networks with different spatial steps, for example: the spatial steps are respectively: 1, 2, 4 convolution Neural network, three propagation networks can be constructed, propagation network 1 can be composed of a convolutional neural network with a step size of 1, propagation network 2 can be composed of a convolutional neural network with a step size of 2, and propagation network 3 can be composed of a step size of 4 is composed of convolutional neural network.
  • the spatial steps are respectively: 1, 2, 4 convolution Neural network, three propagation networks can be constructed, propagation network 1 can be composed of a convolutional neural network with a step size of 1, propagation network 2 can be composed of a convolutional neural network with a step size of 2, and propagation network 3 can be composed of a step size of 4 is composed of convolutional neural network.
  • the fusion network can merge the propagation results of each propagation network to obtain the movement of the corresponding target object.
  • the above-mentioned first neural network may be a conditional motion propagation network.
  • the motion of the target object can be predicted based on the guidance of the guide point, and the quality of predicting the motion of the target object can be improved without relying on the assumption of a strong association between the target object and its motion.
  • Fig. 7 shows a flowchart of an image processing method according to an embodiment of the present disclosure.
  • the above step 101, the determining the guide group set for the target object on the image to be processed may include:
  • Step 1011 Determine a plurality of guide groups set for the target object on the image to be processed, wherein at least one guide point in the plurality of guide groups is different.
  • the user may set multiple guide groups for the target object, each guide group may include at least one guide point, and at least one guide point in different guide groups is different.
  • Fig. 8 is a schematic diagram of an exemplary video generation process of the present disclosure.
  • the user sequentially sets three guide groups for the target object in the image to be processed, wherein the guide group 1 includes guide point 1, guide point 2, and guide point 3.
  • the guiding group 2 includes guiding point 4, guiding point 5, and guiding point 6.
  • the guide group 3 includes a guide point 7, a guide point 8, and a guide point 9.
  • the guide points set in different guide groups can be set in the same position (for example: in Figure 8, the guide point 1, the guide point 4 in the guide group 2, and the guide point 4 in the guide group 1 in FIG.
  • the guide points 7 in the guide group 3 are set in the same position, but the magnitude and direction of the movement speed indicated by each are different), or they can be set in different positions, or different guide groups can also have the same position and instructions.
  • the size and direction of the motion speed are the same guide points, which are not limited in the embodiment of the present disclosure.
  • the optical flow prediction is performed according to the guide point in the guide group and the image to be processed, to obtain
  • the movement of the target object can include:
  • Step 1025 Perform optical flow prediction according to the guiding points in each guiding group and the image to be processed, to obtain the corresponding motion of the target object in the image to be processed under the guidance of each guiding group.
  • the guidance points and the images to be processed of each guidance group can be sequentially input into the first neural network for optical flow prediction, and the corresponding motion of the target object in the image to be processed under the guidance of each guidance group can be obtained.
  • the guidance group 1 and the image to be processed can be input into the first neural network for optical flow prediction, and the corresponding motion of the target object in the image to be processed under the guidance of the guidance group 1 can be obtained.
  • the optical flow prediction is performed in the network, and the corresponding motion 3 of the target object in the image to be processed under the guidance of the guidance group 3 is obtained.
  • the first neural network can be a conditional motion propagation network.
  • the method further includes:
  • Step 103 Map the image to be processed according to the corresponding motion of the target object under the guidance of each guidance group, to obtain a new image corresponding to each guidance group;
  • Step 104 Generate a video according to the image to be processed and the new image corresponding to each guide group.
  • each pixel in the image to be processed can be mapped according to the motion (the magnitude and direction of the motion speed) corresponding to the pixel to obtain a corresponding new image.
  • the position of a certain pixel in the image to be processed is (X, Y), and its corresponding motion information in motion 1 includes: the direction of the motion speed is 110 degrees, and the size of the motion speed (x1, y1), then After mapping, the pixel moves in the direction of 110 degrees with the movement speed (x1, y1), and the position of the pixel on the image to be processed after the movement is (X1, Y1).
  • a new image 1 can be obtained.
  • new image 2 can be obtained
  • new image 3 can be obtained, refer to FIG. 8.
  • the to-be-processed image and the new image corresponding to each guide group can form an image sequence, and the corresponding video can be generated according to the image sequence, such as the to-be-processed image and New image 1, new image 2, and new image 3 can correspond to a video of a person dancing arms and legs.
  • the user can specify the direction and speed of the target object by setting the guide point, and then generate the corresponding video.
  • the generated video is more in line with the user's expectations, the quality is better, and the video is enriched. Generation method.
  • Fig. 9 shows a flowchart of an image processing method according to an embodiment of the present disclosure.
  • determining a guide group set for the target object on the image to be processed may include:
  • Step 1012 Determine at least one first guide point set for the first target object on the image to be processed
  • the user may determine the position of at least one first guiding point for the first target object on the image to be processed, and set the first guiding point at the corresponding position.
  • Step 1013 Generate multiple guide groups according to the at least one first guide point, the directions of the first guide points in the same guide group are the same, and the directions of the first guide points in different guide groups are different.
  • multiple directions can be set for each first guide point to generate multiple guide groups. For example: set the direction of the first guide point in the guide group 1 to be up, the direction of the first guide point in the guide group 2 to be down, and the direction of the first guide point in the guide group 3 to be left , The direction of the first guide point in the guide group 4 is right.
  • the movement speed of the first guiding point is not zero.
  • the direction of the guide point can be understood as the direction of the movement speed of the sampled pixel indicated by the guide point.
  • step 102 perform optical flow prediction according to the obtained guide points in the guide group and the image to be processed, to obtain the target in the image to be processed
  • the movement of the subject can include:
  • Step 1025 Perform optical flow prediction according to the first guide point in each guide group and the image to be processed, and obtain that the first target object in the image to be processed is guided by each guide group The corresponding movement.
  • the optical flow prediction of the target object can be performed according to each guide group to obtain the movement of the target object in each direction.
  • the first guiding point and the image to be processed in any guiding group may be input into the first neural network for optical flow prediction, and the movement of the target object in the direction corresponding to the guiding group can be obtained.
  • the foregoing method may further include:
  • Step 105 Fusion corresponding motions of the first target object in the image to be processed under the guidance of each guidance group to obtain a mask corresponding to the first target object in the image to be processed.
  • the motions in various directions can be merged (for example: using the mean, intersection or union, etc., the embodiment of the present disclosure does not specifically limit the fusion method ), that is, the mask corresponding to the first target object in the image to be processed can be obtained.
  • FIG. 10 is a schematic diagram of an exemplary mask generation process of the present disclosure.
  • the user sets the first guiding point (5 first guiding points are set) for the person 1 in the image to be processed.
  • the 5 first guide points set by the user respectively generate 4 guide groups in the four directions of up, down, left and right.
  • the optical flow prediction of the character 1 is performed, and the movement of the target object in the four directions up, down, left and right is obtained: movement 1, movement 2, movement 3, and movement 4.
  • the movement 1, movement 2, movement 3, and movement 4 corresponding to the 4 guidance groups are merged to obtain the mask of character 1.
  • the first neural network can be a conditional motion propagation network.
  • the above method may further include:
  • the second target object may be an object that occludes the first target object or is close to the first target object.
  • the second guiding point for the second target object may be set at the same time.
  • the first guide point can be set by the first guide point setting tool
  • the second guide point can be set by the second guide point setting tool.
  • the guiding point can be determined as the first guiding point or the second guiding point by selecting the option corresponding to the first guiding point or the second guiding point.
  • the colors of the first guide point and the second guide point are different (for example: the first guide point is green, the second guide point is red), or the first guide point and the second guide point
  • the shapes of the points are different (the first guide point is a circle, and the second guide point is a cross).
  • the optical flow prediction is performed according to the first guide point in each guide group and the image to be processed, and the first target object in the image to be processed is obtained in each guide
  • the corresponding movement under the guidance of the lead group can include:
  • the optical flow prediction is performed according to the first guiding point, the second guiding point and the image to be processed in each guiding group in turn to obtain that the first target object in the image to be processed is in each guiding The corresponding movement under the guidance of the lead group.
  • the optical flow can be generated near the first guiding point, and no optical flow is generated near the second guiding point.
  • the masked part of the mask of the first target object or the adjacent part of the first target object does not generate a mask, which can improve the quality of the generated mask.
  • the user only needs to set the position of the first guide point (or the second guide point) for the first target object in the image to be processed, and then the mask of the first target object can be generated, which is robust Better, it simplifies the user's operation, that is, improves the mask generation efficiency and quality.
  • Fig. 11 shows a flowchart of a network training method according to an embodiment of the present disclosure.
  • the network training method can be executed by a terminal device or other processing device, where the terminal device can be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, or a personal digital assistant (Personal Digital Assistant). , PDA), handheld devices, computing devices, vehicle-mounted devices, wearable devices, etc.
  • Other processing devices can be servers or cloud servers.
  • the image processing method can be implemented by a processor calling computer-readable instructions stored in a memory.
  • the method may include:
  • Step 1101 Obtain a first sample group, where the first sample group includes an image sample to be processed and a first motion corresponding to a target object in the image sample to be processed;
  • Step 1102 Perform sampling processing on the first motion to obtain a sparse motion and a binary mask corresponding to the target object in the image sample to be processed;
  • Step 1103 Input the sparse motion corresponding to the target object in the to-be-processed image sample, the binary mask, and the to-be-processed image sample into the first neural network for optical flow prediction, and obtain the corresponding Second movement
  • Step 1104 Determine the motion loss of the first neural network according to the first motion and the second motion
  • Step 1105 Adjust the parameters of the first neural network according to the motion loss.
  • the first sample group can be set. For example: Obtain a combination of images with an interval smaller than the frame value threshold (for example: 10 frames) from a video to calculate the optical flow. It is assumed that video clips 1, 4, 10, 21, 28 including 5 video frames are always obtained from a video. Video frame combinations with an interval of less than 10 frames include: [1,4], [4,10], [21,28], the corresponding optical flow can be calculated based on the two video frame images in each video frame combination, and The image with the smaller number of frames in the video frame combination is used as the image sample to be processed, and the optical flow corresponding to the video frame combination is used as the first motion corresponding to the image sample to be processed.
  • the frame value threshold for example: 10 frames
  • the sampling processing of the first motion to obtain the sparse motion and the binary mask corresponding to the target object in the image sample to be processed may include:
  • the binary mask corresponding to the target object in the image sample to be processed according to the position of the at least one key point and obtain the sparseness corresponding to the target object in the image sample to be processed according to the motion corresponding to the at least one key point Movement, where the movement corresponding to the key point is the movement of the pixel corresponding to the key point in the first movement, and the pixel corresponding to the key point is the pixel corresponding to the key point in the edge image.
  • edge extraction processing may be performed on the first motion, for example, edge extraction processing is performed on the first motion through a watershed algorithm to obtain an edge map corresponding to the first motion. Then at least one key point can be determined from the inner area of the edge in the edge map, so that the key points can all fall into the target object.
  • a non-maximum suppression algorithm with a kernel size of K can be used to determine at least one key point from the edge map. The larger the K, the smaller the number of corresponding key points.
  • the positions of all the key points in the image sample to be processed constitute the binary mask of the target object, and the corresponding movement of the pixels corresponding to all the key points in the first motion constitutes the sparseness of the target object in the image sample to be processed movement.
  • the binary mask and the sparse motion corresponding to the image sample to be processed are input into the first neural network for optical flow prediction, and the second motion corresponding to the target object in the image sample to be processed can be obtained.
  • the loss function (for example: cross entropy loss function) is used to determine the motion loss between the first motion and the second motion.
  • the training accuracy requirements for example: less than the preset loss threshold
  • the first neural network may be a conditional motion propagation network.
  • the first neural network may include a first coding network, a second coding network, and a decoding network.
  • the structures of the first coding network, the second coding network, and the decoding network can refer to the foregoing embodiments. No longer.
  • the first neural network can be trained as needed.
  • the image samples to be processed in the first sample group may be human facial images
  • the image samples to be processed in the first sample group may be images of human bodies.
  • the embodiment of the present disclosure can perform unsupervised training on the first neural network through a large number of unlabeled image samples, and the trained first neural network can perform the motion prediction of the target object based on the guidance of the guide point, and does not depend on the target.
  • the hypothesis of strong association between the object and its motion can improve the quality of predicting the motion of the target object.
  • the first coding network in the first neural network can be used as an image encoder for a large number of high-level visual tasks (for example: target detection, semantic segmentation, instance segmentation, human body analysis), and can be based on the second coding in the first neural network
  • the parameters of the network initialize the parameters of the image encoder in the network corresponding to the above-mentioned advanced vision task, can make the corresponding network in the advanced vision task have better performance at the time of initialization, and can greatly improve the corresponding advanced vision task Network performance.
  • the present disclosure also provides image processing devices, electronic equipment, computer-readable storage media, and programs, all of which can be used to implement any image processing method provided in the present disclosure.
  • image processing devices electronic equipment, computer-readable storage media, and programs, all of which can be used to implement any image processing method provided in the present disclosure.
  • the writing order of the steps does not mean a strict execution order but constitutes any limitation on the implementation process.
  • the specific execution order of each step should be based on its function and possibility.
  • the inner logic is determined.
  • Fig. 12 shows a structural block diagram of an image processing device according to an embodiment of the present disclosure. As shown in Figure 12, the device may include:
  • the first determining module 1201 may be used to determine a guide group set for the target object on the image to be processed, the guide group includes at least one guide point, and the guide point is used to indicate the position of the sampling pixel, The size and direction of the movement speed of the sampling pixels; the sampling pixels are the pixels of the target object in the image to be processed;
  • the prediction module 1202 may be configured to perform optical flow prediction according to the guide points in the guide group and the image to be processed to obtain the motion of the target object in the image to be processed.
  • optical flow prediction can be performed according to the guide points included in the guide group and the image to be processed, and the image to be processed can be obtained Movement of the target object.
  • the motion of the target object can be predicted based on the guidance of the guide point, and the quality of predicting the motion of the target object can be improved without relying on the assumption of a strong association between the target object and its motion.
  • the prediction module may also be used for:
  • the positions of the sampling pixels indicated by the guiding points in the guiding group, and the image to be processed Stream prediction obtains the motion of the target object in the image to be processed.
  • the prediction module may also be used for:
  • the sparse motion corresponding to the target object in the image to be processed is generated according to the size and direction of the motion speed of the sampling pixels indicated by the guidance point in the guidance group, and the sparse motion is used to indicate the target object's The size and direction of the movement speed of each sampled pixel;
  • the prediction module may also be used for:
  • the guiding points and the image to be processed in the guiding group are input to a first neural network to perform optical flow prediction to obtain the motion of the target object in the image to be processed.
  • the prediction module may further include:
  • a sparse motion coding module configured to perform feature extraction on the sparse motion and binary mask corresponding to the target object in the image to be processed to obtain the first feature
  • An image encoding module configured to perform feature extraction on the image to be processed to obtain a second feature
  • the connecting module is used to connect the first feature and the second feature to obtain a third feature
  • the dense motion decoding module is used to perform optical flow prediction on the third feature to obtain the motion of the target object in the image to be processed.
  • the dense motion decoding module can also be used for:
  • the propagation results corresponding to the respective propagation networks are input into the fusion network for fusion processing to obtain the motion of the target object in the image to be processed.
  • the first determining module may also be used for:
  • the prediction module may also be used for:
  • the device may further include:
  • a mapping module configured to map the to-be-processed image according to the corresponding motion of the target object under the guidance of each guidance group to obtain a new image corresponding to each guidance group;
  • the video generation module is used to generate a video according to the image to be processed and the new image corresponding to each guide group.
  • the first determining module may also be used for:
  • a plurality of guide groups are generated according to the at least one first guide point, the directions of the first guide points in the same guide group are the same, and the directions of the first guide points in different guide groups are different.
  • the prediction module may also be used for:
  • the device may further include:
  • the fusion module is used for fusing the corresponding motions of the first target object in the image to be processed under the guidance of each guidance group to obtain a mask corresponding to the first target object in the image to be processed.
  • the device may further include:
  • the second determining module may be used to determine at least one second guiding point set on the image to be processed, wherein the movement speed of the second guiding point is 0;
  • the prediction module can also be used for:
  • Fig. 13 shows a structural block diagram of a network training device according to an embodiment of the present disclosure. As shown in Figure 13, the device may include:
  • the acquiring module 1301 may be used to acquire a first sample group, where the first sample group includes a to-be-processed image sample and a first motion corresponding to a target object in the to-be-processed image sample;
  • the processing module 1302 may be used to perform sampling processing on the first motion to obtain the sparse motion and binary mask corresponding to the target object in the image sample to be processed;
  • the prediction module 1303 can be used to input the sparse motion corresponding to the target object in the to-be-processed image sample, the binary mask, and the to-be-processed image sample into the first neural network for optical flow prediction, and obtain the to-be-processed The second motion corresponding to the target object in the image sample;
  • the determining module 1304 may be used to determine the motion loss of the first neural network according to the first motion and the second motion;
  • the adjustment module 1305 may be used to adjust the parameters of the first neural network according to the motion loss.
  • the first neural network may be a conditional motion propagation network.
  • processing module may also be used for:
  • the embodiment of the present disclosure can perform unsupervised training on the first neural network through a large number of unlabeled image samples, and the trained first neural network can perform the motion prediction of the target object based on the guidance of the guide point, and does not depend on the target.
  • the hypothesis of strong association between the object and its motion can improve the quality of predicting the motion of the target object.
  • the first coding network in the first neural network can be used as an image encoder for a large number of high-level visual tasks (for example: target detection, semantic segmentation, instance segmentation, human body analysis), and can be based on the second coding in the first neural network
  • the parameters of the network initialize the parameters of the image encoder in the network corresponding to the above-mentioned advanced vision task, can make the corresponding network in the advanced vision task have better performance at the time of initialization, and can greatly improve the corresponding advanced vision task Network performance.
  • the functions or modules contained in the apparatus provided in the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments.
  • the functions or modules contained in the apparatus provided in the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments.
  • the embodiments of the present disclosure also provide a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the foregoing method when executed by a processor.
  • the computer-readable storage medium may be a non-volatile computer-readable storage medium.
  • An embodiment of the present disclosure also provides an electronic device, including: a processor; a memory for storing executable instructions of the processor; wherein the processor is configured as the above method.
  • the embodiment of the present disclosure also proposes a computer program, including computer-readable code, when the computer-readable code is executed in an electronic device, the processor of the electronic device is executed to implement the above method.
  • the electronic device can be provided as a terminal, server or other form of device.
  • Fig. 14 is a block diagram showing an electronic device 800 according to an exemplary embodiment.
  • the electronic device 800 may be a mobile phone, a computer, a digital broadcasting terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and other terminals.
  • the electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, and a sensor component 814 , And communication component 816.
  • the processing component 802 generally controls the overall operations of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations.
  • the processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the foregoing method.
  • the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components.
  • the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
  • the memory 804 is configured to store various types of data to support operations in the electronic device 800. Examples of these data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc.
  • the memory 804 can be implemented by any type of volatile or non-volatile storage device or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable and Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic Disk or Optical Disk.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read-only memory
  • EPROM erasable and Programmable Read Only Memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Magnetic Disk Magnetic Disk or Optical Disk.
  • the power supply component 806 provides power for various components of the electronic device 800.
  • the power supply component 806 may include a power management system, one or more power supplies, and other components associated with the generation, management, and distribution of power for the electronic device 800.
  • the multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user.
  • the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user.
  • the touch panel includes one or more touch sensors to sense touch, sliding, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure related to the touch or slide operation.
  • the multimedia component 808 includes a front camera and/or a rear camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
  • the audio component 810 is configured to output and/or input audio signals.
  • the audio component 810 includes a microphone (MIC).
  • the microphone is configured to receive an external audio signal.
  • the received audio signal may be further stored in the memory 804 or transmitted via the communication component 816.
  • the audio component 810 further includes a speaker for outputting audio signals.
  • the I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module.
  • the peripheral interface module may be a keyboard, a click wheel, a button, and the like. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
  • the sensor component 814 includes one or more sensors for providing the electronic device 800 with various aspects of state evaluation.
  • the sensor component 814 can detect the on/off status of the electronic device 800 and the relative positioning of the components.
  • the component is the display and the keypad of the electronic device 800.
  • the sensor component 814 can also detect the electronic device 800 or the electronic device 800.
  • the position of the component changes, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration/deceleration of the electronic device 800, and the temperature change of the electronic device 800.
  • the sensor component 814 may include a proximity sensor configured to detect the presence of nearby objects when there is no physical contact.
  • the sensor component 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications.
  • the sensor component 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
  • the communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices.
  • the electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof.
  • the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel.
  • the communication component 816 further includes a near field communication (NFC) module to facilitate short-range communication.
  • the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
  • RFID radio frequency identification
  • IrDA infrared data association
  • UWB ultra-wideband
  • Bluetooth Bluetooth
  • the electronic device 800 can be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field A programmable gate array (FPGA), controller, microcontroller, microprocessor, or other electronic components are implemented to implement the above methods.
  • ASIC application specific integrated circuits
  • DSP digital signal processors
  • DSPD digital signal processing devices
  • PLD programmable logic devices
  • FPGA field A programmable gate array
  • controller microcontroller, microprocessor, or other electronic components are implemented to implement the above methods.
  • a non-volatile computer-readable storage medium such as the memory 804 including computer program instructions, which can be executed by the processor 820 of the electronic device 800 to complete the foregoing method.
  • Fig. 15 is a block diagram showing an electronic device 1900 according to an exemplary embodiment.
  • the electronic device 1900 may be provided as a server.
  • the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as application programs.
  • the application program stored in the memory 1932 may include one or more modules each corresponding to a set of instructions.
  • the processing component 1922 is configured to execute instructions to perform the above-described methods.
  • the electronic device 1900 may also include a power component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input output (I/O) interface 1958 .
  • the electronic device 1900 can operate based on an operating system stored in the memory 1932, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or the like.
  • a non-volatile computer-readable storage medium such as the memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to complete the foregoing method.
  • the present disclosure may be a system, method, and/or computer program product.
  • the computer program product may include a computer-readable storage medium loaded with computer-readable program instructions for enabling a processor to implement various aspects of the present disclosure.
  • the computer-readable storage medium may be a tangible device that can hold and store instructions used by the instruction execution device.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
  • Non-exhaustive list of computer readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM) Or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanical encoding device, such as a printer with instructions stored thereon
  • RAM random access memory
  • ROM read only memory
  • EPROM erasable programmable read only memory
  • flash memory flash memory
  • SRAM static random access memory
  • CD-ROM compact disk read-only memory
  • DVD digital versatile disk
  • memory stick floppy disk
  • mechanical encoding device such as a printer with instructions stored thereon
  • the computer-readable storage medium used here is not interpreted as a transient signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (for example, light pulses through fiber optic cables), or through wires Transmission of electrical signals.
  • the computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to various computing/processing devices, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network may include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • the network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network, and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing/processing device .
  • the computer program instructions used to perform the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or in one or more programming languages.
  • Source code or object code written in any combination, the programming language includes object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as "C" language or similar programming languages.
  • Computer-readable program instructions can be executed entirely on the user's computer, partly on the user's computer, executed as a stand-alone software package, partly on the user's computer and partly executed on a remote computer, or entirely on the remote computer or server carried out.
  • the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to access the Internet connection).
  • LAN local area network
  • WAN wide area network
  • an electronic circuit such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), can be customized by using the status information of the computer-readable program instructions.
  • the computer-readable program instructions are executed to realize various aspects of the present disclosure.
  • These computer-readable program instructions can be provided to the processors of general-purpose computers, special-purpose computers, or other programmable data processing devices, thereby producing a machine that makes these instructions when executed by the processors of the computer or other programmable data processing devices , A device that implements the functions/actions specified in one or more blocks in the flowcharts and/or block diagrams is produced. It is also possible to store these computer-readable program instructions in a computer-readable storage medium. These instructions make computers, programmable data processing apparatuses, and/or other devices work in a specific manner. Thus, the computer-readable medium storing the instructions includes An article of manufacture, which includes instructions for implementing various aspects of the functions/actions specified in one or more blocks in the flowchart and/or block diagram.
  • each block in the flowchart or block diagram may represent a module, program segment, or part of an instruction, and the module, program segment, or part of an instruction contains one or more components for realizing the specified logical function.
  • Executable instructions may also occur in a different order from the order marked in the drawings. For example, two consecutive blocks can actually be executed in parallel, or they can sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart can be implemented by a dedicated hardware-based system that performs the specified functions or actions Or it can be realized by a combination of dedicated hardware and computer instructions.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Medical Informatics (AREA)
  • Databases & Information Systems (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Biophysics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Human Computer Interaction (AREA)
  • Social Psychology (AREA)
  • Psychiatry (AREA)
  • Biodiversity & Conservation Biology (AREA)
  • Image Analysis (AREA)

Abstract

本公开涉及一种图像处理方法及装置、网络训练方法及装置,包括:确定在待处理图像上针对目标对象设置的导引组,所述导引组中包括至少一个导引点,所述导引点用于指示采样像素的位置、采样像素的运动速度的大小及方向;根据所述导引组中的所述导引点及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动。

Description

图像处理方法及装置、网络训练方法及装置
本申请要求在2019年1月29日提交中国专利局、申请号为201910086044.3、发明名称为“图像处理方法及装置、网络训练方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本公开涉及图像处理技术领域,尤其涉及一种图像处理方法及装置、网络训练方法及装置。
背景技术
随着科学技术的发展,智能***可以模拟人类从物体的运动中学习物体的运动特征,从而通过学习到的运动特征实现物体检测、分割等高级视觉任务。
通过假设物体与运动特征之间具有某种强关联关系,例如:假设同一物体上的像素的运动是一致的,进而预测物体的运动。但大部分物体的自由度较高,运动通常是复杂的,即使同一物体,不同部位之间也存在平移、旋转、变形等多种运动模式。基于物体与运动特征之间假设的某种强关联关系预测的运动准确度较低。
发明内容
本公开提出了一种图像处理方法及装置、网络训练方法及装置技术方案。
根据本公开的一方面,提供了一种图像处理方法,包括:
确定在待处理图像上针对目标对象设置的导引组,所述导引组中包括至少一个导引点,所述导引点用于指示采样像素的位置、采样像素的运动速度的大小及方向;所述采样像素为所述待处理图像中目标对象的像素;
根据所述导引组中的所述导引点及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动。
在一种可能的实现方式中,所述根据所述导引组中的所述导引点及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动,包括:
根据所述导引组中的所述导引点指示的采样像素的运动速度的大小及方向、所述导引组中的导引点指示的采样像素的位置、以及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动。
在一种可能的实现方式中,所述根据所述导引组中的所述导引点及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动,包括:
根据所述导引组中的所述导引点指示的采样像素的运动速度的大小及方向,生成待处理图像中目标对象对应的稀疏运动,所述稀疏运动用于指示所述目标对象的各采样像素的运动速度的大小和方向;
根据所述导引组中的所述导引点指示的采样像素的位置,生成待处理图像中目标对象对应的二元 掩模,所述二元掩模用于指示所述目标对象的各采样像素的位置;
根据所述稀疏运动、所述二元掩模及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动。
在一种可能的实现方式中,根据所述导引组中的所述导引点及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动,包括:
将所述导引组中的所述导引点及所述待处理图像输入到第一神经网络进行光流预测,得到所述待处理图像中目标对象的运动。
在一种可能的实现方式中,根据所述稀疏运动、所述二元掩模及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动,包括:
对所述待处理图像中目标对象对应的稀疏运动及二元掩模进行特征提取,得到第一特征;
对所述待处理图像进行特征提取,得到第二特征;
将所述第一特征及所述第二特征进行连结处理,得到第三特征;
对所述第三特征进行光流预测,得到所述待处理图像中目标对象的运动。
在一种可能的实现方式中,所述对所述第三特征进行光流预测,得到所述待处理图像中目标对象的运动,包括:
将所述第三特征分别输入至少两个传播网络进行全图传播处理,得到各个传播网络对应的传播结果;
将所述各个传播网络对应的传播结果输入所述融合网络中进行融合处理,得到所述待处理图像中目标对象的运动。
在一种可能的实现方式中,所述确定在待处理图像上针对目标对象设置的导引组,包括:
确定在待处理图像上针对目标对象设置的多个导引组,其中,所述多个导引组中有至少一个导引点不同。
在一种可能的实现方式中,所述根据所述导引组中的所述导引点及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动,包括:
根据各个导引组中的所述导引点及所述待处理图像进行光流预测,得到,所述待处理图像中所述目标对象在各个导引组的导引下对应的运动。
在一种可能的实现方式中,所述方法还包括:
将所述待处理图像依据所述目标对象在各个导引组的导引下对应的运动进行映射,得到各个导引组对应的新图像;
根据所述待处理图像及所述各个导引组对应的新图像,生成视频。
在一种可能的实现方式中,确定在待处理图像上针对目标对象设置的导引组,包括:
确定在所述待处理图像上针对第一目标对象设置的至少一个第一导引点;
根据所述至少一个第一导引点生成多个导引组,同一导引组中的第一导引点的方向相同,不同导引组中的第一导引点的方向不同。
在一种可能的实现方式中,根据所述导引组中的所述导引点及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动,包括:
根据各个导引组中的所述第一导引点及所述待处理图像进行光流预测,得到所述待处理图像中所述第一目标对象在各个导引组的导引下对应的运动。
在一种可能的实现方式中,所述方法还包括:
将所述待处理图像中所述第一目标对象在各个导引组的导引下对应的运动进行融合,得到所述待处理图像中第一目标对象对应的掩模。
在一种可能的实现方式中,所述方法还包括:
确定在待处理图像上设置的至少一个第二导引点,其中,所述第二导引点的运动速度为0;
所述依次根据各个导引组中的所述第一导引点及所述待处理图像进行光流预测,得到所述待处理图像中所述第一目标对象在各个导引组的导引下对应的运动,包括:
依次根据各个导引组中的所述第一导引点、第二导引点及所述待处理图像进行光流预测,得到所述待处理图像中所述第一目标对象在各个导引组的导引下对应的运动。
根据本公开的一方面,提供了一种网络训练方法,所述方法包括:
获取第一样本组,所述第一样本组包括待处理图像样本及所述待处理图像样本中目标对象对应的第一运动;
对所述第一运动进行采样处理,得到所述待处理图像样本中目标对象对应的稀疏运动及二元掩模;
将所述待处理图像样本中目标对象对应的稀疏运动、二元掩模及所述待处理图像样本输入到第一神经网络中进行光流预测,得到所述待处理图像样本中目标对象对应的第二运动;
根据所述第一运动与所述第二运动,确定所述第一神经网络的运动损失;
根据所述运动损失,调整所述第一神经网络的参数。
在一种可能的实现方式中,所述第一神经网络为条件运动传播网络。
在一种可能的实现方式中,所述对所述第一运动进行采样处理,得到所述待处理图像样本中目标对象对应的稀疏运动及二元掩模,包括:
对所述第一运动进行边缘提取处理,得到所述第一运动对应的边缘图;
从所述边缘图中确定至少一个关键点;
根据所述至少一个关键点的位置得到所述待处理图像样本中目标对象对应的二元掩模,根据所述至少一个关键点对应的运动,得到所述待处理图像样本中目标对象对应的稀疏运动。
根据本公开的一方面,提供了一种图像处理装置,包括:
第一确定模块,用于确定在待处理图像上针对目标对象设置的导引组,所述导引组中包括至少一个导引点,所述导引点用于指示采样像素的位置、采样像素的运动速度的大小及方向;所述采样像素为所述待处理图像中目标对象的像素;
预测模块,用于根据所述导引组中的所述导引点及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动。
在一种可能的实现方式中,所述预测模块,还用于:
根据所述导引组中的所述导引点指示的采样像素的运动速度的大小及方向、所述导引组中的导引点指示的采样像素的位置、以及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运 动。
在一种可能的实现方式中,所述预测模块,还用于:
根据所述导引组中的所述导引点指示的采样像素的运动速度的大小及方向,生成待处理图像中目标对象对应的稀疏运动,所述稀疏运动用于指示所述目标对象的各采样像素的运动速度的大小和方向;
根据所述导引组中的所述导引点指示的采样像素的位置,生成待处理图像中目标对象对应的二元掩模,所述二元掩模用于指示所述目标对象的各采样像素的位置;
根据所述稀疏运动、所述二元掩模及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动。
在一种可能的实现方式中,所述预测模块,还用于:
将所述导引组中的所述导引点及所述待处理图像输入到第一神经网络进行光流预测,得到所述待处理图像中目标对象的运动。
在一种可能的实现方式中,所述预测模块,包括:
稀疏运动编码模块,用于对所述待处理图像中目标对象对应的稀疏运动及二元掩模进行特征提取,得到第一特征;
图像编码模块,用于对所述待处理图像进行特征提取,得到第二特征;
连接模块,用于将所述第一特征及所述第二特征进行连结处理,得到第三特征;
稠密运动解码模块,用于对所述第三特征进行光流预测,得到所述待处理图像中目标对象的运动。
在一种可能的实现方式中,所述稠密运动解码模块还用于:
将所述第三特征分别输入至少两个传播网络进行全图传播处理,得到各个传播网络对应的传播结果;
将所述各个传播网络对应的传播结果输入融合网络中进行融合处理,得到所述待处理图像中目标对象的运动。
在一种可能的实现方式中,所述第一确定模块还用于:
确定在待处理图像上针对目标对象设置的多个导引组,其中,所述多个导引组中有至少一个导引点不同。
在一种可能的实现方式中,所述预测模块还用于:
根据各个导引组中的所述导引点及所述待处理图像进行光流预测,得到,所述待处理图像中所述目标对象在各个导引组的导引下对应的运动。
在一种可能的实现方式中,所述装置还包括:
映射模块,用于将所述待处理图像依据所述目标对象在各个导引组的导引下对应的运动进行映射,得到各个导引组对应的新图像;
视频生成模块,用于根据所述待处理图像及所述各个导引组对应的新图像,生成视频。
在一种可能的实现方式中,所述第一确定模块还用于:
确定在所述待处理图像上针对第一目标对象设置的至少一个第一导引点;
根据所述至少一个第一导引点生成多个导引组,同一导引组中的第一导引点的方向相同,不同导 引组中的第一导引点的方向不同。
在一种可能的实现方式中,所述预测模块还用于:
根据各个导引组中的所述第一导引点及所述待处理图像进行光流预测,得到所述待处理图像中所述第一目标对象在各个导引组的导引下对应的运动。
在一种可能的实现方式中,所述装置还包括:
融合模块,用于将所述待处理图像中所述第一目标对象在各个导引组的导引下对应的运动进行融合,得到所述待处理图像中第一目标对象对应的掩模。
在一种可能的实现方式中,所述装置还包括:
第二确定模块,用于确定在待处理图像上设置的至少一个第二导引点,其中,所述第二导引点的运动速度为0;
所述预测模块还用于:
根据各个导引组中的所述第一导引点、第二导引点及所述待处理图像进行光流预测,得到所述待处理图像中所述第一目标对象在各个导引组的导引下对应的运动。
根据本公开的一方面,提供了一种网络训练方法,所述装置包括:
获取模块,用于获取第一样本组,所述第一样本组包括待处理图像样本及所述待处理图像样本中目标对象对应的第一运动;
处理模块,用于对所述第一运动进行采样处理,得到所述待处理图像样本中目标对象对应的稀疏运动及二元掩模;
预测模块,用于将所述待处理图像样本中目标对象对应的稀疏运动、二元掩模及所述待处理图像样本输入到第一神经网络中进行光流预测,得到所述待处理图像样本中目标对象对应的第二运动;
确定模块,用于根据所述第一运动与所述第二运动,确定所述第一神经网络的运动损失;
调整模块,用于根据所述运动损失,调整所述第一神经网络的参数。
在一种可能的实现方式中,所述第一神经网络为条件运动传播网络。
在一种可能的实现方式中,所述处理模块还用于:
对所述第一运动进行边缘提取处理,得到所述第一运动对应的边缘图;
从所述边缘图中确定至少一个关键点;
根据所述至少一个关键点的位置得到所述待处理图像样本中目标对象对应的二元掩模,根据所述至少一个关键点对应的运动,得到所述待处理图像样本中目标对象对应的稀疏运动。
根据本公开的一方面,提供了一种电子设备,包括:
处理器;
用于存储处理器可执行指令的存储器;
其中,所述处理器被配置为:执行上述方法。
根据本公开的一方面,提供了一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。
根据本公开的一方面,提供了一种计算机程序,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备的处理器执行用于实现上述方法。
在本公开实施例中,可以在获取待处理图像上针对目标对象设置的包括至少一个导引点的导引组后,根据导引组中包括的导引点及待处理图像进行光流预测,得到待处理图像中目标对象的运动。根据本公开实施例提供的图像处理方法及装置,可以基于导引点的导引来预测目标对象的运动,不依赖于目标对象与其运动的强关联假设,可以提高预测目标对象的运动的质量。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。
根据下面参考附图对示例性实施例的详细说明,本公开的其它特征及方面将变得清楚。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。
图1示出根据本公开一实施例的图像处理方法的流程图;
图2示出本公开一示例性的对待处理图像进行导引点设置的示意图;
图3出本公开一示例性的光流示意图;
图4示出本公开一示例的稀疏运动及二元掩模的示意图;
图5示出根据本公开一实施例的图像处理方法的流程图;
图6示出本公开一实施例的第一神经网络的示意图;
图7示出根据本公开一实施例的图像处理方法的流程图;
图8出本公开一示例性的视频生成过程示意图;
图9示出根据本公开一实施例的图像处理方法的流程图;
图10出本公开一示例性的掩模生成过程示意图;
图11示出根据本公开一实施例的网络训练方法的流程图;
图12示出根据本公开一实施例的图像处理装置的结构框图;
图13示出根据本公开一实施例的网络训练装置的结构框图;
图14是根据一示例性实施例示出的一种电子设备800的框图;
图15是根据一示例性实施例示出的一种电子设备1900的框图。
具体实施方式
以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。
另外,为了更好地说明本公开,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。
图1示出根据本公开一实施例的图像处理方法的流程图。该图像处理方法可以由终端设备或其它处理设备执行,其中,终端设备可以为用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字处理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备等。其它处理设备可为服务器或云端服务器等。在一些可能的实现方式中,该图像处理方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。
如图1所示,该方法可以包括:
步骤101、确定在待处理图像上针对目标对象设置的导引组,所述导引组中包括至少一个导引点,所述导引点用于指示采样像素的位置、采样像素的运动速度的大小及方向。
举例来说,可以在待处理图像上针对目标对象设置至少一个导引点,该至少一个导引点可以组成一个导引组。其中,任一导引点可以对应一个采样像素,该导引点可以包括该导引点对应的采样像素的位置、采样像素的运动速度的大小和方向。
示例性,可以在待处理图像中的目标对象上确定多个采样像素,并在该多个采样像素上设置导引点(包括设置该采样像素的运动速度的大小及方向)。
图2示出本公开一示例性的对待处理图像进行导引点设置的示意图。
例如:参照图2所示的待处理图像,该待处理图像中的目标对象为人,也即本示例需要预测人的运动。则可以在人的身体及头部等关键位置设置导引点,该导引点可以通过箭头的形式来表示,其中,箭头的长度映射该导引点指示的采样像素的运动速度的大小(以下简称为导引点指示的运动速度的大小),箭头的方向可以映射该导引点指示的采样像素的运动速度的方向(以下简称为导引点指示的运动速度的方向)。用户可以通过设置箭头的方向来设置导引点指示的运动速度的方向,可以通过设置箭头的长度来设置导引点指示的运动速度的大小(或者,可以通过输入框输入导引点指示的运动速度的大小);或者,在选定导引点的位置后,可以通过输入框输入导引点指示的运动速度的方向(导引点指示的运动速度的方向可以通过角度(0~360°)来表示)和运动速度的大小。本公开对于导引点的设置方式不做具体限定。
步骤102、根据所述导引组中的所述导引点及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动。
在一种可能的实现方式中,上述步骤102、根据所述导引组中的所述导引点及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动,可以包括:
将所述导引组中的所述导引点及所述待处理图像输入到第一神经网络进行光流预测,得到所述待处理图像中目标对象的运动。
举例来说,上述第一神经网络可以为通过大量训练样本进行训练得到的,用于将导引点指示的运动速度的大小和方向进行全图传播来进行光流预测的网络。在获取导引组后,可以将导引组中针对目标对象设置的导引点(位置、运动速度的大小和方向)及待处理图像输入第一神经网络中进行光流预测,以通过设置的导引点对待处理图像中目标对象对应的像素的运动进行导引,得到待处理图像中目 标对象的运动。上述第一神经网络可以为条件运动传播网络。
图3出本公开一示例性的光流示意图。
示例性的,如图3第一行图像所示,依次针对待处理图像中的人物的左脚设置一个导引点、针对待处理图像中的人物的左脚和左腿分别各设置一个导引点、针对待处理图像中人物的左脚、左腿和头部分别各设置一个导引点、针对待处理图像中人物的左脚、左腿、头部和躯干分别各设置一个导引点、针对待处理图像中人物的左脚、左腿、头部、躯干及右腿分别各设置一个导引点。则分别将上述五种导引点的设置方式所设置的导引点输入第一神经网络后,生成人物的左脚对应的运动,生成人物的左脚和左腿对应的运动,生成人物的左脚、左腿和头部对应的运动,生成人物的左脚、左腿、头部和躯干对应的运动,生成人物的左脚、左腿、头部、躯干及右腿对应的运动。其中上述五种导引点的设置方式所生成的运动对应的光流图如图3中第2行图像所示。第一神经网络可以为条件运动传播网络。
这样,可以在获取待处理图像上针对目标对象设置的包括至少一个导引点的导引组后,根据导引组中包括的导引点及待处理图像进行光流预测,得到待处理图像中目标对象的运动。根据本公开实施例提供的图像处理方法,可以基于导引点的导引来预测目标对象的运动,不依赖于目标对象与其运动的强关联假设,可以提高预测目标对象的运动的质量。
在一种可能的实现方式中,上述步骤102、所述根据所述导引组中的所述导引点及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动,可以包括:
根据所述导引组中的所述导引点指示的采样像素的运动速度的大小及方向、所述导引组中的导引点指示的采样像素的位置、以及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动。
举例来说,可以将导引组中的导引点及所述待处理图像输入第一神经网络,第一神经网络将导引点指示的运动速度的大小及方向、以及导引组中的导引点指示的采样像素的位置,在待处理图像上进行全图传播,以根据导引点对待处理图像中目标对象的运动进行导引,得到待处理图像中目标对象的运动。
在一种可能的实现方式中,上述步骤102、所述根据所述导引组中的所述导引点及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动,可以包括:
根据所述导引组中的所述导引点指示的采样像素的运动速度的大小及方向,生成待处理图像中目标对象对应的稀疏运动,所述稀疏运动用于指示所述目标对象的各采样像素的运动速度的大小和方向;
根据所述导引组中的所述导引点指示的采样像素的位置,生成待处理图像中目标对象对应的二元掩模;
根据所述稀疏运动、所述二元掩模及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动。
图4示出本公开一示例的稀疏运动及二元掩模的示意图。
举例来说,可以根据导引组中的所有导引点指示的运动速度的大小和方向生成待处理图像中目标对象对应的稀疏运动,该稀疏运动用于指示目标对象的各采样像素的运动速度的大小和方向(如图2所示的待处理图像,其导引点对应的稀疏运动可以参照图4);可以根据导引组中的所有导引点指示的 位置,生成待处理图像中目标对象对应的二元掩模,该二元掩模可以用于指示目标对象的各采样像素的位置(如图2所示的待处理图像,其导引点对应的二元掩模可以参照图4)。
举例来说,可以将上述稀疏运动、二元掩模、及所述待处理图像输入第一神经网络中进行光流预测,可以得到该待处理图像中目标对象的运动。第一神经网络可以为条件运动传播网络。
根据本公开实施例提供的图像处理方法,可以基于导引点的导引来预测目标对象的运动,不依赖于目标对象与其运动的强关联假设,可以提高预测目标对象的运动的质量。
图5示出根据本公开一实施例的图像处理方法的流程图;图6示出本公开一实施例的第一神经网络的示意图。
在一种可能的实现方式中,所述第一神经网络可以包括第一编码网络、第二编码网络及解码网络(如图6所示),参照图5和图6,上述根据所述稀疏运动、所述二元掩模及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动,可以包括:
步骤1021、对所述待处理图像中目标对象对应的稀疏运动及二元掩模进行特征提取,得到第一特征;
举例来说,可以将待处理图像中目标对象对应的稀疏运动及二元掩模输入第一编码网络中进行特征提取,得到第一特征。上述第一编码网络可以为用于对目标对象的稀疏运动及二元掩模进行编码,得到紧凑的稀疏运动特征的神经网络,该紧凑的稀疏运动特征即为第一特征。例如:第一编码网络可以为由两个Conv-BN-ReLU-Pooling块(卷积-批量标准化-激活-池化)组成的神经网络。
步骤1022、对所述待处理图像中进行特征提取,得到第二特征。
举例来说,可以将所述待处理图像输入第二编码网络中进行特征提取,得到第二特征。上述第二编码网络可以用于对待处理图像进行编码,以从静态的待处理图像中提取目标对象的运动学属性(例如:提取出人物的小腿是刚体结构、整体运动等特征),得到深层特征,该深层特征为第二特征。第二编码网络为一个神经网络,例如:可以为由AlexNet/ResNet-50及一个卷积层组成的神经网络。
步骤1023、将所述第一特征及所述第二特征进行连结处理,得到第三特征。
举例来说,上述第一特征及第二特征均为张量,可以对第一特征及第二特征进行连结处理,得到第三特征,该第三特征也为张量。
示例性的,假设第一特征的维度为c1×h×w,第二特征的维度为c2×h×w,则连结处理后,得到的第三特征的维度可以为(c1+c2)×h×w。
步骤1024、对所述第三特征进行光流预测,得到所述待处理图像中目标对象的运动。
举例来说,可以将上述第三特征输入解码网络中进行光流预测,得到待处理图像中目标对象的运动。上述解码网络用于根据第三特征进行光流预测,解码网络的输出为待处理图像中目标对象的运动。
在一种可能的实现方式中,上述解码网络可以包括至少两个传播网络及一个融合网络,所述对所述第三特征进行光流预测,得到所述待处理图像中目标对象的运动,可以包括:
将所述第三特征分别输入至少两个传播网络进行全图传播处理,得到各个传播网络对应的传播结果;
将所述各个传播网络对应的传播结果输入所述融合网络中进行融合处理,得到所述待处理图像中目标对象的运动。
举例来说,上述解码网络可以包括至少两个传播网络及一个融合网络,每个传播网络可以包括一个最大值池化层(max pooling layer)及两个堆叠的Conv-BN-ReLU块,融合网络可以包括单个卷积层。可以将上述第三特征分别输入各个传播网络中,由各个传播网络将上述第三特征传播至待处理图像的全图中,以通过第三特征恢复待处理图像的全图运动,得到各个传播网络对应的传播结果。
示例性的,解码网络可以包括三个传播网络,该三个传播网络是由不同空间步长的卷积神经网络构造而成的,例如:空间步长分别为:1,2,4的卷积神经网络,可以构造三个传播网络,传播网络1可以由步长为1的卷积神经网络构成,传播网络2可以由步长为2的卷积神经网络构成,传播网络3可以由步长为4的卷积神经网络构成。
融合网络可以将各个传播网络的传播结果进行融合处理,得到对应的目标对象的运动。上述第一神经网络可以为条件运动传播网络。
根据本公开实施例提供的图像处理方法,可以基于导引点的导引来预测目标对象的运动,不依赖于目标对象与其运动的强关联假设,可以提高预测目标对象的运动的质量。
图7示出根据本公开一实施例的图像处理方法的流程图。
在一种可能的实现方式中,参照图7,上述步骤101、所述确定在待处理图像上针对目标对象设置的导引组,可以包括:
步骤1011、确定在待处理图像上针对目标对象设置的多个导引组,其中,所述多个导引组中有至少一个导引点不同。
举例来说,用户可以针对目标对象设置多个导引组,每个导引组中可以包括至少一个导引点,且不同导引组中的至少一个导引点不同。
图8出本公开一示例性的视频生成过程示意图。
示例性的,参照图8,用户针对待处理图像中的目标对象依次设置了3个导引组,其中,导引组1中包括导引点1、导引点2、导引点3。导引组2中包括导引点4、导引点5、导引点6。导引组3中包括导引点7、导引点8、导引点9。
需要说明的是,不同导引组中设置的导引点可以设置于同一位置(例如:图8中,导引组1中的导引点1、导引组2中的导引点4、导引组3中的导引点7设置于同一位置,但各自指示的运动速度的大小和方向不同),也可以设置于不同位置,或者不同的导引组中也可以具有设置于同一位置、指示的运动速度的大小及方向均相同的导引点,本公开实施例对此不做限定。
在一种可能的实现方式中,参照图7,上述步骤102、所述根据所述导引组中的所述导引点及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动,可以包括:
步骤1025、根据各个导引组中的所述导引点及所述待处理图像进行光流预测,得到所述待处理图像中所述目标对象在各个导引组的导引下对应的运动。
举例来说,可以依次将各个导引组的导引点及待处理图像输入第一神经网络中进行光流预测,得到待处理图像中目标对象在各个导引组的导引下对应的运动。
示例性的,可以将导引组1及待处理图像输入第一神经网络中进行光流预测,得到待处理图像中目标对象在导引组1的导引下对应的运动1、将导引组2及待处理图像输入第一神经网络中进行光流预测,得到待处理图像中目标对象在导引组2的导引下对应的运动2、将导引组3及待处理图像输入第一 神经网络中进行光流预测,得到待处理图像中目标对象在导引组3的导引下对应的运动3。第一神经网络可以为条件运动传播网络。
在一种可能的实现方式中,参照图7,所述方法还包括:
步骤103、将所述待处理图像依据所述目标对象在各个导引组的导引下对应的运动进行映射,得到各个导引组对应的新图像;
步骤104、根据所述待处理图像及所述各个导引组对应的新图像,生成视频。
举例来说,可以将待处理图像中各个像素依据该像素对应的运动(运动速度的大小和方向)进行映射,得到对应的新图像。
示例性的,某一像素在待处理图像中的位置为(X,Y),其在运动1中对应的运动信息包括:运动速度的方向110度,运动速度的大小(x1,y1),则映射后,该像素在110度的方向上以运动速度的大小(x1,y1)进行移动,移动后该像素点在待处理图像上的位置为(X1,Y1)。根据运动1对待处理图像中的各个像素进行映射后,可以得到新图像1。依此类推,根据运动2对待处理图像中的各个像素进行映射后,可以得到新图像2,根据运动3对待处理图像中的各个像素进行映射后,可以得到新图像3,参照图8。
在根据各个导引组得到对应的新图像后,待处理图像及各个导引组对应的新图像可以组成图像序列,依据该图像序列可以生成对应的视频,例如图8所示的待处理图像及新图像1、新图像2、新图像3可以对应生成一段内容为人舞动手臂和腿的视频。
这样一来,用户可以通过设置导引点,通过导引点指定目标对象的运动方向和运动速度,进而生成相应的视频,生成的视频更符合用户的期望,质量更好,并且丰富了视频的生成方式。
图9示出根据本公开一实施例的图像处理方法的流程图。
在一种可能的实现方式中,参照图9,上述步骤101、确定在待处理图像上针对目标对象设置的导引组,可以包括:
步骤1012、确定在所述待处理图像上针对第一目标对象设置的至少一个第一导引点;
举例来说,用户可以在待处理图像上针对第一目标对象确定至少一个第一导引点的位置,并在对应的位置设置第一导引点。
步骤1013、根据所述至少一个第一导引点生成多个导引组,同一导引组中的第一导引点的方向相同,不同导引组中的第一导引点的方向不同。
获取第一导引点后,可以为每一个第一导引点设置多个方向,以生成多个导引组。例如:设置导引组1中的第一导引点的方向为上,导引组2中的第一导引点的方向为下,导引组3中的第一导引点的方向为左,导引组4中的第一导引点的方向为右。第一导引点的运动速度不为0。其中,导引点的方向,可以理解为是,导引点指示的采样像素的运动速度的方向。
在一种可能的实现方式中,参照图9,步骤102、根据获取的所述导引组中的所述导引点及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动,可以包括:
步骤1025、根据各个导引组中的所述第一导引点及所述待处理图像进行光流预测,得到所述待处理图像中所述第一目标对象在各个导引组的导引下对应的运动。
在得到对应各个方向的导引组后,可以根据各个导引组对目标对象进行光流预测,以得到目标对 象在各个方向上的运动。
示例性的,可以将任一导引组中的第一导引点及待处理图像输入第一神经网络中进行光流预测,得到目标对象在该导引组对应的方向上的运动。
在一种可能的实现方式中,参照图9,上述方法还可以包括:
步骤105、将所述待处理图像中所述第一目标对象在各个导引组的导引下对应的运动进行融合,得到所述待处理图像中第一目标对象对应的掩模。
在得到第一目标对象在各个方向上对应的运动后,可以将各个方向上的运动进行融合(例如:采用求均值、求交集或者求并集等方式,本公开实施例对融合方式不作具体限定),即可以得到该待处理图像中第一目标对象对应的掩模。
图10出本公开一示例性的掩模生成过程示意图。
示例性的,如图10所示,用户针对待处理图像中的人物1进行了第一导引点的设置(设置了5个第一导引点)。针对用户设置的5个第一导引点分别在上、下、左、右四个方向上生成了4个导引组。根据第一神经网络及4个导引组对人物1进行光流预测,得到目标对象在上、下、左、右四个方向上的运动:运动1、运动2、运动3、运动4。将4个导引组对应的运动1、运动2、运动3、运动4进行融合,得到了人物1的掩模。第一神经网络可以为条件运动传播网络。
在一种可能的实现方式中,上述方法还可以包括:
确定在待处理图像上设置的至少一个第二导引点,其中,所述第二导引点的运动速度为0;
举例来说,第二目标对象可以为对第一目标对象造成遮挡或者是靠近第一目标对象的对象。在设置针对第一目标对象的第一导引点时,可以同时设置针对第二目标对象的第二导引点。
示例性的,可以通过第一导引点设置工具设置第一导引点,通过第二导引点设置工具设置第二导引点。或者,在设置导引点时,可以通过选择第一导引点或者第二导引点对应的选项,确定该导引点为第一导引点或者第二导引点。在显示界面上,第一导引点与第二导引点的颜色不同(例如:第一导引点为绿色,第二导引点为红色),或者第一导引点与第二导引点的形状不同(第一导引点为圆圈,第二导引点为叉号)。
在本公开实施例中,所述根据各个导引组中的所述第一导引点及所述待处理图像进行光流预测,得到所述待处理图像中所述第一目标对象在各个导引组的导引下对应的运动,可以包括:
所述依次根据各个导引组中的所述第一导引点、第二导引点及所述待处理图像进行光流预测,得到所述待处理图像中所述第一目标对象在各个导引组的导引下对应的运动。
由于第一导引点具有运动速度,第二导引点运动速度为0,则在第一导引点附近可以产生光流,第二导引点附近不产生光流,这样一来,能够在第一目标对象的掩模中被遮掩的部分或者第一目标对象的临近部分不生成掩模,可以提高生成的掩模的质量。
这样,用户只需设定待处理图像中针对第一目标对象的第一导引点(或者还可以包括第二导引点)的位置,即可以生成第一目标对象的掩模,鲁棒性更好,简化了用户的操作,也即提高了掩模生成效率和质量。
图11示出根据本公开一实施例的网络训练方法的流程图。该网络训练方法可以由终端设备或其它处理设备执行,其中,终端设备可以为用户设备(User Equipment,UE)、移动设备、用户终端、终 端、蜂窝电话、无绳电话、个人数字处理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备等。其它处理设备可为服务器或云端服务器等。在一些可能的实现方式中,该图像处理方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。
参照图11,所述方法可以包括:
步骤1101、获取第一样本组,所述第一样本组包括待处理图像样本及所述待处理图像样本中目标对象对应的第一运动;
步骤1102、对所述第一运动进行采样处理,得到所述待处理图像样本中目标对象对应的稀疏运动及二元掩模;
步骤1103、将所述待处理图像样本中目标对象对应的稀疏运动、二元掩模及所述待处理图像样本输入到第一神经网络中进行光流预测,得到所述待处理图像样本对应的第二运动;
步骤1104、根据所述第一运动与所述第二运动,确定所述第一神经网络的运动损失;
步骤1105、根据所述运动损失,调整所述第一神经网络的参数。
举例来说,可以设置第一样本组。例如:从一段视频中获取间隔小于帧值阈值(例如:10帧)的图像组合计算光流,假设从一段视频始终获取包括5帧视频帧的视频片段1、4、10、21、28。其中间隔小于10帧的视频帧组合包括:[1,4]、[4,10]、[21,28],则可以依据各视频帧组合中的两个视频帧图像计算对应的光流,并以视频帧组合中帧数较小的那一帧图像作为待处理图像样本,该视频帧组合对应的光流作为该待处理图像样本对应的第一运动。
在一种可能的实现方式中,所述对所述第一运动进行采样处理,得到所述待处理图像样本中目标对象对应的稀疏运动及二元掩模,可以包括:
对所述第一运动进行边缘提取处理,得到所述第一运动对应的边缘图;
从所述边缘图中确定至少一个关键点;
根据所述至少一个关键点的位置得到所述待处理图像样本中目标对象对应的二元掩模,根据所述至少一个关键点对应的运动,得到所述待处理图像样本中目标对象对应的稀疏运动,其中,关键点对应的运动为关键点对应的像素在第一运动中对应的运动,关键点对应的像素即关键点在边缘图中对应的像素。
举例来说,可以对第一运动进行边缘提取处理,例如:通过分水岭算法对第一运动进行边缘提取处理,得到第一运动对应的边缘图。然后可以从所述边缘图中边缘内部区域中确定至少一个关键点,这样关键点可以均落入目标对象中。例如:可以采用内核大小为K的非最大抑制算法从边缘图中确定至少一个关键点,K越大,则对应关键点的数量越小。
所有的关键点在待处理图像样本中的位置构成了目标对象的二元掩模,所有的关键点对应的像素在第一运动中对应的运动,构成了待处理图像样本中目标对象对应的稀疏运动。
将待处理图像样本对应的二元掩模及稀疏运动输入第一神经网络中进行光流预测,可以得到待处理图像样本中目标对象对应的第二运动。通过损失函数(例如:交叉熵损失函数)确定第一运动与第二运动之间的运动损失。在第一运动与第二运动之间的运动损失满足训练精度要求(例如:小于预设的损失阈值)时,确定第一神经网络训练完成,停止训练操作;否则,调整第一神经网络中的参数,并继续根据第一样本组训练第一神经网络。
在一种可能的实现方式中,第一神经网络可以为条件运动传播网络。
举例来说,第一神经网络可以包括第一编码网络,第二编码网络及解码网络,其中第一编码网络、第二编码网络及解码网络的结构可以参照前述实施例,本公开实施例对此不再赘述。
示例性的,可以根据需要针对性的训练第一神经网络。例如:在训练应用于人脸识别的第一神经网络时,第一样本组中的待处理图像样本可以为人的脸部图像;在训练应用于人的肢体识别的第一神经网络中时,第一样本组中的待处理图像样本可以为人的身体的图像。
这样,本公开实施例可以通过没有标注的大量图像样本对第一神经网络进行无监督训练,训练得到的第一神经网络可以依据导引点的导引进行目标对象的运动预测,不依赖于目标对象与其运动的强关联假设,可以提高预测目标对象的运动的质量。并且,第一神经网络中的第一编码网络可以作为图像编码器用于大量高级视觉任务(例如:目标检测、语义分割、实例分割、人体解析)中,可以根据第一神经网络中的第二编码网络的参数,初始化上述高级视觉任务对应的网络中的图像编码器的参数,可以使得高级视觉任务中对应的网络在初始化时即具有较好的性能,可以极大的提升高级视觉任务中对应的网络的性能。
可以理解,本公开提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例,限于篇幅,本公开不再赘述。
此外,本公开还提供了图像处理装置、电子设备、计算机可读存储介质、程序,上述均可用来实现本公开提供的任一种图像处理方法,相应技术方案和描述和参见方法部分的相应记载,不再赘述。
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。
图12示出根据本公开一实施例的图像处理装置的结构框图。如图12所示,该装置可以包括:
第一确定模块1201,可以用于确定在待处理图像上针对目标对象设置的导引组,所述导引组中包括至少一个导引点,所述导引点用于指示采样像素的位置、采样像素的运动速度的大小及方向;所述采样像素为所述待处理图像中目标对象的像素;
预测模块1202,可以用于根据所述导引组中的所述导引点及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动。
这样,可以在获取待处理图像上针对目标对象设置的包括至少一个导引点的导引组后,根据导引组中包括的导引点及待处理图像进行光流预测,得到待处理图像中目标对象的运动。根据本公开实施例提供的图像处理装置,可以基于导引点的导引来预测目标对象的运动,不依赖于目标对象与其运动的强关联假设,可以提高预测目标对象的运动的质量。
在一种可能的实现方式中,所述预测模块,还可以用于:
根据所述导引组中的所述导引点指示的采样像素的运动速度的大小及方向、所述导引组中的导引点指示的采样像素的位置、以及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动。
在一种可能的实现方式中,所述预测模块,还可以用于:
根据所述导引组中的所述导引点所指示的采样像素的运动速度的大小及方向,生成待处理图像中 目标对象对应的稀疏运动,所述稀疏运动用于指示所述目标对象的各采样像素的运动速度的大小和方向;
根据所述导引组中的所述导引点指示的采样像素的位置,生成待处理图像中目标对象对应的二元掩模,所述二元掩模用于指示所述目标对象的各采样像素的位置;
根据所述稀疏运动、所述二元掩模及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动。
在一种可能的实现方式中,所述预测模块,还可以用于:
将所述导引组中的所述导引点及所述待处理图像输入到第一神经网络进行光流预测,得到所述待处理图像中目标对象的运动。
在一种可能的实现方式中,所述预测模块,还可以包括:
稀疏运动编码模块,用于对所述待处理图像中目标对象对应的稀疏运动及二元掩模进行特征提取,得到第一特征;
图像编码模块,用于对所述待处理图像进行特征提取,得到第二特征;
连接模块,用于将所述第一特征及所述第二特征进行连结处理,得到第三特征;
稠密运动解码模块,用于对所述第三特征进行光流预测,得到所述待处理图像中目标对象的运动。
在一种可能的实现方式中,所述稠密运动解码模块还可以用于:
将所述第三特征分别输入至少两个传播网进行全图传播处理,得到各个传播网对应的传播结果;
将所述各个传播网对应的传播结果输入所述融合网中进行融合处理,得到所述待处理图像中目标对象的运动。
在一种可能的实现方式中,所述第一确定模块还可以用于:
确定在待处理图像上针对目标对象设置的多个导引组,其中,所述多个导引组中有至少一个导引点不同。
在一种可能的实现方式中,所述预测模块还可以用于:
根据各个导引组中的所述导引点及所述待处理图像进行光流预测,得到,所述待处理图像中所述目标对象在各个导引组的导引下对应的运动。
在一种可能的实现方式中,所述装置还可以包括:
映射模块,用于将所述待处理图像依据所述目标对象在各个导引组的导引下对应的运动进行映射,得到各个导引组对应的新图像;
视频生成模块,用于根据所述待处理图像及所述各个导引组对应的新图像,生成视频。
在一种可能的实现方式中,所述第一确定模块还可以用于:
确定在所述待处理图像上针对第一目标对象设置的至少一个第一导引点;
根据所述至少一个第一导引点生成多个导引组,同一导引组中的第一导引点的方向相同,不同导引组中的第一导引点的方向不同。
在一种可能的实现方式中,所述预测模块还可以用于:
根据各个导引组中的所述第一导引点及所述待处理图像进行光流预测,得到所述待处理图像在中所述第一目标对象各个导引组的导引下对应的运动。
在一种可能的实现方式中,所述装置还可以包括:
融合模块,用于将所述待处理图像中所述第一目标对象在各个导引组的导引下对应的运动进行融合,得到所述待处理图像中第一目标对象对应的掩模。
在一种可能的实现方式中,所述装置还可以包括:
第二确定模块,可以用于确定在待处理图像上设置的至少一个第二导引点,其中,所述第二导引点的运动速度为0;
所述预测模块还可以用于:
根据各个导引组中的所述第一导引点、第二导引点及所述待处理图像进行光流预测,得到所述待处理图像中所示第一目标对象在各个导引组的导引下对应的运动。
图13示出根据本公开实施例的网络训练装置的结构框图。如图13所示,所述装置可以包括:
获取模块1301,可以用于获取第一样本组,所述第一样本组包括待处理图像样本及所述待处理图像样本中目标对象对应的第一运动;
处理模块1302,可以用于对所述第一运动进行采样处理,得到所述待处理图像样本中目标对象对应的稀疏运动及二元掩模;
预测模块1303,可以用于将所述待处理图像样本中目标对象对应的稀疏运动、二元掩模及所述待处理图像样本输入到第一神经网络中进行光流预测,得到所述待处理图像样本中目标对象对应的第二运动;
确定模块1304,可以用于根据所述第一运动与所述第二运动,确定所述第一神经网络的运动损失;
调整模块1305,可以用于根据所述运动损失,调整所述第一神经网络的参数。
在一种可能的实现方式中,第一神经网络可以为条件运动传播网络。
在一种可能的实现方式中,所述处理模块还可以用于:
对所述第一运动进行边缘提取处理,得到所述第一运动对应的边缘图;
从所述边缘图中确定至少一个关键点;
根据所述至少一个关键点的位置得到所述待处理图像样本中目标对象对应的二元掩模,根据所述至少一个关键点对应的运动,得到所述待处理图像样本中目标对象对应的稀疏运动。
这样,本公开实施例可以通过没有标注的大量图像样本对第一神经网络进行无监督训练,训练得到的第一神经网络可以依据导引点的导引进行目标对象的运动预测,不依赖于目标对象与其运动的强关联假设,可以提高预测目标对象的运动的质量。并且,第一神经网络中的第一编码网络可以作为图像编码器用于大量高级视觉任务(例如:目标检测、语义分割、实例分割、人体解析)中,可以根据第一神经网络中的第二编码网络的参数,初始化上述高级视觉任务对应的网络中的图像编码器的参数,可以使得高级视觉任务中对应的网络在初始化时即具有较好的性能,可以极大的提升高级视觉任务中对应的网络的性能。
在一些实施例中,本公开实施例提供的装置具有的功能或包含的模块可以用于执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述,为了简洁,这里不再赘述。
本公开实施例还提出一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。计算机可读存储介质可以是非易失性计算机可读存储介质。
本公开实施例还提出一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为上述方法。
本公开实施例还提出一种计算机程序,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备的处理器执行用于实现上述方法。
电子设备可以被提供为终端、服务器或其它形态的设备。
图14是根据一示例性实施例示出的一种电子设备800的框图。例如,电子设备800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等终端。
参照图14,电子设备800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(I/O)的接口812,传感器组件814,以及通信组件816。
处理组件802通常控制电子设备800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。
存储器804被配置为存储各种类型的数据以支持在电子设备800的操作。这些数据的示例包括用于在电子设备800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件806为电子设备800的各种组件提供电力。电源组件806可以包括电源管理***,一个或多个电源,及其他与为电子设备800生成、管理和分配电力相关联的组件。
多媒体组件808包括在所述电子设备800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当电子设备800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜***或具有焦距和光学变焦能力。
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),当电子设备800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。
I/O接口812为处理组件802和***接口模块之间提供接口,上述***接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件814包括一个或多个传感器,用于为电子设备800提供各个方面的状态评估。例如,传 感器组件814可以检测到电子设备800的打开/关闭状态,组件的相对定位,例如所述组件为电子设备800的显示器和小键盘,传感器组件814还可以检测电子设备800或电子设备800一个组件的位置改变,用户与电子设备800接触的存在或不存在,电子设备800方位或加速/减速和电子设备800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件816被配置为便于电子设备800和其他设备之间有线或无线方式的通信。电子设备800可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理***的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件816还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。
在示例性实施例中,电子设备800可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器804,上述计算机程序指令可由电子设备800的处理器820执行以完成上述方法。
图15是根据一示例性实施例示出的一种电子设备1900的框图。例如,电子设备1900可以被提供为一服务器。参照图15,电子设备1900包括处理组件1922,其进一步包括一个或多个处理器,以及由存储器1932所代表的存储器资源,用于存储可由处理组件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1922被配置为执行指令,以执行上述方法。
电子设备1900还可以包括一个电源组件1926被配置为执行电子设备1900的电源管理,一个有线或无线网络接口1950被配置为将电子设备1900连接到网络,和一个输入输出(I/O)接口1958。电子设备1900可以操作基于存储在存储器1932的操作***,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM或类似。
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器1932,上述计算机程序指令可由电子设备1900的处理组件1922执行以完成上述方法。
本公开可以是***、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开的各个方面的计算机可读程序指令。
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多 功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。
这里参照根据本公开实施例的方法、装置(***)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。
附图中的流程图和框图显示了根据本公开的多个实施例的***、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如, 两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的***来实现,或者可以用专用硬件与计算机指令的组合来实现。
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。

Claims (35)

  1. 一种图像处理方法,其特征在于,包括:
    确定在待处理图像上针对目标对象设置的导引组,所述导引组中包括至少一个导引点,所述导引点用于指示采样像素的位置、采样像素的运动速度的大小及方向;所述采样像素为所述待处理图像中目标对象的像素;
    根据所述导引组中的所述导引点及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述导引组中的所述导引点及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动,包括:
    根据所述导引组中的所述导引点指示的采样像素的运动速度的大小及方向、所述导引组中的导引点指示的采样像素的位置、以及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动。
  3. 根据权利要求1或2所述的方法,其特征在于,所述根据所述导引组中的所述导引点及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动,包括:
    根据所述导引组中的所述导引点指示的采样像素的运动速度的大小及方向,生成待处理图像中目标对象对应的稀疏运动,所述稀疏运动用于指示所述目标对象的各采样像素的运动速度的大小和方向;
    根据所述导引组中的所述导引点指示的采样像素的位置,生成待处理图像中目标对象对应的二元掩模,所述二元掩模用于指示所述目标对象的各采样像素的位置;
    根据所述稀疏运动、所述二元掩模及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动。
  4. 根据权利要求1至3任一项所述的方法,其特征在于,所述根据所述导引组中的所述导引点及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动,包括:
    将所述导引组中的所述导引点及所述待处理图像输入到第一神经网络进行光流预测,得到所述待处理图像中目标对象的运动。
  5. 根据权利要求3所述的方法,其特征在于,所述根据所述稀疏运动、所述二元掩模及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动,包括:
    对所述待处理图像中目标对象对应的稀疏运动及二元掩模进行特征提取,得到第一特征;
    对所述待处理图像进行特征提取,得到第二特征;
    将所述第一特征及所述第二特征进行连结处理,得到第三特征;
    对所述第三特征进行光流预测,得到所述待处理图像中目标对象的运动。
  6. 根据权利要求5所述的方法,其特征在于,所述对所述第三特征进行光流预测,得到所述待处理图像中目标对象的运动,包括:
    将所述第三特征分别输入至少两个传播网络进行全图传播处理,得到各个传播网络对应的传播结果;
    将所述各个传播网络对应的传播结果输入融合网络中进行融合处理,得到所述待处理图像中目标对象的运动。
  7. 根据权利要求1至6任一项所述的方法,其特征在于,所述确定在待处理图像上针对目标对象设置的导引组,包括:
    确定在待处理图像上针对目标对象设置的多个导引组,其中,所述多个导引组中有至少一个导引点不同。
  8. 根据权利要求7所述的方法,其特征在于,所述根据所述导引组中的所述导引点及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动,包括:
    根据各个导引组中的所述导引点及所述待处理图像进行光流预测,得到所述待处理图像中所述目标对象在各个导引组的导引下对应的运动。
  9. 根据权利要求8所述的方法,其特征在于,所述方法还包括:
    将所述待处理图像依据所述目标对象在各个导引组的导引下对应的运动进行映射,得到各个导引组对应的新图像;
    根据所述待处理图像及所述各个导引组对应的新图像,生成视频。
  10. 根据权利要求1至6任一项所述的方法,其特征在于,确定在待处理图像上针对目标对象设置的导引组,包括:
    确定在所述待处理图像上针对第一目标对象设置的至少一个第一导引点;
    根据所述至少一个第一导引点生成多个导引组,同一导引组中的第一导引点的方向相同,不同导引组中的第一导引点的方向不同。
  11. 根据权利要求10所述的方法,其特征在于,所述根据所述导引组中的所述导引点及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动,包括:
    根据各个导引组中的所述第一导引点及所述待处理图像进行光流预测,得到所述待处理图像中所述第一目标对象在各个导引组的导引下对应的运动。
  12. 根据权利要求11所述的方法,其特征在于,所述方法还包括:
    将所述待处理图像中所述第一目标对象在各个导引组的导引下对应的运动进行融合,得到所述待处理图像中第一目标对象对应的掩模。
  13. 根据权利要求11或12所述的方法,其特征在于,所述方法还包括:
    确定在待处理图像上设置的至少一个第二导引点,其中,所述第二导引点的运动速度为0;
    所述根据各个导引组中的所述第一导引点及所述待处理图像进行光流预测,得到所述待处理图像中所述第一目标对象在各个导引组的导引下对应的运动,包括:
    根据各个导引组中的所述第一导引点、所述第二导引点及所述待处理图像进行光流预测,得到所述待处理图像中所述第一目标对象在各个导引组的导引下对应的运动。
  14. 一种网络训练方法,其特征在于,所述方法包括:
    获取第一样本组,所述第一样本组包括待处理图像样本及所述待处理图像样本中目标对象对应的第一运动;
    对所述第一运动进行采样处理,得到所述待处理图像样本中目标对象对应的稀疏运动及二元掩模;
    将所述待处理图像样本中目标对象对应的稀疏运动、二元掩模及所述待处理图像样本输入到第一 神经网络中进行光流预测,得到所述待处理图像样本中目标对象对应的第二运动;
    根据所述第一运动与所述第二运动,确定所述第一神经网络的运动损失;
    根据所述运动损失,调整所述第一神经网络的参数。
  15. 根据权利要求14所述的方法,其特征在于,所述第一神经网络为条件运动传播网络。
  16. 根据权利要求14或者15所述的方法,其特征在于,所述对所述第一运动进行采样处理,得到所述待处理图像样本中目标对象对应的稀疏运动及二元掩模,包括:
    对所述第一运动进行边缘提取处理,得到所述第一运动对应的边缘图;
    从所述边缘图中确定至少一个关键点;
    根据所述至少一个关键点的位置得到所述待处理图像样本中目标对象对应的二元掩模,根据所述至少一个关键点对应的运动,得到所述待处理图像样本中目标对象对应的稀疏运动。
  17. 一种图像处理装置,其特征在于,包括:
    第一确定模块,用于确定在待处理图像上针对目标对象设置的导引组,所述导引组中包括至少一个导引点,所述导引点用于指示采样像素的位置、采样像素的运动速度的大小及方向;所述采样像素为所述待处理图像中目标对象的像素;
    预测模块,用于根据所述导引组中的所述导引点及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动。
  18. 根据权利要求17所述的装置,其特征在于,所述预测模块,还用于:
    根据所述导引组中的所述导引点指示的采样像素的运动速度的大小及方向、所述导引组中的导引点指示的采样像素的位置、以及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动。
  19. 根据权利要求17或18所述的装置,其特征在于,所述预测模块,还用于:
    根据所述导引组中的所述导引点指示的采样像素的运动速度的大小及方向,生成待处理图像中目标对象对应的稀疏运动,所述稀疏运动用于指示所述目标对象的各采样像素的运动速度的大小和方向;
    根据所述导引组中的所述导引点指示的采样像素的位置,生成待处理图像中目标对象对应的二元掩模,所述二元掩模用于指示所述目标对象的各采样像素的位置;
    根据所述稀疏运动、所述二元掩模及所述待处理图像进行光流预测,得到所述待处理图像中目标对象的运动。
  20. 根据权利要求17至19任一项所述的装置,其特征在于,所述预测模块,还用于:
    将所述导引组中的所述导引点及所述待处理图像输入到第一神经网络进行光流预测,得到所述待处理图像中目标对象的运动。
  21. 根据权利要求19所述的装置,其特征在于,所述预测模块,包括:
    稀疏运动编码模块,用于对所述待处理图像中目标对象对应的稀疏运动及二元掩模进行运动特征提取,得到第一特征;
    图像编码模块,用于对所述待处理图像进行特征提取,得到第二特征;
    连接模块,用于将所述第一特征及所述第二特征进行连结处理,得到第三特征;
    稠密运动解码模块,用于对所述第三特征进行光流预测,得到所述待处理图像中目标对象的运动。
  22. 根据权利要求21所述的装置,其特征在于,所述稠密运动解码模块还用于:
    将所述第三特征分别输入至少两个传播网络进行全图传播处理,得到各个传播网络对应的传播结果;
    将所述各个传播网络对应的传播结果输入融合网络中进行融合处理,得到所述待处理图像中目标对象的运动。
  23. 根据权利要求17至22中任一项所述的装置,其特征在于,所述第一确定模块还用于:
    确定在待处理图像上针对目标对象设置的多个导引组,其中,所述多个导引组中有至少一个导引点不同。
  24. 根据权利要求23所述的装置,其特征在于,所述预测模块还用于:
    根据各个导引组中的所述导引点及所述待处理图像进行光流预测,得到,所述待处理图像中所述目标对象在各个导引组的导引下对应的运动。
  25. 根据权利要求24所述的装置,其特征在于,所述装置还包括:
    映射模块,用于将所述待处理图像依据所述目标对象在各个导引组的导引下对应的运动进行映射,得到各个导引组对应的新图像;
    视频生成模块,用于根据所述待处理图像及所述各个导引组对应的新图像,生成视频。
  26. 根据权利要求17至22任一项所述的装置,其特征在于,所述第一确定模块还用于:
    确定在所述待处理图像上针对第一目标对象设置的至少一个第一导引点;
    根据所述至少一个第一导引点生成多个导引组,同一导引组中的第一导引点的方向相同,不同导引组中的第一导引点的方向不同。
  27. 根据权利要求26所述的装置,其特征在于,所述预测模块还用于:
    根据各个导引组中的所述第一导引点及所述待处理图像进行光流预测,得到所述待处理图像中所述第一目标对象在各个导引组的导引下对应的运动。
  28. 根据权利要求27所述的装置,其特征在于,所述装置还包括:
    融合模块,用于将所述待处理图像中所述第一目标对象在各个导引组的导引下对应的运动进行融合,得到所述待处理图像中第一目标对象对应的掩模。
  29. 根据权利要求28所述的装置,其特征在于,所述装置还包括:
    第二确定模块,用于确定在待处理图像上设置的至少一个第二导引点,其中,所述第二导引点的运动速度为0;
    所述预测模块还用于:
    根据各个导引组中的所述第一导引点、第二导引点及所述待处理图像进行光流预测,得到所述待处理图像中所示第一目标对象在各个导引组的导引下对应的运动。
  30. 一种网络训练装置,其特征在于,所述装置包括:
    获取模块,用于获取第一样本组,所述第一样本组包括待处理图像样本及所述待处理图像样本中目标对象对应的第一运动;
    处理模块,用于对所述第一运动进行采样处理,得到所述待处理图像样本中目标对象对应的稀疏 运动及二元掩模;
    预测模块,用于将所述待处理图像样本中目标对象对应的稀疏运动、二元掩模及所述待处理图像样本输入到第一神经网络中进行光流预测,得到所述待处理图像样本中目标对象对应的第二运动;
    确定模块,用于根据所述第一运动与所述第二运动,确定所述第一神经网络的运动损失;
    调整模块,用于根据所述运动损失,调整所述第一神经网络的参数。
  31. 根据权利要求30所述的装置,其特征在于,所述第一神经网络为条件运动传播网络。
  32. 根据权利要求30或31所述的装置,其特征在于,所述处理模块还用于:
    对所述第一运动进行边缘提取处理,得到所述第一运动对应的边缘图;
    从所述边缘图中确定至少一个关键点;
    根据所述至少一个关键点的位置得到所述待处理图像样本中目标对象对应的二元掩模,根据所述至少一个关键点对应的运动,得到所述待处理图像样本中目标对象对应的稀疏运动。
  33. 一种电子设备,其特征在于,包括:
    处理器;
    用于存储处理器可执行指令的存储器;
    其中,所述处理器被配置为:执行权利要求1至16中任意一项所述的方法。
  34. 一种计算机可读存储介质,其上存储有计算机程序指令,其特征在于,所述计算机程序指令被处理器执行时实现权利要求1至16中任意一项所述的方法。
  35. 一种计算机程序,其特征在于,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备的处理器执行用于实现权利要求1至16中任意一项所述的方法。
PCT/CN2019/114769 2019-01-29 2019-10-31 图像处理方法及装置、网络训练方法及装置 WO2020155713A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
SG11202105631YA SG11202105631YA (en) 2019-01-29 2019-10-31 Image processing method and device, and network training method and device
JP2021524161A JP2022506637A (ja) 2019-01-29 2019-10-31 画像処理方法および装置、ネットワークトレーニング方法および装置
US17/329,534 US20210279892A1 (en) 2019-01-29 2021-05-25 Image processing method and device, and network training method and device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910086044.3A CN109840917B (zh) 2019-01-29 2019-01-29 图像处理方法及装置、网络训练方法及装置
CN201910086044.3 2019-01-29

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/329,534 Continuation US20210279892A1 (en) 2019-01-29 2021-05-25 Image processing method and device, and network training method and device

Publications (1)

Publication Number Publication Date
WO2020155713A1 true WO2020155713A1 (zh) 2020-08-06

Family

ID=66884323

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/114769 WO2020155713A1 (zh) 2019-01-29 2019-10-31 图像处理方法及装置、网络训练方法及装置

Country Status (5)

Country Link
US (1) US20210279892A1 (zh)
JP (1) JP2022506637A (zh)
CN (1) CN109840917B (zh)
SG (1) SG11202105631YA (zh)
WO (1) WO2020155713A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022072199A1 (en) * 2020-09-30 2022-04-07 Qualcomm Incorporated Sparse optical flow estimation
JP2023523502A (ja) * 2021-04-07 2023-06-06 ベイジン バイドゥ ネットコム サイエンス テクノロジー カンパニー リミテッド モデルトレーニング方法、歩行者再識別方法、装置および電子機器

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109840917B (zh) * 2019-01-29 2021-01-26 北京市商汤科技开发有限公司 图像处理方法及装置、网络训练方法及装置
CN109977847B (zh) * 2019-03-22 2021-07-16 北京市商汤科技开发有限公司 图像生成方法及装置、电子设备和存储介质
CN111814589A (zh) * 2020-06-18 2020-10-23 浙江大华技术股份有限公司 部位识别方法以及相关设备、装置
CN116310627B (zh) * 2023-01-16 2024-02-02 浙江医准智能科技有限公司 模型训练方法、轮廓预测方法、装置、电子设备及介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106599789A (zh) * 2016-07-29 2017-04-26 北京市商汤科技开发有限公司 视频类别识别方法和装置、数据处理装置和电子设备
US20170236057A1 (en) * 2016-02-16 2017-08-17 Carnegie Mellon University, A Pennsylvania Non-Profit Corporation System and Method for Face Detection and Landmark Localization
CN108234821A (zh) * 2017-03-07 2018-06-29 北京市商汤科技开发有限公司 检测视频中的动作的方法、装置和***
CN108230353A (zh) * 2017-03-03 2018-06-29 北京市商汤科技开发有限公司 目标跟踪方法、***及电子设备
CN109840917A (zh) * 2019-01-29 2019-06-04 北京市商汤科技开发有限公司 图像处理方法及装置、网络训练方法及装置

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090147851A1 (en) * 2004-11-22 2009-06-11 Koninklijke Philips Electronics, N.V. Motion vector field projection dealing with covering and uncovering
CN100530239C (zh) * 2007-01-25 2009-08-19 复旦大学 基于特征匹配与跟踪的视频稳定方法
JP2013037454A (ja) * 2011-08-05 2013-02-21 Ikutoku Gakuen 姿勢判定方法、プログラム、装置、システム
CN102788572B (zh) * 2012-07-10 2015-07-01 中联重科股份有限公司 一种工程机械吊钩姿态的测量方法、装置及***
CN103593646A (zh) * 2013-10-16 2014-02-19 中国计量学院 一种基于微行为分析的密集人群异常行为检测方法
CN103699878B (zh) * 2013-12-09 2017-05-03 安维思电子科技(广州)有限公司 一种识别电动扶梯异常运行状况的方法和***
JP6525545B2 (ja) * 2014-10-22 2019-06-05 キヤノン株式会社 情報処理装置、情報処理方法及びコンピュータプログラム
JP6655727B2 (ja) * 2016-09-28 2020-02-26 株式会社日立国際電気 監視システム
WO2018069981A1 (ja) * 2016-10-11 2018-04-19 富士通株式会社 運動認識装置、運動認識プログラムおよび運動認識方法
US10482609B2 (en) * 2017-04-04 2019-11-19 General Electric Company Optical flow determination system
EP3611690A4 (en) * 2017-04-10 2020-10-28 Fujitsu Limited DETECTION DEVICE, DETECTION METHOD AND DETECTION PROGRAM

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170236057A1 (en) * 2016-02-16 2017-08-17 Carnegie Mellon University, A Pennsylvania Non-Profit Corporation System and Method for Face Detection and Landmark Localization
CN106599789A (zh) * 2016-07-29 2017-04-26 北京市商汤科技开发有限公司 视频类别识别方法和装置、数据处理装置和电子设备
CN108230353A (zh) * 2017-03-03 2018-06-29 北京市商汤科技开发有限公司 目标跟踪方法、***及电子设备
CN108234821A (zh) * 2017-03-07 2018-06-29 北京市商汤科技开发有限公司 检测视频中的动作的方法、装置和***
CN109840917A (zh) * 2019-01-29 2019-06-04 北京市商汤科技开发有限公司 图像处理方法及装置、网络训练方法及装置

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022072199A1 (en) * 2020-09-30 2022-04-07 Qualcomm Incorporated Sparse optical flow estimation
JP2023523502A (ja) * 2021-04-07 2023-06-06 ベイジン バイドゥ ネットコム サイエンス テクノロジー カンパニー リミテッド モデルトレーニング方法、歩行者再識別方法、装置および電子機器
JP7403673B2 (ja) 2021-04-07 2023-12-22 ベイジン バイドゥ ネットコム サイエンス テクノロジー カンパニー リミテッド モデルトレーニング方法、歩行者再識別方法、装置および電子機器

Also Published As

Publication number Publication date
US20210279892A1 (en) 2021-09-09
CN109840917A (zh) 2019-06-04
JP2022506637A (ja) 2022-01-17
SG11202105631YA (en) 2021-06-29
CN109840917B (zh) 2021-01-26

Similar Documents

Publication Publication Date Title
WO2020155713A1 (zh) 图像处理方法及装置、网络训练方法及装置
TWI766286B (zh) 圖像處理方法及圖像處理裝置、電子設備和電腦可讀儲存媒介
US12014275B2 (en) Method for text recognition, electronic device and storage medium
WO2020224457A1 (zh) 图像处理方法及装置、电子设备和存储介质
WO2021008158A1 (zh) 一种人体关键点检测方法及装置、电子设备和存储介质
WO2021164469A1 (zh) 目标对象的检测方法、装置、设备和存储介质
WO2021051857A1 (zh) 目标对象匹配方法及装置、电子设备和存储介质
US20210248718A1 (en) Image processing method and apparatus, electronic device and storage medium
TW202113680A (zh) 人臉和人手關聯檢測方法及裝置、電子設備和電腦可讀儲存媒體
WO2021253777A1 (zh) 姿态检测及视频处理方法、装置、电子设备和存储介质
CN110909815B (zh) 神经网络训练、图像处理方法、装置及电子设备
WO2020133966A1 (zh) 锚点确定方法及装置、电子设备和存储介质
TW202107339A (zh) 位姿確定方法、位姿確定裝置、電子設備和電腦可讀儲存媒介
CN110458218B (zh) 图像分类方法及装置、分类网络训练方法及装置
CN111462238B (zh) 姿态估计优化方法、装置及存储介质
TWI735112B (zh) 圖像生成方法、電子設備和儲存介質
TW202105202A (zh) 影片處理方法及裝置、電子設備、儲存媒體和電腦程式
CN108881952B (zh) 视频生成方法及装置、电子设备和存储介质
CN111242303B (zh) 网络训练方法及装置、图像处理方法及装置
JP2022533065A (ja) 文字認識方法及び装置、電子機器並びに記憶媒体
CN112906484B (zh) 一种视频帧处理方法及装置、电子设备和存储介质
WO2022193507A1 (zh) 图像处理方法及装置、设备、存储介质、程序和程序产品
WO2022142298A1 (zh) 关键点检测方法及装置、电子设备和存储介质
CN114445562A (zh) 三维重建方法及装置、电子设备和存储介质
CN111582383A (zh) 属性识别方法及装置、电子设备和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19912260

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021524161

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19912260

Country of ref document: EP

Kind code of ref document: A1