Personalized glasses customizing method and customizing system

文档序号:1906207 发布日期:2021-11-30 浏览:12次 中文

阅读说明:本技术 一种个性化眼镜定制方法及定制系统 (Personalized glasses customizing method and customizing system ) 是由 陈冰 王晓东 于 2021-09-02 设计创作,主要内容包括:本发明公开了一种个性化眼镜定制方法及定制系统,包括:获取第一图像数据与第二图像数据;将第一图像数据与第二图像数据进行配准,获得第一数据;基于第一数据与第二图像数据,创建第一模拟模型;基于第一模拟模型,识别第二数据;基于第一图像数据,采用多任务学习算法,识别第三数据;基于第二数据与第三数据,从数据库中匹配与待定制眼镜头部相对应的眼镜模型;通过3D打印的方法,打印眼镜。本发明有益效果为基于消费者头部的脸型、头、瞳距、鼻梁高低等特征属性,来匹配相对应尺寸的眼镜,实现了消费者眼镜的个性化定制,实现了对消费者佩戴的眼镜进行智能化推荐。(The invention discloses a personalized glasses customizing method and a customizing system, comprising the following steps: acquiring first image data and second image data; registering the first image data with the second image data to obtain first data; creating a first simulation model based on the first data and the second image data; identifying second data based on the first simulation model; identifying third data by adopting a multi-task learning algorithm based on the first image data; matching the glasses model corresponding to the glasses head to be customized from the database based on the second data and the third data; and printing the glasses by a 3D printing method. The glasses with the corresponding sizes are matched based on the characteristic attributes of the head of a consumer, such as the face shape, the head, the interpupillary distance, the height of the nose bridge and the like, so that the personalized customization of the glasses of the consumer is realized, and the intelligent recommendation of the glasses worn by the consumer is realized.)

1. A personalized spectacle customization method, characterized in that the customization method comprises the steps of:

s1: acquiring first image data and second image data, wherein the first image data and the second image data are image data acquired based on the same angle, the first image data is RGB color image data of a human head, and the second image data is depth image data of the human head;

s2: registering the first image data with the second image data to obtain first data;

s3: based on the first data and the second image data, adopting a physical 3D reconstruction method, or based on the first image data, adopting a 3D reconstruction method based on a 2D image, and creating a first simulation model of the lens part of the eye to be customized;

s4: identifying second data of the head of the eye to be customized based on the first simulation model, wherein the second data are characteristic point coordinates of the head of the human body;

s5: identifying third data of the lens part of the eye to be customized by adopting a multitask learning algorithm based on the first image data, wherein the third data is attribute data of the lens part of the eye to be customized;

s6: matching a glasses model corresponding to the head of the glasses to be customized from a database based on the second data and the third data, wherein the database is glasses with different sizes and different styles;

s7: the glasses are produced by an additive manufacturing technology method based on the glasses model.

2. The personalized spectacle customization method according to claim 1, wherein the specific operation method of step S2 comprises the following steps:

performing noise filtering processing on the first image data and the second image data to obtain first sub-image data and second sub-image data;

and enabling the first sub-image data and the second sub-image data to correspond to each other on a time point by adopting a time registration or space registration method, so as to obtain first data.

3. A personalized spectacle customization method according to claim 2, characterized in that the noise filtering is bilateral filtering or gaussian filtering or conditional filtering or straight-through filtering or random sampling uniform filtering.

4. The personalized spectacle customization method according to claim 1, wherein in the step S3, the specific method step of creating the first simulation model of the lens portion to be customized by using the physical 3D reconstruction method based on the first data and the second image data comprises:

creating an image coordinate system based on the first data, and creating a camera coordinate system based on the second image data;

converting the first data into three-dimensional coordinates based on an image coordinate system and a camera coordinate system, and converting the first data into point cloud data based on a point cloud method library;

and carrying out point cloud registration on the point cloud data to obtain a first simulation model of the lens part of the eye to be determined.

5. The personalized eyeglass customization method according to claim 1, wherein in the step S3, a specific method for creating the first simulation model of the eyeglass head to be customized by using a 2D image-based 3D reconstruction method based on the first image data comprises the steps of: and establishing a first simulation model for establishing the head of the to-be-customized spectacle lens by adopting a neural network training method based on the obtained first image data.

6. The personalized spectacle customization method according to claim 1, wherein the specific operation method of step S4 comprises the following steps:

and converting the point cloud three-dimensional coordinates in the first simulation model into image coordinates to obtain fifth image data, and identifying the characteristic points of the fifth image data by adopting a pre-training model to obtain second data.

7. The personalized spectacle customization method according to claim 1, wherein the specific operation method of step S4 comprises the following steps:

converting the first simulation model into point cloud format data according to the point cloud database data to obtain fourth data;

and identifying the characteristic points of the head of the glasses to be customized by adopting a three-dimensional target detection method based on the fourth data to obtain second data.

8. A personalized spectacle customization method according to claim 1, characterized in that the attribute data comprise the face type, skin tone, age, hairstyle, beard state and length and smile degree of the lens to be customized.

9. The personalized spectacle customization method of claim 1, wherein the specific operation method steps of step S6 include:

calculating by adopting an Euclidean distance method based on the second data to obtain fourth data, wherein the fourth data is size information of the glasses needing to be matched;

acquiring a glasses style hit degree p (f, i) which is a proportion of the favorite style i having a characteristic f in the user, based on the third data, and matching a glasses model corresponding to the lens part of the eye to be customized from the database based on the fourth data,

the specific expression of the hot degree p (f, i) is as follows:

n (i) is a set of users who like item i, u (f) is a set of users with feature f, and α is a parameter.

10. A personalized spectacle customization system, comprising

The system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring first image data and second image data, the first image data and the second image data are image data acquired based on the same angle, the first image data is RGB color image data of a human head, and the second image data is depth image data of the human head;

a registration module, configured to register the first image data and the second image data to obtain first data;

the 3D reconstruction module is used for creating a first simulation model of the lens part of the eye to be customized by adopting a physical 3D reconstruction method based on the first data and the second image data or by adopting a 3D reconstruction method based on a 2D image based on the first image data;

the first identification module is used for identifying second data of the head of the eye to be customized based on the first simulation model, wherein the second data are characteristic point coordinates of the head of the human body;

the second identification module is used for identifying third data of the lens part of the eye to be determined by adopting a multitask learning algorithm based on the first image, wherein the third data is attribute data of the lens part of the eye to be determined;

the matching module is used for matching the glasses model corresponding to the head of the glasses to be customized from a database based on the second data and the third data, wherein the database is the glasses with different sizes and different styles;

and the printing module is used for producing the glasses by adopting an additive manufacturing technical method based on the glasses model.

Technical Field

The invention relates to the technical field of model reconstruction, in particular to a personalized glasses customizing method and a personalized glasses customizing system.

Background

The existing consumer eyewear industry has a serious contradiction: on one hand, the inner demand market of the glasses is huge; on the other hand, the existing glasses design and manufacture still refer to the foreign glasses design method, the western head type characteristics are still used as the main design process, and domestic consumers spend high cost and still cannot buy a pair of glasses which are comfortable to wear and suitable for the head size and personal preference of the consumers. At present, the requirements of different sizes of glasses for the face shape, the head circumference and the interpupillary distance of each consumer cannot be met by depending on the traditional glasses production mode.

In view of this, the present application is specifically made.

Disclosure of Invention

The invention aims to solve the technical problem that glasses customized by unified standards are worn on heads with different sizes in the glasses industry in the prior art, so that the problems of wearing discomfort and the like can occur, and aims to provide a personalized glasses customizing method and a personalized glasses customizing system, which can realize the manufacture of the glasses based on a plurality of different factors such as the size, the dimension, the head circumference and the like of the head of a human body, and realize and meet the personalized glasses customizing requirements of consumers.

The invention is realized by the following technical scheme:

a personalized spectacle customization method, the customization method comprising the steps of:

s1: acquiring first image data and second image data, wherein the first image data and the second image data are image data acquired based on the same angle, the first image data is RGB color image data of a human head, and the second image data is depth image data of the human head;

s2: registering the first image data with the second image data to obtain first data;

s3: based on the first data and the second image data, adopting a physical 3D reconstruction method, or based on the first image data, adopting a 3D reconstruction method based on a 2D image, and creating a first simulation model of the lens part of the eye to be customized;

s4: identifying second data of the head of the eye to be customized based on the first simulation model, wherein the second data are characteristic point coordinates of the head of the human body;

s5: identifying third data of the lens part of the eye to be customized by adopting a multitask learning algorithm based on the first image, wherein the third data is attribute data of the lens part of the eye to be customized;

s6: matching a glasses model corresponding to the head of the glasses to be customized from a database based on the second data and the third data, wherein the database is glasses with different sizes and different styles;

s7: the glasses are produced by an additive manufacturing technology method based on the glasses model.

In the traditional glasses configuration industry, unified standard glasses frames are prepared by adopting unified manufacturing standards in factories and sold in corresponding glasses shops, and when the glasses are configured in the mode, the glasses frames are always configured in the same standard due to different heads, sizes, head circumferences and the like of consumers, and the deformation of the glasses frames is caused due to the large heads; the head is small and is not matched with the spectacle frame; when the glasses are worn incorrectly, the myopia degree of the consumer is increased, and the daily life of the consumer is seriously influenced. The invention provides a personalized glasses customization method, which adopts a 3D reconstruction model technology, matches a glasses model with a relevant size based on the attribute characteristics of the head of a consumer, and performs simulation matching and wearing on glasses which are required to be worn by the consumer on a virtual network, thereby realizing the personalized customization of the glasses worn by the consumer and being suitable for various glasses consumer groups.

Preferably, the specific operation method of step S2 includes the steps of:

performing noise filtering processing on the first image data and the second image data to obtain first sub-image data and second sub-image data;

and enabling the first sub-image data and the second sub-image data to correspond to each other on a time point by adopting a time registration or space registration method, so as to obtain first data.

Preferably, the specific method of the noise filtering is bilateral filtering or gaussian filtering or conditional filtering or straight-through filtering or random sampling uniform filtering.

Preferably, in step S3, the specific method step of creating the first simulation model of the lens portion to be customized by using the physical 3D reconstruction method based on the first data and the second image data includes:

creating an image coordinate system based on the first data, and creating a camera coordinate system based on the second image data;

converting the first data into three-dimensional coordinates based on an image coordinate system and a camera coordinate system, and converting the first data into point cloud data based on a point cloud method library;

and carrying out point cloud registration on the point cloud data to obtain a first simulation model of the lens part of the eye to be determined.

Preferably, in step S3, the specific method for creating the first simulation model of the lens portion to be customized by using a 3D reconstruction method based on a 2D image based on the first image data includes: and establishing a first simulation model for establishing the head of the to-be-customized spectacle lens by adopting a neural network training method based on the obtained first image data.

Preferably, the specific operation method of step S4 includes the steps of:

and converting the point cloud three-dimensional coordinates in the first simulation model into image coordinates to obtain fifth image data, and identifying the characteristic points of the fifth image data by adopting a pre-training model to obtain second data.

Preferably, the specific operation method of step S4 includes the steps of:

converting the first simulation model into point cloud format data according to the point cloud database data to obtain fourth data;

and identifying the characteristic points of the head of the glasses to be customized by adopting a three-dimensional target detection method based on the fourth data to obtain second data.

Preferably, the attribute data includes a face shape, a skin color, an age, a hairstyle, a beard state and length, and a smile degree of the lens part to be customized;

preferably, the specific operation method of step S6 includes:

calculating by adopting an Euclidean distance method based on the second data to obtain fourth data, wherein the fourth data is size information of the glasses needing to be matched;

acquiring a glasses style hit degree p (f, i) which is a proportion of the favorite style i having a characteristic f in the user, based on the third data, and matching a glasses model corresponding to the lens part of the eye to be customized from the database based on the fourth data,

the specific expression of the hot degree p (f, i) is as follows:

n (i) is a set of users who like item i, u (f) is a set of users with feature f, and α is a parameter.

The invention also discloses a personalized glasses customization system, which comprises

The system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring first image data and second image data, the first image data and the second image data are image data acquired based on the same angle, the first image data is RGB color image data of a human head, and the second image data is depth image data of the human head;

a registration module, configured to register the first image data and the second image data to obtain first data;

the 3D reconstruction module is used for creating a first simulation model of the lens part of the eye to be customized by adopting a physical 3D reconstruction method based on the first data and the second image data or by adopting a 3D reconstruction method based on a 2D image based on the first image data;

the first identification module is used for identifying second data of the head of the eye to be customized based on the first simulation model, wherein the second data are characteristic point coordinates of the head of the human body;

the second identification module is used for identifying third data of the lens part of the eye to be determined by adopting a multitask learning algorithm based on the first image, wherein the third data is attribute data of the lens part of the eye to be determined;

the matching module is used for matching the glasses model corresponding to the head of the glasses to be customized from a database based on the second data and the third data, wherein the database is the glasses with different sizes and different styles;

and the printing module is used for producing the glasses by adopting an additive manufacturing technical method based on the glasses model.

Compared with the prior art, the invention has the following advantages and beneficial effects:

1. the embodiment of the invention provides a personalized glasses customization method and a personalized glasses customization system, which are based on various glasses consumer groups. The glasses with corresponding sizes are matched by the characteristic attributes of the head, such as the face shape, the head, the pupil distance, the height of the nose bridge and the like, so that the personalized customization of various consumer groups of glasses is realized;

2. the embodiment of the invention provides a personalized glasses customizing method and a personalized glasses customizing system, which realize intelligent recommendation of various consumer groups of glasses.

Drawings

In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and that for those skilled in the art, other related drawings can be obtained from these drawings without inventive effort.

FIG. 1 is a schematic diagram of a personalized customization method;

FIG. 2 is a schematic diagram of a personalization customization system;

fig. 3 is a schematic diagram of the relationship between image coordinates and camera coordinates.

Detailed Description

In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to examples and accompanying drawings, and the exemplary embodiments and descriptions thereof are only used for explaining the present invention and are not meant to limit the present invention.

In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. However, it will be apparent to one of ordinary skill in the art that: it is not necessary to employ these specific details to practice the present invention. In other instances, well-known structures, circuits, materials, or methods have not been described in detail so as not to obscure the present invention.

Throughout the specification, reference to "one embodiment," "an embodiment," "one example," or "an example" means: the particular features, structures, or characteristics described in connection with the embodiment or example are included in at least one embodiment of the invention. Thus, the appearances of the phrases "one embodiment," "an embodiment," "one example" or "an example" in various places throughout this specification are not necessarily all referring to the same embodiment or example. Furthermore, the particular features, structures, or characteristics may be combined in any suitable combination and/or sub-combination in one or more embodiments or examples. Further, those of ordinary skill in the art will appreciate that the illustrations provided herein are for illustrative purposes and are not necessarily drawn to scale. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.

In the description of the present invention, the terms "front", "rear", "left", "right", "upper", "lower", "vertical", "horizontal", "upper", "lower", "inner", "outer", etc. indicate orientations or positional relationships based on those shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed in a particular orientation, and be operated, and therefore, should not be construed as limiting the scope of the present invention.

Example one

The embodiment discloses a personalized glasses customizing method, as shown in fig. 1, the customizing method comprises the following steps:

s1: acquiring first image data and second image data, wherein the first image data and the second image data are image data acquired based on the same angle, the first image data is RGB color image data of the head of a human body, and the second image data is the human body;

in the step of this embodiment, the image acquisition mainly includes acquiring an RGB color image of a human head, and adding a depth image D, which together are an RGBD image, depth image data of the head, depth image data, and three-dimensional image data, so that the first image data acquired in this embodiment is planar image data, and the second image data is three-dimensional image data;

in the embodiment, the LFED algorithm is adopted to detect the head of the human body, so that the defect of designing a network based on the anchor is overcome, and the LFFD is the network without the anchor; the LFFD detection speed and precision are considerable; numerous experiments based on WIDER FACE and FDDB demonstrated that LFFD is a great advantage on edge devices; the system described in the patent is deployed in edge devices, and the storage capacity and the computing power of the edge devices are lower than those of the cloud, so that the network parameters of the artificial intelligence model are required to be small.

S2: registering the first image data with the second image data to obtain first data;

the specific operation method of step S2 includes the steps of:

performing noise filtering processing on the first image data and the second image data to obtain first sub-image data and second sub-image data; the data is subjected to noise processing, mainly hash points, isolated points and the like in the data are removed, and common methods comprise bilateral filtering, Gaussian filtering, conditional filtering, direct filtering, random sampling consistent filtering and the like.

In this embodiment, the first sub-image data and the second sub-image data are mutually corresponding in time point by using a time registration or spatial registration method, so as to obtain first data.

The time registration method comprises the following steps: the first image data and the second image data are acquired by using two modules respectively, the image data acquired by the two modules are ensured to be synchronous in time, so that strict time synchronization is carried out by adjusting a frame synchronization API on the camera, the upper layer application needs to take out two groups of image data simultaneously when calling the camera API to acquire data, and the RGB data and the depth data are acquired according to the output rule of the camera. If the RGB data and the depth data output from the camera are in the order of the first image data to the second image data, the rule for receiving the data should be the first image data to the second image data. One cycle is a complete 3D image data.

The spatial registration method comprises the following steps: because the RGB camera of module and the mounted position of degree of depth camera on the hardware may have the skew, the visual angle direction of camera may have the skew, just at this moment need carry out the skew calibration to the image data who gathers, makes the coordinate of every point on the RGB image and the coordinate of every point of degree of depth data all one-to-one.

S3: based on the first data and the second image data, adopting a physical 3D reconstruction method, or based on the first image data, adopting a 3D reconstruction method based on a 2D image, and creating a first simulation model of the lens part of the eye to be customized;

the physical 3D reconstruction mainly refers to acquiring depth information and RGB information by using hardware equipment and then reconstructing the depth information and the RGB information into a 3D model, wherein the processed data are first data and second image data, and the first data and the second image data are converted into point cloud data after being converted and stored in a format.

At present, a PCL (point Cloud library) library is used for processing 3D data, multiple operating system platforms are supported, and functions of point Cloud acquisition, filtering, segmentation, registration, retrieval, feature extraction, recognition, tracking, curved surface reconstruction, visualization and the like are provided. The physical 3D reconstruction process is typically: point cloud data is generated to point cloud registration.

In step S3, the specific method for creating the first simulation model of the lens portion to be customized by using the physical 3D reconstruction method based on the first data and the second image data includes:

creating an image coordinate system based on the first data, and creating a camera coordinate system based on the second image data;

an image coordinate system created based on the third image data, including (u, v) pixel coordinates and an (x, y) coordinate system, the camera coordinate system including (x, y, z);

converting the first data into three-dimensional coordinates based on an image coordinate system and a camera coordinate system, and converting the first data into point cloud data based on a point cloud method library;

since (u, v) represents only the number of columns and rows of pixels, an image coordinate system x-y in physical units is established. The intersection of the camera's optical axis with the image plane (typically at the center of the image plane) is defined as the origin O1 of the coordinate system, and the x-axis is parallel to the u-axis and the y-axis is parallel to the v-axis, assuming (u) is0,v0) Representing the coordinates of O1 in a u-v coordinate system, dx and dy respectively represent the physical dimensions of each pixel in the horizontal axis x and the vertical axis y, the following relationship exists between the coordinates of each pixel in the u-v coordinate system and the coordinates in the x-y coordinate system in the image:

the unit of dx is: mm/pixel, coordinates expressed as (x, y, z), camera coordinates need to be introduced, indicating the location of the z coordinate. The image coordinate system needs to be converted into the camera coordinate system;

according to the principle of similar triangle (triangle ABOc is similar to triangle oCOc, triangle PBOc is similar to triangle pCOc), the coordinates of the physical point position P point can be found as:

and Zc: depth information

Where f is the focal length of the camera and Zc is the depth information. As shown in fig. 3, the expression of the transformation into a matrix is:

and carrying out point cloud registration on the point cloud data to obtain a first simulation model of the lens part of the eye to be determined.

The point cloud registration is to superimpose multi-frame 3D images acquired at different angles and different times onto the same coordinate system to form a group of complete point cloud data, and the common flow is first coarse registration and then fine registration. Commonly used algorithms are SAC-IA algorithm realized by using registration module in PCL library, 4PCS, or scale invariant feature of SIFT, SURF and the like according to the target to be registered.

The precise registration algorithm includes NDT algorithm, SSA algorithm, and GA algorithm, and in this embodiment, an ICP algorithm is mainly used, which is essentially an optimal registration method based on the least square method. The flow of the ICP algorithm is as follows: finding corresponding points:

generally, in the case of an initial value, it is assumed that the source cloud is transformed by an initial rotational-translational matrix, and a transformed point cloud is obtained. Then comparing the transformed point cloud with a target cloud, and considering the two points as corresponding points as long as the distance between the two point clouds is smaller than a certain threshold; r, T optimization: after the corresponding points exist, solving the problem of a corresponding point translation matrix, wherein the translation matrix is divided into a rotation part R and a translation part T, and an optimal rotation translation matrix is solved by adopting a least square method and the like; iteration: and (3) optimizing to obtain a new R and T, causing the positions of some points after conversion to change, correspondingly changing some nearest point pairs, and repeating the step (1) until some iteration termination conditions are met.

In step S3, the specific method for creating the first simulation model of the head of the eye to be customized by using the 3D reconstruction method based on the 2D image based on the first image data includes the steps of: and establishing a first simulation model for establishing the head of the to-be-customized spectacle lens by adopting a neural network training method based on the obtained first image data. In this embodiment, the neural network method is a process of identifying the 2D map by using the neural network method in the prior art.

The 2D image is actually a projection of the 3D image plane, and the 3D image can be calculated back if the direction and position of the camera, and the direction and position of the light source are known. According to the direction position of the camera and the direction position of the light source, a 3D reconstruction algorithm based on a 2D image, such as Shape from shaping, Shape from Silhouttes, Shape from DE-focus, Stereo matching and the like, is available; the method for 3D reconstruction of 2D images of a neural network, due to the advantages of the neural network: the accuracy is high, the realization is relatively simple, and the selected models comprise PRNet, 3DDFA, face3D, 2DASL, 3DMM, VRNet, DECA, Deep3Dface Reconstruction, Nerfies and the like.

S4: identifying second data of the head of the eye to be customized based on the first simulation model, wherein the second data are characteristic point coordinates of the head of the human body;

through the obtained second data, the positioning of the matching point and the matching surface when the 3D glasses model and the 3D human head model are assembled can be obtained, wherein the positioning comprises the three-dimensional coordinates of left and right pupils and the three-dimensional coordinates of the focus of the glasses lens; the three-dimensional coordinates of the three-dimensional model of the human head, namely the upper turbinate, and the three-dimensional coordinates of the 3D glasses model, namely the supporting blade; the three-dimensional coordinates of the three-dimensional model ear root of the head of the human body and the three-dimensional coordinates of the bending start position of the glasses legs of the 3D glasses model.

The characteristic point coordinates for recognizing the human head are mainly used for calculating the size information required by glasses and calculating the positioning of a matching point and a matching surface when a 3D glasses model and a 3D human head model are assembled, and the recognizing process is realized through two schemes:

further, the specific operation method of step S4 includes:

and converting the point cloud three-dimensional coordinates in the first simulation model into image coordinates to obtain fifth image data, and identifying the characteristic points of the fifth image data by adopting a pre-training model to obtain second data.

The method comprises the steps of converting a human head 3D model into a 2D picture, identifying the 2D picture through a common human face feature identification algorithm, mapping points of a pixel coordinate system to a world coordinate system, and mapping two-dimensional points to the three-dimensional coordinate system to obtain a ray because the two-dimensional coordinates are mapped to the three-dimensional coordinates and one more depth information is provided, wherein in the human head 3D model, the point where the ray and the model intersect can be used as a value of a z coordinate. At the moment, the human head 3D model is adjusted to the front, the 3D coordinates are converted into 2D coordinates, and the 2D image is subjected to feature point recognition by adopting a pre-training model blazeface and the like, such as: key feature points such as left and right pupils, left and right ears, left and right eyebrows, a nose and the like are obtained, pixel point coordinates are obtained, then 3D coordinates are reversely calculated, and feature point coordinates of the 3D human head model can be obtained: left pupil (x)1,y1,z1) Right pupil (x)2,y2,z2)。

Further, the specific operation method of step S4 includes: converting the first simulation model into point cloud format data according to the point cloud database data to obtain fourth data; and identifying the characteristic points of the head of the glasses to be customized by adopting a three-dimensional target detection method based on the fourth data to obtain second data.

The method comprises the steps of converting the format of a human head 3D model into a point cloud format, directly carrying out human head characteristic point identification on point cloud data, and converting the 3D human head model into the point cloud format. If the format of the 3D human head model is in the format of a.obj or a.ply, the conversion can be completed by directly calling the tool in the PCL library, such as PCL _ obj2pcd and PCL _ ply2 pcd; if 3D human headThe model is in the format of the dae, and the vertex coordinates and normal vectors of the mes of the 3D model are extracted by using an Assimp library and then are converted into the pcd file; after the 3D model is converted into data in a point cloud format, identifying the characteristic points of the human head by using three-dimensional target detection algorithms such as VoxelNet and the like, and obtaining the characteristic point coordinates of the 3D human head model: left pupil (x)1,y1,z1) Right pupil (x)2,y2,z2) (ii) a And recognizing the three-dimensional coordinates of the characteristic points of the 3D human head model by using the target recognition model.

S5: identifying third data of the lens part of the eye to be customized by adopting a multitask learning algorithm based on the first image, wherein the third data is attribute data of the lens part of the eye to be customized; the attribute value of the human head and face predicted by the model can assist a glasses recommendation system in the following steps to make more accurate and reasonable recommendation on the style of glasses, and in the embodiment, the multitask learning algorithm is used for recognizing the image by the multitask learning algorithm in the prior art.

The face attribute recognition algorithm generally aligns the face according to the coordinates of the key points of the five sense organs of the face, and then performs attribute analysis. The conventional human head attribute recognition algorithm is an independent process when recognizing each human head attribute, namely, the human head attribute recognition is only a general name of a class of algorithms, and gender recognition, age estimation, posture estimation, expression recognition and the like are mutually independent algorithms.

The attribute data includes the face type, skin color, age, hairstyle, beard state and length, and smile level of the lens portion to be customized.

S6: matching a glasses model corresponding to the head of the glasses to be customized from a database based on the second data and the third data, wherein the database is glasses with different sizes and different styles;

the head attributes of the consumers, such as gender/face/skin color/age/hair style and other appearances of the consumers, can be obtained through the human head attribute model, and then the artificial intelligence algorithm model is used for learning by marking data from the mass aesthetic perspective and is used as a basic scheme for recommending the cold start of the system. In the problem of cold start of articles, statistical analysis is performed according to historical orders, and labeling rules of training data are corrected, so that the recommendation reasonability of new glasses is improved.

The main functions of the glasses personalized intelligent recommendation system are as follows: the method is characterized in that the method is used for recommending the style and the color of the glasses by using a recommendation algorithm or rule from the dimension of the appearance characteristics of consumers such as gender, face shape, skin color, age, hair style and the like, and is used for recommending the size of the glasses by using a recommendation algorithm or rule from facial parameters related to the design of the glasses such as pupils, bridge of the nose, ears and the like.

The values of the appearance characteristics of the consumers such as gender/face shape/skin color/age/hair style can be obtained from the prediction output values of the gender/face shape/skin color/age/hair style prediction algorithm models, and the facial parameter information related to the design of the glasses such as the pupil/nose bridge/ear can be obtained from the output values of the facial feature recognition algorithm models such as the pupil/nose bridge/ear. Here, gender/face/skin color/age/hairstyle/pupil/nose bridge/ear as characteristics, two labels of style and size are obtained by a recommendation algorithm, the style consisting of a frame and temples.

The specific operation method of step S6 includes the steps of:

calculating by adopting an Euclidean distance method based on the second data to obtain fourth data, wherein the fourth data is size data information of the glasses to be matched and comprises glasses legs, pile heads, hinges and the like in the glasses; the size information is calculated by adopting an Euclidean distance calculation formula: (dx ^2+ dy ^2+ dz ^2) ^0.5, wherein: dx, dy, dz are the coordinate differences of x, y, z, 2 is the square, and 0.5 is the square of the square.

Acquiring a glasses style hit degree p (f, i) which is a proportion of the favorite style i having a characteristic f in the user, based on the third data, and matching a glasses model corresponding to the lens part of the eye to be customized from the database based on the fourth data,

the specific expression of the hot degree p (f, i) is as follows:

n (i) is a set of users who like item i, u (f) is a set of users with feature f, and α is a parameter.

S7: the glasses are produced by an additive manufacturing technology method based on the glasses model.

The recommended 3D printing eyeglass style is selected from a 3D printing eyeglass database, eyeglasses in the database are composed of two parts, namely an eyeglass frame and eyeglass legs, only the numbers of the eyeglass frame and the eyeglass legs are stored in the database, 3D eyeglass leg models and 3D eyeglass frame models are stored in a file server, and files can be retrieved and loaded through the numbers. The method comprises the steps of obtaining label numbers of a glasses frame and glasses legs through a style predicted by a recommended algorithm, loading a 3D model of the corresponding glasses frame and glasses legs from a file server by using a 3D model editor, and modifying and adapting the sizes of the components such as the glasses legs, the glasses frame and the lenses of glasses in the 3D model editor according to size information predicted by the recommended algorithm, so that a glasses wearer can achieve the most comfortable and scientific glasses wearing experience from the ergonomic angle.

And the whole customization method is characterized in that: intelligent recommendation of glasses size; intelligent recommendation of the style of the glasses; intelligent generation of a glasses model; free combination of the design of the glasses; glasses low-cost 3D prints production.

The personalized glasses customizing method provided by the embodiment customizes based on the head attribute of the consumer, and realizes the personalized glasses customizing scheme of the consumer.

Example two

The embodiment discloses a personalized glasses customizing system, as shown in fig. 2, the embodiment is to realize the personalized glasses value determining method as the embodiment one, and the system comprises

The system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring first image data and second image data, the first image data and the second image data are image data acquired based on the same angle, the first image data is RGB color image data of a human head, and the second image data is depth image data of the human head;

the depth image data who acquires have 3D structured light, TOF, binocular camera etc. and what adopt in this embodiment is that 3D structured light acquires, including IR infrared emission module: the infrared light source is used for emitting specially modulated invisible infrared light to a shooting object; IR infrared receiving module: invisible infrared light reflected by the shot object is received, and each spot deviation is tracked. Comparing the offset positions of different tracking light points at the receiving end and the transmitting end so as to acquire the depth of field information of the surface of the object; 3. lens module: and a common lens module is adopted for 2D color picture shooting.

The registration module is used for registering the first image data and the second image data to obtain first data, wherein the first data is point cloud data which is generated after registration is carried out through a registration algorithm (ICP algorithm, NDT algorithm, SSA algorithm, GA algorithm) and the like, and the point cloud data is 3D human head model data;

the 3D reconstruction module is used for creating a first simulation model of the lens part of the eye to be customized by adopting a physical 3D reconstruction method based on the first data and the second image data or by adopting a 3D reconstruction method based on a 2D image based on the first image data;

the first identification module is used for identifying second data of the head of the eye to be customized based on the first simulation model, wherein the second data are characteristic point coordinates of the head of the human body;

the second identification module is used for identifying third data of the lens part of the eye to be determined by adopting a Multi-Task Learning algorithm based on the first image, wherein the third data is attribute data of the lens part of the eye to be determined, and the Multi-Task Learning algorithm is Multi-Task Learning algorithm such as Multi-Task Learning as Multi-Objective Optimization;

the matching module is used for matching the glasses model corresponding to the head of the glasses to be customized from a database based on the second data and the third data, wherein the database is the glasses with different sizes and different styles; the second data and the third data are input into a recommendation system, the recommendation system finishes the recommendation of the style and the size of the glasses, the return value can be used for indexing of a database, and the second data and the third data cannot be directly matched and retrieved from the database;

and the printing module is used for producing the glasses by adopting an additive manufacturing technical method based on the glasses model. The produced glasses model comprises a glasses frame, glasses legs, a pile head, a hinge and other parts which are produced by 3D printing; the production information of the 3D glasses model will typically include the following sections: a 3D glasses model file (format of stp/stl), size parameter information of the 3D glasses model, and material information (nylon/titanium alloy/aluminum alloy, etc.) of different parts of the 3D glasses model. After a consumer selects favorite glasses, the 3D glasses model file, parameter information and corresponding materials are input into a 3D printer, and the assembly and post-processing processes of the glasses are carried out after printing is finished, so that the production and manufacturing of the glasses can be finished.

The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

14页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:点云与图像匹配方法、装置、电子设备和存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!