WO2022089143A1 - 模拟图像生成的方法、电子设备及存储介质 - Google Patents

模拟图像生成的方法、电子设备及存储介质 Download PDF

Info

Publication number
WO2022089143A1
WO2022089143A1 PCT/CN2021/121846 CN2021121846W WO2022089143A1 WO 2022089143 A1 WO2022089143 A1 WO 2022089143A1 CN 2021121846 W CN2021121846 W CN 2021121846W WO 2022089143 A1 WO2022089143 A1 WO 2022089143A1
Authority
WO
WIPO (PCT)
Prior art keywords
area
image
commodity
target
style transfer
Prior art date
Application number
PCT/CN2021/121846
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 达闼机器人有限公司
Publication of WO2022089143A1 publication Critical patent/WO2022089143A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras

Definitions

  • the present application relates to the technical field of image processing, and in particular, to a method for generating an analog image, an electronic device and a storage medium.
  • the smart container system captures images of commodities in the container through one or more cameras set in the container, and transmits the images of the captured commodities to the server, where the identification algorithm of the server identifies and calculates the type and quantity of commodities in the container in real time.
  • the recognition of commodities in smart containers is realized by visual recognition technology based on deep learning.
  • Accurate recognition based on deep learning technology needs to include a large number of training data sets for support. The more data used for training in the training data set, the more accurate the training results will be.
  • training data is collected and labeled manually; manual data collection and labeling require high labor costs, and the collection and labeling time is long.
  • the target appears in the way of artificially simulating image data.
  • the mapping from the real environment to the virtual environment is established in Unity3D, including the simulation of camera parameters, lighting, scene layout, 3D model and other information, combined with domain randomization (domain randomization) technology, Generate a large number of simulated images.
  • the purpose of some embodiments of the present application is to provide a method, electronic device and storage medium for generating a simulated image, so that the difference between the generated simulated image of the target and the actual image of the target is small.
  • An embodiment of the present application provides a method for generating a simulated image, including: acquiring a style transfer area in an initial simulated image; extracting a commodity area where a simulated commodity image is located and a background area from the initial simulated image, where the background area is Deleting the extracted image of the commodity region from the initial simulated image; generating a migration image of the commodity region according to the style migration model corresponding to the style migration region and the commodity region in the style migration region; The migration image is placed at the position of the commodity area in the background area to generate a target simulation image.
  • the embodiment of the present application also provides an apparatus for generating a simulated image, including: an acquisition module, an extraction module, a migration module, and an image generation module; the acquisition module is used to acquire a style transfer area in an initial simulated image; the extraction module for extracting the commodity area where the simulated commodity image is located and the background area from the initial simulated image, where the background area is the image after deleting the extracted commodity area from the initial simulated image; the migration module is used for According to the style transfer model corresponding to the style transfer area and the product area in the style transfer area, a transfer image of the product area is generated; the image generation module is configured to place the transfer image in the background area The location of the commodity area generates a target simulation image.
  • An embodiment of the present application further provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a program that can be executed by the at least one processor instructions, the instructions being executed by the at least one processor to enable the at least one processor to perform the above-described method of simulated image generation.
  • Embodiments of the present application further provide a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, a method for generating a simulated image is implemented.
  • the embodiment of the present application also provides a computer program, which implements a method for generating a simulated image when the computer program is executed by a processor.
  • the initial simulated image includes a plurality of style transfer regions, and each style transfer region has its own corresponding style transfer model.
  • the corresponding style transfer model can generate a transfer image of the product area. Since the initial simulated image is divided into style transfer areas, each style transfer area has a corresponding style transfer model, so that the products located in the same style transfer area The transfer images in the region all have the same style, which improves the accuracy of the generated transfer images; since the style transfer model is obtained by training based on the actual target sample images, through the transfer of the style transfer model, the generated transfer images can be compared with the actual collected images.
  • the difference between the images of the commodity area is reduced; and in this application, image transfer is performed on the commodity area, rather than directly performing style transfer on the entire initial simulated image, so as to reduce the unnecessary background area introduced in the entire image.
  • Influence for example, in the process of style transfer, the container image is also transferred to the same style; thereby reducing the style transfer of unnecessary images, reducing the difference between the target simulated image and the target actual image; improving the use of this The accuracy of the model trained on the target simulated images.
  • FIG. 1 is a flowchart of a method for generating a simulated image according to a first embodiment of the present application
  • FIG. 2 is a flowchart of a method for generating a simulated image according to a second embodiment of the present application
  • FIG. 3 is a schematic diagram of an actual image of a target provided according to the second embodiment of the present application.
  • FIG. 5 is a schematic diagram of a commodity area and a background area provided according to the second embodiment of the present application.
  • FIG. 6 is a schematic diagram of a target simulation image provided according to the second embodiment of the present application.
  • FIG. 7 is a flowchart of a method for generating a simulated image according to a third embodiment of the present application.
  • FIG. 8 is a structural block diagram of an apparatus for generating a simulated image according to a fourth embodiment of the present application.
  • FIG. 9 is a structural block diagram of an electronic device according to a fifth embodiment of the present application.
  • the background area in the image will also be transferred in the same style as the product. , which will lead to an increase in the difference between the image of the migration candidate and the actual acquired image.
  • the first embodiment of the present application relates to a method for generating a simulated image, the process of which is shown in FIG. 1 , including:
  • Step 101 Acquire at least one style transfer area in the initial simulated image.
  • Step 102 Extract the commodity area where the simulated commodity image is located and the background area from the initial simulated image, where the background area is an image obtained by deleting the extracted commodity area from the initial simulated image.
  • Step 103 Generate a migration image of the commodity region according to the style transfer model corresponding to the style transfer region and the commodity region in the style transfer region, and the style transfer model is obtained by training based on the actual target sample image.
  • Step 104 Place the migration image at the position of the commodity area in the background area to generate a target simulation image.
  • the initial simulated image includes a plurality of style transfer areas, and each style transfer area has its own corresponding style transfer model.
  • the migration image of the product area can be generated. Since the initial simulated image is divided into style transfer areas, each style transfer area has a corresponding style transfer model, so that the migration images of the product areas located in the same style transfer area have The same style improves the accuracy of the generated transfer images; since the style transfer model is obtained based on the actual target sample image training, through the transfer of the style transfer model, the generated transfer image and the actual collected image of the commodity area are different.
  • the difference between the two images is reduced; and in this application, image transfer is performed on the commodity area, instead of directly performing style transfer on the entire initial simulated image, so as to reduce the influence of unnecessary background areas introduced in the entire image, for example, in the style
  • the container image is also transferred in the same style; thus, the style transfer of unnecessary images is reduced, and the difference between the target simulated image and the target actual image is reduced; the model trained with the target simulated image is improved. accuracy.
  • the second embodiment of the present application relates to a method for generating a simulated image.
  • This embodiment is a specific introduction to the first embodiment.
  • the method for generating a simulated image is applied to an electronic device, and the process is shown in FIG. 2 .
  • Step 201 Divide the actual target image into N target migration regions according to preset dividing conditions, where N is an integer greater than 1.
  • an actual image of the target may be collected in advance, an initial simulated image may be generated according to the size of the actual image of the target and the collected actual scene model, and an initial simulated image may be generated according to the size data of the actual target image by simulating the actual scene of the collected image.
  • the simulated image generation method in this example can be applied to various application scenarios, for example, it can be used to generate a target simulated image containing commodities, so as to be used for the subsequent training of commodity recognition models.
  • the initial simulated image can be generated through a virtual environment, such as generating a smart container in a virtual scene, and by setting lighting and camera parameters to simulate and photograph the simulated commodities in the smart container to obtain the initial simulated image.
  • a variety of simulated items are included in this initial simulated image.
  • the actual target image is divided into N target migration areas according to the illumination intensity in the actual target image and a preset range of illumination intensity; or, the actual target image is divided into N according to the distortion features in the actual target image target migration area.
  • the illumination intensity in the actual image of the target is related to the position of the lamp, and the closer the distance to the lamp, the higher the illumination intensity.
  • the light intensity at a preset distance from the lamp can be selected as the light intensity threshold, the light intensity vertically below the light is the strongest light, and the light at the farthest position from the light is the minimum light. Therefore, it can be obtained according to actual needs.
  • Multiple light intensity thresholds, according to the acquired multiple light intensity thresholds, the strongest light, and the minimum light, N light intensity ranges can be obtained.
  • Obtain the illumination intensity of each designated position in the actual image of the target, and according to the set N illumination intensity ranges and the illumination intensity of each designated position, the target real image can be divided into N target migration areas.
  • the image shown in Figure 3 is the actual image of the target, and the actual image of the target is the collected image of a container on the first floor.
  • the mark f in Figure 3 represents the fill light.
  • a fisheye camera is used, and the largest circular area is In the area captured by the fisheye camera, the square area surrounding the circular area is the frame of the actual image of the entire target; the specified positions are point A, point B, and point C respectively, the strongest illumination is dmax, the minimum illumination is dmin, and the complementary
  • the light intensity of the position where the lights are horizontally separated by 10cm is d1, and the fill light is set around, so the position of the center point is the minimum light, and d1 can be used as the light threshold to obtain the light intensity range, which are respectively the light intensity range 1 [dmin , d1] and the light intensity range 2[d1,dmax]; the light intensity of point A is greater than d1, the light intensity of point B and the light intensity of point C are both less than d1, according to the two
  • it can also be divided according to the degree of image distortion. For example, if the image captured by the fisheye lens is severely distorted, the position farthest from the fisheye camera is severely distorted. Divide.
  • Step 202 Divide the initial simulated image into N style transfer regions according to the size data of each target transfer region.
  • the coordinate data of the target migration area can be obtained.
  • the coordinates of the D area are represented as (x, y, w, h), where x represents the abscissa of the position of point O in the D area, and y represents the The ordinate of the O point of the D area.
  • w represents the width of the D area
  • h represents the height of the D area.
  • the initial simulated image can be divided according to the coordinate data of the target transfer area to obtain a corresponding style transfer area.
  • the initial simulated image can be placed in a unified coordinate system, and the corresponding style transfer area can be obtained in the initial simulated image according to the coordinate data of the target transfer area.
  • the corresponding style transfer area D' can be obtained in a unified coordinate system according to the coordinates of the D area (x, y, w, h).
  • steps 201 to 202 are specific introductions to step 101 in the first embodiment.
  • Step 203 Acquire coordinate data of each commodity area and size data of the style transfer area.
  • Step 204 According to the size data of each commodity area and the size data of the style transfer area, search for the commodity area located in the style transfer area from the initial simulated image.
  • the size data of the commodity area may be obtained, and the size data of the commodity area may include the coordinates of a boundary point of the commodity area, and the width and length of the commodity area.
  • the size data of the style transfer area includes coordinate, width and length data of the style transfer area.
  • Step 205 Extract the commodity area where the simulated commodity image is located and the background area from the initial simulated image, where the background area is an image obtained by deleting the extracted commodity area from the initial simulated image.
  • the commodity area where the simulated commodity image is located can be extracted from the initial simulated image according to the annotation information, and the commodity area contains a corresponding complete commodity image.
  • the commodity area can be set as a rectangle, as shown in FIG. 5 .
  • the dotted frame area is the position after the commodity area is extracted, and the extracted commodity areas are a1 to a5.
  • the area obtained after the commodity area is extracted is the image including the dotted frame area in FIG. 5 .
  • Step 206 Generate a migration image of the commodity area according to the style migration model corresponding to the style migration area and the commodity area in the style migration area, and the style migration model is obtained by training based on the actual target sample image.
  • a style transfer model corresponding to the style transfer area needs to be obtained, and the style transfer model can be obtained by training according to the collected target sample images and simulated sample images.
  • the process of training the style transfer model corresponding to the style transfer area is as follows: obtaining a sample target transfer area from a preset target sample image and obtaining a sample style transfer area corresponding to the sample target transfer area from a preset simulated sample image.
  • the image style of the style transfer area is the same as that of the style transfer area.
  • the image style can be oil painting style, scene style surrounded by fill light, scene style of one fill light, fisheye collection style, etc.; extract the product image from the target sample image
  • the target commodity area where it is located; the simulated commodity area where the commodity image is located is extracted from the simulated sample image; according to the target commodity area located in the sample target transfer area, the simulated commodity area located in the sample style transfer area, and the style transfer network structure, Generate a style transfer model corresponding to the style transfer area.
  • the sample target migration area in the target sample image is obtained, and the target sample image can also be divided according to the illumination condition or the distortion of the image to obtain the sample target in the target sample image.
  • the simulated sample image is correspondingly divided according to the size data of the sample target migration area, and a sample style migration area corresponding to the sample target migration area is obtained.
  • a target commodity area containing each commodity can be extracted from the target sample image using the annotation information, and a simulated commodity area containing each commodity can be extracted from the simulated sample image. Find the target product area in the sample target transfer area, and find the simulated product area in the sample style transfer area.
  • the style transfer model of the style transfer region can be obtained by training according to the style transfer grid structure, the target product region and the simulated product region. Similarly, the training methods of the style transfer models corresponding to other style transfer areas are similar, which will not be repeated here.
  • the product area in the style transfer area is input into the corresponding style transfer model, and then the transfer image of the product area can be obtained.
  • Step 207 Place the migration image at the position of the commodity area in the background area to generate a target simulation image.
  • the C1 area in the background area indicates the extracted commodity area, and the corresponding migration image is placed in the C1 area, as shown in Figure 6.
  • the third embodiment of the present application relates to a method for generating a simulated image, and the method for generating a simulated image is a specific description of step 204 .
  • the implementation of finding commodity regions located in the style transfer region from the initial simulated image can be shown in Figure 7.
  • Step 301 Obtain the coordinates of the center point of the commodity area.
  • the size data of the style transfer area includes: the width and height of the style transfer area; the size data of the product area includes: the width and height of the product area.
  • the half of the sum of the abscissa coordinates and the width of the vertex coordinates is used as the abscissa in the center point coordinates; the half of the sum of the ordinate coordinates and the height of the vertex coordinates is used as the ordinate in the center point coordinates.
  • the coordinate data of the target migration area can be obtained.
  • the coordinates of the D area are represented as (x, y, w, h), where x represents the abscissa of the position of point O in the D area, and y represents the The ordinate of the O point of the D area.
  • w represents the width of the D area
  • h represents the height of the D area.
  • the shape of the commodity area is set as a rectangle, and the size data of the commodity area may include the vertex coordinates of the commodity area, and the width and height of the commodity area.
  • the half of the sum of the abscissa coordinates and the width of the vertex coordinates is used as the abscissa in the center point coordinates; the half of the sum of the ordinate coordinates and the height of the vertex coordinates is used as the ordinate in the center point coordinates.
  • Step 302 If the coordinates of the center point are located in the style transfer area, determine that the commodity area is located in the style transfer area.
  • the style transfer area it is determined whether the coordinates of the center point are located in the style transfer area. If so, it is determined that the product area is located in the style transfer area. Otherwise, it is determined that the product area is not located in the style transfer area, and it is continued to judge whether the product area is located in other styles. Migration area.
  • This example provides a way to quickly judge whether the product area is located in the style transfer area, and the judgment speed is fast.
  • the fourth embodiment of the present application relates to an apparatus for generating a simulated image.
  • the apparatus 40 for generating a simulated image includes an acquisition module 401 , an extraction module 402 , a migration module 403 and an image generation module 404 .
  • the specific structure of the device 40 for generating a simulated image is shown in FIG. 8 .
  • the acquisition module 401 is used to acquire the style transfer area in the initial simulation image; the extraction module 402 is used to extract the commodity area where the simulated commodity image is located and the background area from the initial simulation image, and the background area is the commodity area deleted and extracted from the initial simulation image
  • the migration module 403 is used to generate the migration image of the commodity area according to the style migration model corresponding to the style migration area and the commodity area in the style migration area; the image generation module 404 is used to place the migration image in the commodity area in the background area position to generate a simulated image of the target.
  • the acquisition module 401 is further configured to divide the actual target image into N target migration areas according to preset division conditions, where N is an integer greater than 1; and divide the initial simulated image into N style migration areas according to the size data of each target migration area area.
  • the obtaining module 401 is further configured to divide the actual target image into N target migration regions according to the illumination intensity in the actual target image and the preset illumination intensity range; N target migration regions.
  • the apparatus 40 for generating a simulated image further includes: a training module; the training module is used to obtain the sample target migration area from the preset target sample image and obtain the sample style migration area corresponding to the sample target migration area from the preset simulated sample image , the sample style transfer area is the same as the image style of the style transfer area; extract the target product area where the product image is located from the target sample image; extract the simulated product area where the product image is located from the simulated sample image; The target commodity area, the simulated commodity area located in the sample style transfer area, and the network structure of the style transfer, generate a style transfer model corresponding to the style transfer area.
  • the apparatus 40 for generating a simulated image further includes: a search module; the search module is used to obtain the size data of each commodity area and the size data of the style transfer area; Find product regions within the style transfer region in the simulated image.
  • the search module is also used to obtain the center point coordinates of the commodity area; if the center point coordinates are located in the style transfer area, it is determined that the commodity area is located in the style transfer area.
  • the size data of the style transfer area includes: the width and height of the style transfer area; the size data of the commodity area includes: the vertex coordinates of the commodity area, the width and height of the commodity area; the search module is also used to compare the abscissa of the vertex coordinates and the width.
  • the half of the sum value is used as the abscissa in the coordinates of the center point; the half of the sum of the ordinate and the height of the vertex coordinates is used as the ordinate in the center point coordinates.
  • this embodiment is a device embodiment corresponding to the first embodiment, and this embodiment can be implemented in cooperation with the first embodiment.
  • the related technical details mentioned in the first embodiment are still valid in this embodiment, and are not repeated here in order to reduce repetition.
  • the relevant technical details mentioned in this embodiment can also be applied in the first embodiment.
  • a logical unit may be a physical unit, a part of a physical unit, or multiple physical units.
  • a composite implementation of the unit in order to highlight the innovative part of the present application, this embodiment does not introduce units that are not too closely related to solving the technical problem proposed by the present application, but this does not mean that there are no other units in this embodiment.
  • the fifth embodiment of the present application relates to an electronic device.
  • the specific structure of the electronic device is shown in FIG. 9 , and includes at least one processor 501 ; and a memory 502 communicatively connected to the at least one processor; Instructions executed by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method of simulated image generation as in the first embodiment or the second embodiment.
  • the memory 502 and the processor 501 are connected by a bus, and the bus may include any number of interconnected buses and bridges, and the bus links one or more processors 501 and various circuits of the memory 502 together.
  • the bus may also link together various other circuits, such as peripherals, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein.
  • the bus interface provides the interface between the bus and the transceiver.
  • a transceiver may be a single element or multiple elements, such as multiple receivers and transmitters, providing a means for communicating with various other devices over a transmission medium.
  • the data processed by the processor 501 is transmitted on the wireless medium through the antenna, and further, the antenna also receives the data and transmits the data to the processor 501 .
  • Processor 501 is responsible for managing the bus and general processing, and may also provide various functions including timing, peripheral interface, voltage regulation, power management, and other control functions.
  • the memory 502 may be used to store data used by the processor 501 when performing operations.
  • the sixth embodiment of the present application relates to a computer-readable storage medium storing a computer program.
  • the above method embodiments are implemented when the computer program is executed by the processor.
  • the seventh embodiment of the present application relates to a computer program, which implements the foregoing method embodiments when the computer program is executed by a processor.
  • the aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes .

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Geometry (AREA)
  • Image Analysis (AREA)
  • Processing Or Creating Images (AREA)

Abstract

一种模拟图像生成的方法、电子设备及存储介质,方法包括:获取初始模拟图像中的至少一个风格迁移区域(101);从初始模拟图像中提取模拟商品图像所在的商品区域以及背景区域(102),背景区域为从初始模拟图像中删除提取的商品区域后的图像;根据风格迁移区域对应的风格迁移模型以及风格迁移区域内的商品区域,生成商品区域的迁移图像,风格迁移模型是基于实际的目标样本图像训练获得(103);将迁移图像置于背景区域中商品区域的位置,生成目标模拟图像(104)。采用该方法生成的目标模拟图像与目标实际图像之间的差异小。

Description

模拟图像生成的方法、电子设备及存储介质
交叉引用
本申请基于申请号为“2020111753236”、申请日为2020年10月28日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此以引入方式并入本申请。
技术领域
本申请涉及图像处理技术领域,特别涉及一种模拟图像生成的方法、电子设备及存储介质。
背景技术
随着人工智能技术的发展,出现了能够自动识别商品的智能货柜系统。该智能货柜系统通过货柜内设置的一个或多个摄像头拍摄货柜内商品的图像,并将拍摄的商品的图像传输至服务端,由服务端的识别算法实时识别和计算货柜内商品的种类和数量。
智能货柜中对商品的识别是基于深度学习的视觉识别技术实现的。而基于深度学习技术的精确识别需要包含有大量训练数据集做支撑,训练数据集中包含的用于训练的数据越多,训练结果就越准确。通常训练数据是由人工采集、标注得到;人工进行采集、标注数据需要的人工成本高,而且采集、标注时间长。目标出现了人工模拟图像数据的方式,例如,在Unity3D中建立真实环境 到虚拟环境的映射,包括相机参数、光照、场景布局、3D模型等信息的模拟,结合域随机化(domain randomization)技术,生成大量的模拟图像。
然而,生成的模拟图像过程中会引入大量的货柜等背景区域,而模拟的货柜环境对模拟的商品的影响与实际环境对商品的影响不同,导致生成的商品的模拟图像数据与人工采集的实际图像数据差异大。
发明内容
本申请部分实施例的目的在于提供一种模拟图像生成的方法、电子设备及存储介质,使得生成的目标模拟图像与目标实际图像之间的差异小。
本申请实施例提供了一种模拟图像生成的方法,包括:获取初始模拟图像中的风格迁移区域;从所述初始模拟图像中提取模拟商品图像所在的商品区域以及背景区域,所述背景区域为所述从初始模拟图像中删除提取的所述商品区域后的图像;根据所述风格迁移区域对应的风格迁移模型以及所述风格迁移区域内的商品区域,生成所述商品区域的迁移图像;将所述迁移图像置于所述背景区域中所述商品区域的位置,生成目标模拟图像。
本申请实施例还提供了一种模拟图像生成的装置,包括:获取模块、提取模块、迁移模块以及图像生成模块;所述获取模块用于获取初始模拟图像中的风格迁移区域;所述提取模块用于从所述初始模拟图像中提取模拟商品图像所在的商品区域以及背景区域,所述背景区域为所述从初始模拟图像中删除提取的所述商品区域后的图像;所述迁移模块用于根据所述风格迁移区域对应的风格迁移模型以及所述风格迁移区域内的商品区域,生成所述商品区域的迁移图像;所述图像生成模块用于将所述迁移图像置于所述背景区域中所述商品区 域的位置,生成目标模拟图像。
本申请实施例还提供了一种电子设备,包括:至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行上述的模拟图像生成的方法。
本申请实施例还提供了一种计算机可读存储介质,存储有计算机程序,计算机程序被处理器执行时实现模拟图像生成的方法。
本申请实施例还提供了一种计算机程序,计算机程序被处理器执行时实现模拟图像生成的方法。
本申请实施例现对于现有技术而言,初始模拟图像中包括多个风格迁移区域,每个风格迁移区域有各自对应的风格迁移模型,根据风格迁移区域内的商品区域以及与该风格迁移区域对应的风格迁移模型,可以生成该商品区域的迁移图像,由于将初始模拟图像进行了风格迁移区域的划分,每个风格迁移区域有对应的风格迁移模型,使得位于同一个风格迁移区域内的商品区域的迁移图像均具有相同的风格,提高了生成的迁移图像准确性;由于该风格迁移模型是基于实际的目标样本图像训练获得,通过该风格迁移模型的迁移,使得生成的迁移图像与实际采集的商品区域的图像之间的差异减小;且本申请中对商品区域进行图像迁移,而不是直接将整张初始模拟图像进行风格迁移,减少在整张图像中引入的不必要的背景区域的影响,例如,在风格迁移过程中也将货柜图像进行了相同风格的迁移;进而减少了对不必要图像的风格迁移,减小了目标模拟图像与目标实际图像之间的差异;提高了使用该目标模拟图像训练的模型的准确性。
附图说明
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定,附图中具有相同参考数字标号的元件表示为类似的元件,除非有特别申明,附图中的图不构成比例限制。
图1是根据本申请第一实施例中提供的一种模拟图像生成的方法的流程图;
图2是根据本申请第二实施例中提供的一种模拟图像生成的方法的流程图;
图3是根据本申请第二实施例中提供的目标实际图像的示意图;
图4是根据本申请第二实施例中提供的包含两个目标迁移区域的目标实际图像;
图5是根据本申请第二实施例中提供的商品区域和背景区域的示意图;
图6是根据本申请第二实施例中提供的目标模拟图像的示意图;
图7是根据本申请第三实施例中提供的一种模拟图像生成的方法的流程图;
图8是根据本申请第四实施例中提供的一种模拟图像生成的装置的结构框图;
图9是根据本申请第五实施例中提供的一种电子设备的结构框图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及 实施例,对本申请部分实施例进行进一步详细说明。本领域的普通技术人员可以理解,在各实施例中,为了使读者更好地理解本申请而提出了许多技术细节。但是,即使没有这些技术细节和基于以下各实施例的种种变化和修改,也可以实现本申请所要求保护的技术方案。以下各个实施例的划分是为了描述方便,不应对本申请的具体实现方式构成任何限定,各个实施例在不矛盾的前提下可以相互结合相互引用。
发明人发现目前对整张图像进行风格迁移,但是在商品识别算法中的目的是对商品的准确识别,当图像中的商品较少时,图像中的背景区域也将进行与商品一样风格的迁移,这将导致迁移候的图像与实际采集的图像之间的差异增大。
本申请第一实施例涉及一种模拟图像生成的方法,其流程如图1所示,包括:
步骤101:获取初始模拟图像中的至少一个风格迁移区域。
步骤102:从初始模拟图像中提取模拟商品图像所在的商品区域以及背景区域,背景区域为从初始模拟图像中删除提取的商品区域后的图像。
步骤103:根据风格迁移区域对应的风格迁移模型以及风格迁移区域内的商品区域,生成商品区域的迁移图像,风格迁移模型是基于实际的目标样本图像训练获得。
步骤104:将迁移图像置于背景区域中商品区域的位置,生成目标模拟图像。
本申请实施例中,初始模拟图像中包括多个风格迁移区域,每个风格迁移区域有各自对应的风格迁移模型,根据风格迁移区域内的商品区域以及与该 风格迁移区域对应的风格迁移模型,可以生成该商品区域的迁移图像,由于将初始模拟图像进行了风格迁移区域的划分,每个风格迁移区域有对应的风格迁移模型,使得位于同一个风格迁移区域内的商品区域的迁移图像均具有相同的风格,提高了生成的迁移图像准确性;由于该风格迁移模型是基于实际的目标样本图像训练获得,通过该风格迁移模型的迁移,使得生成的迁移图像与实际采集的商品区域的图像之间的差异减小;且本申请中对商品区域进行图像迁移,而不是直接将整张初始模拟图像进行风格迁移,减少在整张图像中引入的不必要的背景区域的影响,例如,在风格迁移过程中也将货柜图像进行了相同风格的迁移;进而减少了对不必要图像的风格迁移,减小了目标模拟图像与目标实际图像之间的差异;提高了使用该目标模拟图像训练的模型的准确性。
本申请第二实施例涉及一种模拟图像生成的方法,本实施例是对第一实施例的具体介绍,该模拟图像生成的方法应用于电子设备,其流程如图2所示。
步骤201:根据预设划分条件,将目标实际图像划分为N个目标迁移区域,N为大于1的整数。
具体地,可以预先采集目标实际图像,按照该目标实际图像的尺寸以及采集的实际场景模型生成初始模拟图像,通过模拟采集图像的实际场景,按照目标实际图像的尺寸数据生成初始模拟图像。
本示例中的模拟图像生成的方法可以应用于多种应用场景,例如,可以用于生成包含商品的目标模拟图像,以便用于后续的商品识别模型的训练。本示例中,初始模拟图像可以通过虚拟环境生成,如在虚拟场景中生成智能货柜,通过设置光照、相机参数的方式模拟拍摄该智能货柜中的模拟商品,得到该初始模拟图像。该初始模拟图像中包括多种模拟商品。
在一个例子中,根据目标实际图像中的光照强度以及预设的光照强度范围,将目标实际图像划分为N个目标迁移区域;或者,根据目标实际图像中的畸变特征将目标实际图像划分为N个目标迁移区域。
具体地,目标实际图像中的光照强度与灯的位置相关,与灯距离越近,光照强度越高。基于此原理,可以选取距离灯预设距离处的光照强度作为光照强度阈值,将灯垂直下方的光照强度作为最强光照,与灯最远位置的光照作为最小光照,因此,按照实际需要可以获取多个光照强度阈值,根据获取的多个光照强度阈值、最强光照以及最小光照,可以获得N个光照强度范围。获取目标实际图像中的各指定位置的光照强度,根据设置的N各光照强度范围以及各指定位置的光照强度,即可将该目标实际图像划分为N各目标迁移区域。
例如,如图3所示的图像为目标实际图像,该目标实际图像为采集的一层货柜的图像,图3中标记f表示补光灯,本示例中采用鱼眼摄像头,最大圆形区域为鱼眼摄像头拍摄的区域,圆形区域外接的方形区域为整个目标实际图像的边框;其中,指定位置分别是A点、B点和C点,最强光照为dmax,最小光照为dmin,与补光灯水平相距10cm的位置的光照强度为d1,补光灯四周环绕设置,故中心点的位置处为最小光照,可以以d1为光照阈值,获得光照强度范围,分别为光照强度范围1[dmin,d1]以及光照强度范围2[d1,dmax];A点的光照强度大于d1,B点的光照强度和点C的光照强度均小于d1,根据设置的两个光照强度范围以及指定点的光照强度,可以以B点与中心点之间的距离作为半径,得到如图3所示的目标迁移区域1和目标迁移区域2。又如,补光灯只有一个,设置预设光照强度为d2,得到大于d2的D区域和小于d2的C区域,如图4所示的D区域和C区域。
在另一个例子中,还可以根据图像畸变的程度划分,例如,若采用鱼眼镜头拍摄的图像,与鱼眼摄像头距离最远的位置畸变严重,可以根据图像中与鱼眼摄像头之间的距离进行划分。
步骤202:根据每个目标迁移区域的尺寸数据将初始模拟图像划分为N个风格迁移区域。
具体地,可以获取该目标迁移区域的坐标数据,如图4中D区域的坐标表示为(x,y,w,h),其中,x表示该D区域的O点位置的横坐标,y表示该D区域的O点的纵坐标。w表示该D区域的宽度,h表示该D区域的高度。可以根据该目标迁移区域的坐标数据,划分该初始模拟图像,得到对应的风格迁移区域。由于目标实际图像与该初始模拟图像的尺寸一样,可以将该初始模拟图像放置于统一的坐标系中,按照该目标迁移区域的坐标数据,即可在该初始模拟图像中得到对应的风格迁移区域,例如,在统一的坐标系中,按照D区域的坐标(x,y,w,h),即可在该统一坐标系中查找相同坐标的D'点,按照目标迁移区域的宽度和高度,可以得到对应的风格迁移区域D'。
需要说明的是,步骤201至步骤202是对第一实施例中的步骤101的具体介绍。
步骤203:获取每个商品区域的坐标数据以及风格迁移区域的尺寸数据。
步骤204:根据每个商品区域的尺寸数据以及风格迁移区域的尺寸数据,从初始模拟图像中查找位于风格迁移区域内的商品区域。
具体地,可以依次对每个商品区域进行如下处理:可以获取商品区域的尺寸数据,商品区域的尺寸数据可以包括该商品区域的一边界点的坐标,以及该商品区域的宽度和长度。同时,风格迁移区域的尺寸数据包括该风格迁移区 域的坐标、宽度和长度数据。可以获取该商品区域的多个不同边界点,依次判断获取的多个边界点是否均位于该风格迁移区域,若是均位于该风格迁移区域,那么确定该商品区域位于该风格迁移区域内;若存在该风格迁移区域外的边界点,那么可以继续判断该商品区域是否位于下一个风格迁移区域内,直至检测完所有的风格迁移区域或者确定该商品区域所属的风格迁移区域。
步骤205:从初始模拟图像中提取模拟商品图像所在的商品区域以及背景区域,背景区域为从初始模拟图像中删除提取的商品区域后的图像。
具体地,可以根据标注信息从初始模拟图像中提取模拟商品图像所在的商品区域,商品区域内包含对应的一个完整的商品图像,为了便于提取,可以将商品区域设置矩形,如图5所示,虚线框区域提取了商品区域后的位置,提取的商品区域为a1~a5,提取了商品区域后得到的区域即为图5中包含虚线框区域的图像。
步骤206:根据风格迁移区域对应的风格迁移模型以及风格迁移区域内的商品区域,生成商品区域的迁移图像,风格迁移模型是基于实际的目标样本图像训练获得。
具体地,在进行风格迁移之前,需要获取该风格迁移区域对应的风格迁移模型,风格迁移模型可以根据采集的目标样本图像以及模拟样本图像训练获得。
训练该风格迁移区域对应的风格迁移模型的过程如下:从预设的目标样本图像中获取样本目标迁移区域以及从预设的模拟样本图像中获取与样本目标迁移区域对应的样本风格迁移区域,样本风格迁移区域与风格迁移区域的图像风格相同,图像风格可以油画风格、四周环绕补光灯的场景风格,一个补光灯 的场景风格、鱼眼采集风格等等;从目标样本图像中提取商品图像所在的目标商品区域;从模拟样本图像中提取商品图像所在的模拟商品区域;根据位于样本目标迁移区域内的目标商品区域、位于样本风格迁移区域中的模拟商品区域、以及风格迁移的网络结构,生成风格迁移区域对应的风格迁移模型。
具体地,该预设的目标样本图像有多个,获取目标样本图像中的样本目标迁移区域,同样可以根据光照情况或图像的畸变情况划分该目标样本图像,得到该目标样本图像中的样本目标迁移区域,按照该样本目标迁移区域的尺寸数据对应划分该模拟样本图像,得到与样本目标迁移区域对应的样本风格迁移区域。可以利用标注信息从目标样本图像中提取包含每个商品的目标商品区域,以及从模拟样本图像中提取包含每个商品的模拟商品区域。查找位于样本目标迁移区域的目标商品区域,以及查找位于样本风格迁移区域的模拟商品区域。由于样本目标迁移区域与样本风格迁移区域对应,模拟商品区域的风格需要迁移为该目标商品区域的风格。可以根据风格迁移网格结构,该目标商品区域以及模拟商品区域进行训练,即可得到该风格迁移区域的风格迁移模型。同理,其他风格迁移区域对应的风格迁移模型的训练方式类似,此处将不再进行赘述。
将该风格迁移区域内的商品区域输入对应的风格迁移模型,即可得到该商品区域的迁移图像。
步骤207:将迁移图像置于背景区域中商品区域的位置,生成目标模拟图像。
将迁移图像贴回对应的背景区域中,生成目标模拟图像,例如,该背景区域中C1区域表示提取出商品区域,将对应的迁移图像置于该C1区域内,如图6所示。
本申请第三实施例涉及一种模拟图像生成的方法,该模拟图像生成的方法是对步骤204的具体说明。从初始模拟图像中查找位于风格迁移区域内的商品区域的实现方式可以如图7所示。
步骤301:获取商品区域的中心点坐标。
在一个例子中,风格迁移区域的尺寸数据包括:风格迁移区域的宽度和高度;商品区域的尺寸数据包括:商品区域的宽度和高度。将顶点坐标的横坐标与宽度的和值的一半作为中心点坐标中的横坐标;将顶点坐标的纵坐标与高度的和值的一半作为中心点坐标中的纵坐标。
具体地,可以获取该目标迁移区域的坐标数据,如图4中D区域的坐标表示为(x,y,w,h),其中,x表示该D区域的O点位置的横坐标,y表示该D区域的O点的纵坐标。w表示该D区域的宽度,h表示该D区域的高度。本示例中,为了便于提取商品区域,设置商品区域的形状为矩形,该商品区域的尺寸数据可以包括该商品区域的顶点坐标,商品区域的宽度和高度。将顶点坐标的横坐标与宽度的和值的一半作为中心点坐标中的横坐标;将顶点坐标的纵坐标与高度的和值的一半作为中心点坐标中的纵坐标。例如,如图8所示,该矩形框表示为商品区域,该商品区域的顶点A的坐标表示为(x,y);计算该商品区域的中心点坐标为:(C_Di_x,C_Di_y):C_Di_x=(x+w)/2;C_Di_y=(y+h)/2。
步骤302:若中心点坐标位于风格迁移区域,则确定商品区域位于风格迁移区域。
具体地,判断该中心点的坐标是否位于风格迁移区域,若是,则确定商品区域位于该风格迁移区域,否则,确定该商品区域不位于该风格迁移区域,继续判断该商品区域是否位于其他的风格迁移区域。
本示例中提供了一种快速判断商品区域是否位于该风格迁移区域的方式,判断速度快。
上面各种方法的步骤划分,只是为了描述清楚,实现时可以合并为一个步骤或者对某些步骤进行拆分,分解为多个步骤,只要包括相同的逻辑关系,都在本专利的保护范围内;对算法中或者流程中添加无关紧要的修改或者引入无关紧要的设计,但不改变其算法和流程的核心设计都在该专利的保护范围内。
本申请第四实施例涉及一种模拟图像生成的装置,该模拟图像生成的装置40包括:获取模块401、提取模块402、迁移模块403以及图像生成模块404。该模拟图像生成的装置40的具体结构如图8所示。获取模块401用于获取初始模拟图像中的风格迁移区域;提取模块402用于从初始模拟图像中提取模拟商品图像所在的商品区域以及背景区域,背景区域为从初始模拟图像中删除提取的商品区域后的图像;迁移模块403用于根据风格迁移区域对应的风格迁移模型以及风格迁移区域内的商品区域,生成商品区域的迁移图像;图像生成模块404用于将迁移图像置于背景区域中商品区域的位置,生成目标模拟图像。
获取模块401还用于根据预设划分条件,将目标实际图像划分为N个目标迁移区域,N为大于1的整数;根据每个目标迁移区域的尺寸数据将初始模拟图像划分为N个风格迁移区域。
获取模块401还用于根据目标实际图像中的光照强度以及预设的光照强度范围,将目标实际图像划分为N个目标迁移区域;或者,根据目标实际图像中的畸变特征将目标实际图像划分为N个目标迁移区域。
模拟图像生成的装置40还包括:训练模块;训练模块用于从预设的目标样本图像中获取样本目标迁移区域以及从预设的模拟样本图像中获取与样本目 标迁移区域对应的样本风格迁移区域,样本风格迁移区域与风格迁移区域的图像风格相同;从目标样本图像中提取商品图像所在的目标商品区域;从模拟样本图像中提取商品图像所在的模拟商品区域;根据位于样本目标迁移区域内的目标商品区域、位于样本风格迁移区域中的模拟商品区域、以及风格迁移的网络结构,生成风格迁移区域对应的风格迁移模型。
模拟图像生成的装置40还包括:查找模块;查找模块用于获取每个商品区域的尺寸数据以及风格迁移区域的尺寸数据;根据每个商品区域的尺寸数据以及风格迁移区域的尺寸数据,从初始模拟图像中查找位于风格迁移区域内的商品区域。
查找模块还用于获取商品区域的中心点坐标;若中心点坐标位于风格迁移区域,则确定商品区域位于风格迁移区域。
风格迁移区域的尺寸数据包括:风格迁移区域的宽度和高度;商品区域的尺寸数据包括:商品区域的顶点坐标、商品区域的宽度和高度;查找模块还用于将顶点坐标的横坐标与宽度的和值的一半作为中心点坐标中的横坐标;将顶点坐标的纵坐标与高度的和值的一半作为中心点坐标中的纵坐标。
不难发现,本实施例为与第一实施例相对应的装置实施例,本实施例可与第一实施例互相配合实施。第一实施例中提到的相关技术细节在本实施例中依然有效,为了减少重复,这里不再赘述。相应地,本实施例中提到的相关技术细节也可应用在第一实施例中。
值得一提的是,本实施例中所涉及到的各模块均为逻辑模块,在实际应用中,一个逻辑单元可以是一个物理单元,也可以是一个物理单元的一部分,还可以以多个物理单元的组合实现。此外,为了突出本申请的创新部分,本实 施例中并没有将与解决本申请所提出的技术问题关系不太密切的单元引入,但这并不表明本实施例中不存在其它的单元。
本申请第五实施例涉及一种电子设备,该电子设备的具体结构如图9所示,包括至少一个处理器501;以及,与至少一个处理器通信连接的存储器502;其中,存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行如第一实施例或第二实施例中的模拟图像生成的方法。
其中,存储器502和处理器501采用总线方式连接,总线可以包括任意数量的互联的总线和桥,总线将一个或多个处理器501和存储器502的各种电路链接在一起。总线还可以将诸如外围设备、稳压器和功率管理电路等之类的各种其他电路链接在一起,这些都是本领域所公知的,因此,本文不再对其进行进一步描述。总线接口在总线和收发机之间提供接口。收发机可以是一个元件,也可以是多个元件,比如多个接收器和发送器,提供用于在传输介质上与各种其他装置通信的单元。经处理器501处理的数据通过天线在无线介质上进行传输,进一步,天线还接收数据并将数据传送给处理器501。
处理器501负责管理总线和通常的处理,还可以提供各种功能,包括定时,外围接口,电压调节、电源管理以及其他控制功能。而存储器502可以被用于存储处理器501在执行操作时所使用的数据。
本申请第六实施例涉及一种计算机可读存储介质,存储有计算机程序。计算机程序被处理器执行时实现上述方法实施例。
本申请第七实施例涉及一种计算机程序,计算机程序被处理器执行时实现上述方法实施例。
即,本领域技术人员可以理解,实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
本领域的普通技术人员可以理解,上述各实施例是实现本申请的具体实施例,而在实际应用中,可以在形式上和细节上对其作各种改变,而不偏离本申请的精神和范围。

Claims (17)

  1. 一种模拟图像生成的方法,其特征在于,包括:
    获取初始模拟图像中的至少一个风格迁移区域;
    从所述初始模拟图像中提取模拟商品图像所在的商品区域以及背景区域,所述背景区域为从所述初始模拟图像中删除提取的所述商品区域后的图像;
    根据所述风格迁移区域对应的风格迁移模型以及所述风格迁移区域内的商品区域,生成所述商品区域的迁移图像,所述风格迁移模型是基于实际的目标样本图像训练获得;
    将所述迁移图像置于所述背景区域中所述商品区域的位置,生成目标模拟图像。
  2. 如权利要求1所述的模拟图像生成的方法,其特征在于,所述获取初始模拟图像中的至少一个风格迁移区域,包括:
    根据预设划分条件,将目标实际图像划分为N个目标迁移区域,N为大于1的整数;
    根据每个目标迁移区域的尺寸数据将所述初始模拟图像划分为N个风格迁移区域。
  3. 如权利要求2所述的模拟图像生成的方法,其特征在于,所述根据预设划分条件,将目标实际图像划分为N个目标迁移区域,包括:
    根据所述目标实际图像中的光照强度以及预设的光照强度范围,将所述目标实际图像划分为N个目标迁移区域;或者,
    根据所述目标实际图像中的畸变特征将所述目标实际图像划分为N个目标迁移区域。
  4. 如权利要求1至3中任一项所述的模拟图像生成的方法,其特征在于,在所述根据所述风格迁移区域对应的风格迁移模型以及所述风格迁移区域内的商品区域,生成所述商品区域的迁移图像之前,所述方法还包括:
    训练每个所述风格迁移区域对应的风格迁移模型的过程如下:
    从预设的目标样本图像中获取样本目标迁移区域以及从预设的模拟样本图像中获取与所述样本目标迁移区域对应的样本风格迁移区域,所述样本风格迁移区域与所述风格迁移区域的图像风格相同;
    从所述目标样本图像中提取商品图像所在的目标商品区域;
    从所述模拟样本图像中提取商品图像所在的模拟商品区域;
    根据位于所述样本目标迁移区域内的目标商品区域、位于所述样本风格迁移区域中的模拟商品区域、以及风格迁移的网络结构,生成所述风格迁移区域对应的风格迁移模型。
  5. 如权利要求1至4中任一项所述的模拟图像生成的方法,其特征在于,在所述根据所述风格迁移区域对应的风格迁移模型以及所述风格迁移区域内的商品区域,生成所述商品区域的迁移图像之前,所述方法还包括:
    获取每个商品区域的尺寸数据以及所述风格迁移区域的尺寸数据;
    根据每个商品区域的尺寸数据以及所述风格迁移区域的尺寸数据,从所述初始模拟图像中查找位于所述风格迁移区域内的商品区域。
  6. 如权利要求5所述的模拟图像生成的方法,其特征在于,所述根据每个商品区域的坐标数据以及所述风格迁移区域的尺寸数据,从所述初始模拟图像中查找位于所述风格迁移区域内的商品区域,包括:
    获取所述商品区域的中心点坐标;
    若所述中心点坐标位于所述风格迁移区域,则确定所述商品区域位于所述风格迁移区域。
  7. 如权利要求6所述的模拟图像生成的方法,其特征在于,所述风格迁移区域的尺寸数据包括:所述风格迁移区域的宽度和高度;所述商品区域的尺寸数据包括:所述商品区域的顶点坐标、所述商品区域的宽度和高度;
    所述获取所述商品区域的中心点坐标,包括:
    将所述顶点坐标的横坐标与宽度的和值的一半作为所述中心点坐标中的横坐标;
    将所述顶点坐标的纵坐标与高度的和值的一半作为所述中心点坐标中的纵坐标。
  8. 一种模拟图像生成的装置,其特征在于,包括:获取模块、提取模块、迁移模块以及图像生成模块;
    所述获取模块用于获取初始模拟图像中的风格迁移区域;
    所述提取模块用于从所述初始模拟图像中提取模拟商品图像所在的商品区域以及背景区域,所述背景区域为从所述初始模拟图像中删除提取的所述商品区域后的图像;
    所述迁移模块用于根据所述风格迁移区域对应的风格迁移模型以及所述风格迁移区域内的商品区域,生成所述商品区域的迁移图像;
    所述图像生成模块用于将所述迁移图像置于所述背景区域中所述商品区域的位置,生成目标模拟图像。
  9. 如权利要求8所述的模拟图像生成的装置,其特征在于,所述获取模块还用于根据预设划分条件,将目标实际图像划分为N个目标迁移区域,N为大于1的整数;
    根据每个目标迁移区域的尺寸数据将所述初始模拟图像划分为N个风格迁移区域。
  10. 如权利要求9所述的模拟图像生成的装置,其特征在于,所述获取模块还用于根据所述目标实际图像中的光照强度以及预设的光照强度范围,将所述目标实际图像划分为N个目标迁移区域;或者,
    根据所述目标实际图像中的畸变特征将所述目标实际图像划分为N个目标迁移区域。
  11. 如权利要求8至10中任一项所述的模拟图像生成的装置,其特征在于,还包括:训练模块;
    所述训练模块用于从预设的目标样本图像中获取样本目标迁移区域以及从预设的模拟样本图像中获取与所述样本目标迁移区域对应的样本风格迁移区域,所述样本风格迁移区域与所述风格迁移区域的图像风格相同;
    从所述目标样本图像中提取商品图像所在的目标商品区域;
    从所述模拟样本图像中提取商品图像所在的模拟商品区域;
    根据位于所述样本目标迁移区域内的目标商品区域、位于所述样本风格迁移区域中的模拟商品区域、以及风格迁移的网络结构,生成所述风格迁移区域对应的风格迁移模型。
  12. 如权利要求8至11中任一项所述的模拟图像生成的装置,其特征在于,还包括:查找模块;
    所述查找模块用于获取每个商品区域的尺寸数据以及所述风格迁移区域的尺寸数据;
    根据每个商品区域的尺寸数据以及所述风格迁移区域的尺寸数据,从所述初始模拟图像中查找位于所述风格迁移区域内的商品区域。
  13. 如权利要求12所述的模拟图像生成的装置,其特征在于,所述查找模块还用于获取所述商品区域的中心点坐标;
    若所述中心点坐标位于所述风格迁移区域,则确定所述商品区域位于所述风格迁移区域。
  14. 如权利要求13所述的模拟图像生成的装置,其特征在于,所述风格迁移区域的尺寸数据包括:所述风格迁移区域的宽度和高度;所述商品区域的尺寸数据包括:所述商品区域的顶点坐标、所述商品区域的宽度和高度;
    所述查找模块还用于将所述顶点坐标的横坐标与宽度的和值的一半作为所述中心点坐标中的横坐标;
    将所述顶点坐标的纵坐标与高度的和值的一半作为所述中心点坐标中的纵坐标。
  15. 一种电子设备,其特征在于,包括:
    至少一个处理器;以及,
    与所述至少一个处理器通信连接的存储器;其中,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如权利要求1至7中任一所述的模拟图像生成的方法。
  16. 一种计算机可读存储介质,存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至7中任一所述的模拟图像生成的方法。
  17. 一种计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至7中任一所述的模拟图像生成的方法。
PCT/CN2021/121846 2020-10-28 2021-09-29 模拟图像生成的方法、电子设备及存储介质 WO2022089143A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011175323.6 2020-10-28
CN202011175323.6A CN112348737B (zh) 2020-10-28 2020-10-28 模拟图像生成的方法、电子设备及存储介质

Publications (1)

Publication Number Publication Date
WO2022089143A1 true WO2022089143A1 (zh) 2022-05-05

Family

ID=74355227

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/121846 WO2022089143A1 (zh) 2020-10-28 2021-09-29 模拟图像生成的方法、电子设备及存储介质

Country Status (2)

Country Link
CN (1) CN112348737B (zh)
WO (1) WO2022089143A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117152541A (zh) * 2023-10-27 2023-12-01 浙江由由科技有限公司 空间变换结合光照度迁移和结果校验的生鲜商品识别方法

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112348737B (zh) * 2020-10-28 2023-03-24 达闼机器人股份有限公司 模拟图像生成的方法、电子设备及存储介质
CN113096000A (zh) * 2021-03-31 2021-07-09 商汤集团有限公司 一种图像生成方法、装置、设备及存储介质
CN113469876B (zh) * 2021-07-28 2024-01-09 北京达佳互联信息技术有限公司 图像风格迁移模型训练方法、图像处理方法、装置及设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109447137A (zh) * 2018-10-15 2019-03-08 聚时科技(上海)有限公司 一种基于分解因子的图像局部风格迁移方法
CN109829849A (zh) * 2019-01-29 2019-05-31 深圳前海达闼云端智能科技有限公司 一种训练数据的生成方法、装置和终端
US20190244329A1 (en) * 2018-02-02 2019-08-08 Nvidia Corporation Photorealistic Image Stylization Using a Neural Network Model
CN110490960A (zh) * 2019-07-11 2019-11-22 阿里巴巴集团控股有限公司 一种合成图像生成方法及装置
CN112348737A (zh) * 2020-10-28 2021-02-09 达闼机器人有限公司 模拟图像生成的方法、电子设备及存储介质

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110830706A (zh) * 2018-08-08 2020-02-21 Oppo广东移动通信有限公司 图像处理方法和装置、存储介质、电子设备
CN111783525B (zh) * 2020-05-20 2022-10-18 中国人民解放军93114部队 基于风格迁移的航空摄影图像目标样本生成方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190244329A1 (en) * 2018-02-02 2019-08-08 Nvidia Corporation Photorealistic Image Stylization Using a Neural Network Model
CN109447137A (zh) * 2018-10-15 2019-03-08 聚时科技(上海)有限公司 一种基于分解因子的图像局部风格迁移方法
CN109829849A (zh) * 2019-01-29 2019-05-31 深圳前海达闼云端智能科技有限公司 一种训练数据的生成方法、装置和终端
CN110490960A (zh) * 2019-07-11 2019-11-22 阿里巴巴集团控股有限公司 一种合成图像生成方法及装置
CN112348737A (zh) * 2020-10-28 2021-02-09 达闼机器人有限公司 模拟图像生成的方法、电子设备及存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
MIAO YONG-WEI;LI GAO-YI;BAO CHEN;ZHANG XU-DONG;PENG SI-LONG: "Image Localized Style Transfer Based on Convolutional Neural Network", COMPUTER SCIENCE, vol. 46, no. 9, 15 September 2019 (2019-09-15), pages 259 - 264, XP055925173, ISSN: 1002-137x, DOI: 10.11896/j.issn.1002-137x.2019.09.039 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117152541A (zh) * 2023-10-27 2023-12-01 浙江由由科技有限公司 空间变换结合光照度迁移和结果校验的生鲜商品识别方法
CN117152541B (zh) * 2023-10-27 2024-01-16 浙江由由科技有限公司 空间变换结合光照度迁移和结果校验的生鲜商品识别方法

Also Published As

Publication number Publication date
CN112348737B (zh) 2023-03-24
CN112348737A (zh) 2021-02-09

Similar Documents

Publication Publication Date Title
WO2022089143A1 (zh) 模拟图像生成的方法、电子设备及存储介质
US10970864B2 (en) Method and apparatus for recovering point cloud data
CN108734120B (zh) 标注图像的方法、装置、设备和计算机可读存储介质
CN109583483B (zh) 一种基于卷积神经网络的目标检测方法和系统
CN109829849B (zh) 一种训练数据的生成方法、装置和终端
CN111161349B (zh) 物体姿态估计方法、装置与设备
CN109446889B (zh) 基于孪生匹配网络的物体追踪方法及装置
CN108701234A (zh) 车牌识别方法及云系统
CN109344813B (zh) 一种基于rgbd的目标识别和场景建模方法
WO2020024147A1 (zh) 样本图像的集合的生成方法、装置、电子设备和存储介质
CN112446302B (zh) 一种人体姿态检测方法、系统、电子设备和存储介质
CN111738036B (zh) 图像处理方法、装置、设备及存储介质
CN105117399B (zh) 一种图像搜索方法和装置
CN112989947A (zh) 一种人体关键点的三维坐标的估计方法及装置
CN109522807A (zh) 基于自生成特征的卫星影像识别系统、方法及电子设备
CN115880536A (zh) 数据处理方法、训练方法、目标对象检测方法及装置
CN114519819B (zh) 一种基于全局上下文感知的遥感图像目标检测方法
CN111177811A (zh) 一种应用于云平台的消防点位自动布图的方法
CN110390724A (zh) 一种带有实例分割的slam方法
CN114693963A (zh) 基于电力数据特征提取的识别模型训练、识别方法及装置
CN114419087A (zh) 病灶图像生成方法、装置、电子设备及存储介质
CN110210401B (zh) 一种弱光下的目标智能检测方法
CN113378864B (zh) 一种锚框参数的确定方法、装置、设备及可读存储介质
CN115116052A (zh) 一种果园荔枝识别方法、装置、设备及存储介质
CN110148205A (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: 21884872

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 25.09.2023)