A method and system for realizing social network circle
Through digital human technology and human -connected planet modules, the lack of existing social platforms in terms of interaction, immersion, social efficiency and privacy protection has been solved. Essence
Patent Information
- Application Number
- CN202411252182.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-09-09
AI Technical Summary
The existing social platforms have shortcomings in terms of interactivity, immersion, social efficiency, privacy protection, etc., and the high cost of virtual reality technology limits the popularity of social interaction.
Create a personal image and social business cards through digital man technology, use human -planet module to search and exchange business card information to achieve social network expansion, and ensure data security through intelligent privacy management and encryption technology.
It improves social interaction and immersion, improves social efficiency, enhances privacy protection and security, reduces the cost of use, and promotes social popularization.
Smart Images

Figure CN118780931B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of virtual reality technology, and in particular to a method and system for realizing a social network circle. Background Art
[0002] Social platform technologies include existing metaverse platforms such as Meta's "Horizon Worlds" and other metaverse social application cases, which provide the technical foundation for identity construction, social interaction and virtual space exploration. In terms of identity construction, the digital exhibition hall combines technologies such as artificial intelligence, VR / AR, and interactive projection to provide visitors with an interactive exhibition experience. These technologies can be used to showcase a company's products and services. In terms of social interaction, digital humans are virtual humans with human forms simulated by computers, which need to be combined with a variety of artificial intelligence technologies such as character image simulation, character voice cloning, and natural language processing. These technologies enable digital humans to interact on behalf of others in virtual space.
[0003] Furthermore, existing social platforms have technical defects in protecting privacy, preventing bad behavior in the virtual world, and ensuring the security of virtual assets. At the same time, the technology of virtual space exploration requires a lot of computing power costs, which may lead to increased usage costs and limit the popularity of social networking.
[0004] Through the above analysis, the problems and defects of the existing technology are as follows: the existing social platforms are insufficient in interactivity, immersion, social efficiency, privacy protection, etc. For example, the social experience in the virtual space lacks a sense of reality, and the platform's privacy and security protection measures are insufficient, resulting in low trust. In addition, the limitations of virtual reality technology and costs have also affected the popularity of social interaction. Summary of the invention
[0005] In order to overcome the problems existing in the related art, the disclosed embodiment of the present invention provides a method and system for realizing a social network circle, and the technical solution is as follows:
[0006] The present invention is implemented in this way. The implementation method of the social network circle is to create a personal digital human image through digital human technology and generate a social business card; if the business card is made public, the business card information of various industries is searched and exchanged in the network planet module to achieve social network expansion, which specifically includes:
[0007] S1, Registration and Login: Provides registration and login interfaces, supports identity authentication methods including email, mobile phone number and third-party account, and sets personal basic information and privacy preferences;
[0008] S2, digital human image creation: upload the head portrait photo, the system pre-processes the photo; extracts facial features, generates a 3D digital human model, generates animation and performs video synthesis;
[0009] S3, Business Card Management: Create and edit digital business cards, add personal information, contact information, and professional information; preview business card videos, and choose whether to publish them publicly;
[0010] S4, Network Planet Module: Search and browse public business cards, find network information based on interests or needs; exchange business cards, and save the business cards of interest to personal business card folders;
[0011] S5, social interaction and message notification: conduct instant messaging exchanges and receive business card exchange requests, favorite notifications, and system update messages;
[0012] S6, Privacy and Security: Set the publicity scope and privacy level of the business card and encrypt the data.
[0013] In step S2, the digital human image is created, including: avatar uploading and processing: uploading the avatar photo, and the system guides the selection of style and personalized elements; facial feature extraction: using the face detector BlazeFace algorithm to extract facial feature points; digital human modeling: based on the extracted key facial feature points, combined with the pre-trained face model, a three-dimensional digital human model that is highly similar to the photo is generated; animation generation: creating animation effects for the three-dimensional digital human model, simulating the subtle movements of the face in the photo, where the subtle movements of the face include expressions and eyes; video synthesis: synthesizing the three-dimensional digital human model with the preset business card template to generate a digital human business card video; output and sharing: output the generated digital human business card video in the form of a file, and integrate it into the personal business card for top display.
[0014] Furthermore, the avatar uploading and processing includes: the preprocessing process of personal avatar photos, image uploading and format verification, image cropping and resizing, image rotation and alignment, image enhancement and denoising, image normalization and facial feature point verification; wherein, image uploading and format verification includes: after uploading the avatar photo, the system detects the format and size of the photo; if the photo format or size does not meet the requirements, the system prompts to make corresponding adjustments;
[0015] Image cropping and resizing, including: (1) Automatic cropping: The system uses the facial detection algorithm BlazeFace to automatically identify the face area in the photo and crop it to ensure that the face is in the center of the image; (2) Manual adjustment: Manually adjust the cropping frame to ensure the integrity and boundaries of the face area; (3) Resizing: Adjust the cropped image to a standard size;
[0016] Image rotation and alignment, including: (i) Face alignment: Use the facial key point detection algorithm to identify the key feature points of the face. The facial key point detection algorithm is dlib's 68-point facial landmarks. The key feature points of the face include the location of the facial features and the contour line; (ii) Automatic rotation: Based on the detected key points, calculate the rotation angle of the face and automatically rotate the image to the standard angle to ensure horizontal alignment of the face; (iii) Manual rotation: Manually fine-tune the rotation angle to optimize the alignment effect;
[0017] The 68-point facial landmark algorithm of dlib includes the following steps: (i-1) performing facial detection, using a pre-trained facial detector to detect the face area in the image; (i-2) key point detection, using a facial key point detector to predict the positions of 68 feature points in the detected face area; (i-3) 68-point facial landmarks, the 68-point facial landmarks of dlib are arranged in the following order: contour line: 1-17; left eyebrow: 18-22; right eyebrow: 23-27; nose bridge: 28-31; nose wing: 32-36; left eye: 37-42; right eye: 43-48; outer lip: 49-60; inner lip: 61-68;
[0018] Image enhancement and denoising, including: (a) brightness and contrast adjustment: adjusting the brightness and contrast of the image through the histogram equalization method; (b) denoising: removing noise in the image using the median filter and Gaussian filter algorithms; (c) color correction: adjusting the white balance and color saturation of the image;
[0019] Image normalization, including: (A) pixel value normalization: normalize the pixel value of the image to the range of 0-1 and standardize the image data; (B) data format conversion: convert the image data into the data format required by the model, the data format required by the model includes numpy arrays and tensors;
[0020] Facial landmark verification, including: (I) landmark detection: use the facial key point detection algorithm again to verify whether the facial landmarks in the image are clear, visible and accurate; (II) quality assessment: if the landmark detection result is not ideal, prompt to re-upload a clearer photo.
[0021] In step (i-1), face detection is performed, including: let the input image be III, the face detector outputs one or more bounding boxes, each bounding box is represented by It indicates that, are the coordinates of the upper left corner of the bounding box, are width and height respectively;
[0022] In step (i-2), key point detection includes: for each face region, the key point detector outputs the positions of 68 feature points, which are represented as:
[0023]
[0024] In the formula, is a set of feature points, is the first feature point, is the second feature point, It is the 68th feature point.
[0025] Furthermore, the pre-trained face model includes: data preprocessing: using the preprocess_data function to load and preprocess the image and key point data and convert them into the format used by the model; building the model: using the build_face_model function to build a convolutional neural network model for extracting facial features from the image and predicting the key point coordinates; model training: using the train_model function to compile and train the model, using the mean square error as the loss function to optimize the model parameters; main function: using the main function to integrate the data preprocessing, model building and training steps, and save the trained model.
[0026] Furthermore, digital human modeling includes: image preprocessing and feature extraction: the preprocess_image function reads and preprocesses the uploaded head portrait photo, and the extract_features function uses the Dlib library to detect the face and extract the coordinates of 68 key points; initial three-dimensional model generation: the generate_initial_model function loads the pre-trained benchmark model and adjusts the model vertex positions according to the extracted key points; detail adjustment and optimization: the sculpt_and_optimize_model function uses Blender's sculpting tools to manually or automatically adjust the model details and optimize the model by reducing the number of polygons; expression and animation generation: the generate_animations function binds the model to the skeleton system and creates a shape base for generating a variety of expressions and animations; texture generation and mapping: the generate_textures function maps the texture information in the 2D image to the three-dimensional model surface through UV mapping and texture mapping; lighting and rendering: the render_model function configures the lighting and rendering parameters to generate the final three-dimensional rendering effect.
[0027] In step S2, a three-dimensional digital human model is generated, including:
[0028] Step 1: Vertex representation. A 3D model is composed of multiple vertices, and the position of each vertex is represented by a 3D coordinate:
[0029]
[0030] In the formula, For the The coordinates of the vertices, are the coordinates of the vertex on the X, Y, and Z axes respectively;
[0031] Step 2, edges and faces, vertices are connected by edges to form polygons, a face is represented by the index of the vertex, where a triangular face is represented as:
[0032]
[0033] In the formula, For the Noodles, are three vertices;
[0034] Step 3, normal vector; the normal vector of each face is calculated by cross product to indicate the direction the face is facing:
[0035]
[0036] in, It is The normal vector of each face;
[0037] Step 4, transformation matrix: The position, size and orientation of the model in three-dimensional space are manipulated through the transformation matrix, which includes translation, rotation and scaling.
[0038] Step 5: Surface representation: The surface of the human body model is represented by a parametric surface. The mathematical expression of the Bézier surface is:
[0039]
[0040] in, is a point on the surface, is the control point, and is the Bézier basis function;
[0041] Step 6: Texture mapping: The surface color or texture of the digital human model is represented by texture mapping, and the texture coordinates are two-dimensional coordinates:
[0042]
[0043] in, Representation and Vertex The corresponding texture coordinates.
[0044] Further, facial feature points are extracted, including: capturing facial actions: using a deep learning model to capture facial actions from photos, extracting key points and action parameters, and generating facial animation data based on the extracted facial action parameters; generating animation sequences: using facial action parameters to drive the skeleton system of the digital human model to generate continuous animation frames, ensuring smooth transitions between animation frames;
[0045] Video synthesis and export include: Video synthesis: Use the video processing library FFmpeg to synthesize the digital human animation and the business card template to generate a complete video; Align the digital human animation with the character area in the template and handle the background transparency problem; Add corresponding text information and background music to the synthesized video; Export video: Export the final synthesized video to MP4 video format;
[0046] Find and exchange business card information from all walks of life in the Renmai Planet module to expand the social network, including: setting the privacy option of personal business cards to be public in Renmai Planet; when the system recognizes that the privacy option is public, the data viewing permission of the Renmai Planet module will be made public to that person; click on the Renmai Planet module to view the public data permissions under the labels of various industries, and click on a to view the business card information; click Add to Business Card Folder to add the business card to the personal business card folder or save it to the mobile phone address book.
[0047] Furthermore, the business card information includes the broadcast video of the digital person, name, mobile phone number, email address and company information; the identified privacy options and the adjustment of the data viewing permissions of the network planet module according to the settings include reading the privacy settings from the configuration file and adjusting the data access permissions according to these settings; privacy option reading: the privacy options are read from the configuration file or database, and the privacy options are parsed using algorithms or rules to determine whether the business card information is public; privacy option identification algorithm: the privacy settings are parsed using conditional judgment or rule engines; if the privacy option is public, the data viewing permissions of the network planet module are made public to the user; adjusting data viewing permissions:
[0048] Adjust the data viewing permissions of the Renmai Planet module according to the parsing results, and use the access control list ACL or role permission model to implement the process, which specifically includes: privacy option reading: privacy options read from the configuration file or database; privacy option identification algorithm: parsed privacy settings; adjust data viewing permissions: according to the parsing results of the privacy options, adjust the data viewing permissions of the Renmai Planet module by updating the access control list ACL; use the rule engine Drools to parse privacy options; when changing privacy options, trigger the permission update process to ensure security during data access and update.
[0049] Another object of the present invention is to provide a system for realizing a social network circle, which is realized by the method for realizing a social network circle, and the system comprises:
[0050] The registration and login module is used to provide registration and login interfaces and support multiple identity authentication methods; set personal basic information and privacy preferences; the digital human image creation module is used to realize avatar uploading and processing, facial feature extraction, digital human modeling, animation generation and video synthesis functions; the business card management module is used to realize business card creation and editing as well as business card preview and publishing functions; the network planet module is used to realize business card search and browsing as well as business card exchange and collection functions; the social interaction and message notification module is used to realize instant messaging and message notification functions; the privacy and security module is used to realize privacy settings and data encryption functions.
[0051] In combination with all the above technical solutions, the beneficial effects of the present invention are as follows:
[0052] 1. Highly realistic digital human creation: Through advanced digital human technology, you can create a digital human image that is highly similar to yourself. Specifically, it includes: (1.1) Avatar upload and feature extraction: Upload personal avatar photos, and the system uses face recognition technology to extract key facial feature points from the photos. (1.2) Digital human modeling: Based on the extracted facial feature points and combined with the pre-trained face model, a highly realistic digital human model is generated. (1.3) Animation generation: Capture the subtle movements of the face in the photo and create corresponding animations for the digital human model to make it more vivid and realistic.
[0053] 2. Personalized digital human social business cards, combining digital human images with social business cards to create personalized dynamic display forms. The specific steps include: (2.1) Video synthesis: synthesize the generated digital human animation with the preset business card template to generate a personalized digital human business card video. (2.2) Add text information and background music: add personal information and background music to the business card video to enhance the uniqueness and attractiveness of the business card.
[0054] 3. Network Planet Module and Business Card Exchange: Provides a network planet module where you can find and exchange business card information from all walks of life to expand your social network. Key innovations include: (3.1) Business card disclosure and privacy management: You can choose to make your business card public or private. The system intelligently identifies privacy options and dynamically adjusts data viewing permissions. (3.2) Intelligent matching and recommendation: By analyzing interests and social needs, it intelligently recommends network resources that may be of interest to improve the efficiency of network expansion.
[0055] 4. Intelligent privacy management, which realizes the intelligent identification of privacy options and the dynamic adjustment of data viewing permissions. Specific technical points include: (4.1) Privacy option reading and parsing: reading privacy settings from configuration files or databases, and parsing these settings using algorithms. (4.2) Permission adjustment: adjusting the data viewing permissions of the Renma Planet module according to the parsing results to ensure that privacy is effectively managed. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] The accompanying drawings herein are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description, serve to explain the principles of the present disclosure;
[0057] Figure 1 It is a flow chart of a method for implementing a social network circle provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0058] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention, so the present invention is not limited by the specific implementation disclosed below.
[0059] Embodiment 1, as Figure 1 As shown, the implementation method of the social network circle provided by the embodiment of the present invention includes the following steps:
[0060] S1, Registration and Login: Provides registration and login interfaces, supports identity authentication methods including email, mobile phone number and third-party account, and sets personal basic information and privacy preferences;
[0061] S2, digital human image creation: upload the head portrait photo, the system pre-processes the photo; extracts facial features, generates a 3D digital human model, generates animation and performs video synthesis;
[0062] S3, Business Card Management: Create and edit digital business cards, add personal information, contact information, and professional information; preview business card videos, and choose whether to publish them publicly;
[0063] S4, Network Planet Module: Search and browse public business cards, find network information based on interests or needs; exchange business cards, and save the business cards of interest to personal business card folders;
[0064] S5, social interaction and message notification: conduct instant messaging exchanges and receive business card exchange requests, favorite notifications, and system update messages;
[0065] S6, Privacy and Security: Set the publicity scope and privacy level of the business card and encrypt the data.
[0066] S101, guides users to upload their personal profile picture. The profile picture must have a solid color background, be clear, have a frontal face, be evenly lit, have unobstructed facial features, be without glasses, and have a closed mouth, so that facial feature points can be easily identified and the image quality can meet the requirements for subsequent processing.
[0067] S102, feature extraction: Utilize face recognition technology and use the lightweight and highly accurate face detector algorithm BlazeFace. The main implementation process is: import mediapipe as mp# Drawing tool mp_drawing = mp.solutions.drawing_utils# Initialize face detection model mp_face_detection = mp.solutions.face_detection mp_face_detector = mp_face_detection.FaceDetection(min_detection_confidence=0.4) results = mp_face_detector.process(imgRGB) if results.detections:# Face detection for face_no, face in enumerate(results.detections):# Draw face key points mp_drawing.draw_detection(image=output_image, detection=face, keypoint_drawing_spec=mp_drawing.DrawingSpec(color=(0,255,0), thickness=-1, circle_radius=image_width / / 115), bbox_drawing_spec=mp_drawing.DrawingSpec(color=(0,255,0),thickness=image_width / / 180))# Draw face frame face_bbox = face.location_data.relative_bounding_boxx1 = int(face_bbox.xmin*image_width)y1 = int(face_bbox.ymin*image_height)cv2.rectangle(output_image,pt1=(x1, y1-image_width / / 20), pt2=(x1+image_width / / 16, y1), color=(0, 255,0), thickness=-1)Extract key facial feature points from the preprocessed photos, including but not limited to the location of facial features, contour lines, etc.;
[0068] The specific preprocessing process of personal headshot photos includes image uploading and format verification, image cropping and resizing, image rotation and alignment, image enhancement and denoising, image normalization, and facial feature point verification;
[0069] As you can understand, BlazeFace is a lightweight and fast face detector proposed by Google, designed for real-time applications such as AR experience on mobile devices. The algorithm uses deep learning to achieve efficient face detection and feature point extraction. The following is the specific expression of the BlazeFace algorithm and the meaning of its symbols.
[0070] A) Network Architecture,The core of BlazeFace is a lightweight convolutional neural network (CNN),which combines the following techniques:
[0071] Depthwise Separable Convolution: used to reduce model parameters and computation. A standard convolution operation is decomposed into a depthwise convolution and a pointwise convolution.
[0072] Depthwise Convolution: Apply convolution kernels channel by channel, expressed as ;
[0073] Pointwise Convolution: Use The convolution kernel of is applied on all channels and is expressed as ;
[0074] B) Anchor mechanism, BlazeFace uses the anchor mechanism to detect facial regions of different sizes and positions.
[0075] Anchors: A set of predefined rectangular boxes used to detect objects of a specific scale and ratio. Each anchor point is It indicates that, and are the coordinates of the center of the anchor point, and The width and height respectively.
[0076] C) Feature point extraction, BlazeFace outputs the facial bounding box and the locations of six key points.
[0077] Among them, key points (Keypoints): facial feature points, including eyes, nose tip and mouth corners. Each key point is used Indicates that Represents the index of the keypoint.
[0078] D) Loss Function,The training goal of BlazeFace is to minimize the regression loss and,classification loss of the detection box.
[0079] Among them, regression loss is used to adjust the predicted bounding box parameters to make it closer to the real box. The commonly used regression loss is smooth L1 loss, which is expressed as:
[0080]
[0081] Classification Loss: used to determine whether an anchor point contains a face. The commonly used classification loss is the cross entropy loss, which is expressed as:
[0082]
[0083] Total Loss: The combined regression loss and classification loss is expressed as:
[0084]
[0085] in is the importance weight used to balance the two.
[0086] In the above formula, represents the depthwise convolution operation, Represents a point-wise convolution operation. Indicates the center coordinates and width and height of the anchor point. represents the coordinates of the key points, is the regression loss, is the classification loss, is the total loss, is the weight coefficient used to balance the regression loss and classification loss.
[0087] Exemplarily, the specific process of the BlazeFace algorithm includes:
[0088] Input image preprocessing: The input image is scaled to a fixed size (e.g., 128x128) and normalized.
[0089] Feature extraction: Use lightweight CNN to extract image features and generate feature maps.
[0090] Anchor point generation: Generate a predefined set of anchor points on the feature map.
[0091] Regression prediction: Use the network to predict bounding box offsets and keypoint locations for each anchor.
[0092] Post-processing: Use non-maximum suppression (NMS) to filter overlapping bounding boxes and finally output detected faces and key points.
[0093] The image upload and format verification includes: after uploading the headshot photo, the system detects the format (such as JPEG, PNG, etc.) and size of the photo; if the photo format or size does not meet the requirements, the system prompts to make corresponding adjustments;
[0094] The image cropping and resizing includes:
[0095] (1) Automatic cropping: The system uses a facial detection algorithm (BlazeFace algorithm) to automatically identify the face area in the photo and crop it to ensure that the face is in the center of the image;
[0096] (2) Manual adjustment: Manually adjust the cropping frame to ensure the integrity and boundaries of the face area;
[0097] (3) Resizing: Resize the cropped image to a standard size (256x256 pixels) to ensure consistency in subsequent processing.
[0098] The image rotation and alignment includes:
[0099] (i) Face alignment: Use the facial landmark detection algorithm (dlib's 68-point facial landmark algorithm) to identify the key feature points of the face (such as eyes, nose, mouth, facial features, and contours);
[0100] For example, dlib's 68-point facial landmark algorithm is an algorithm for facial key point detection, which can detect and mark 68 key feature points on a person's face, including the location of the facial features and the facial contour. The following is the specific expression of the algorithm and the meaning of its symbols.
[0101] dlib's 68-point facial landmark algorithm consists of the following steps:
[0102] (i-1) Perform face detection and use a pre-trained face detector (e.g., HOG+SVM or CNN) to detect the face area in the image.
[0103] (i-2) Key point detection: A facial key point detector is used to predict the locations of 68 feature points within the detected face area.
[0104] (i-3) 68 facial landmarks. The 68 facial landmarks of dlib are arranged in the following order:
[0105] Contour line: 1-17; left eyebrow: 18-22; right eyebrow: 23-27; nose bridge: 28-31; nose wing: 32-36; left eye: 37-42; right eye: 43-48; outer lip: 49-60; inner lip: 61-68;
[0106] Among them, the face detection in step (i-1) includes:
[0107] Assuming the input image is III, the face detector outputs one or more bounding boxes, each bounding box is denoted by B=(x,y,w,h)B = (x, y, w, h)B=(x,y,w,h), where x,yx, yx,y are the coordinates of the upper left corner of the bounding box, and w,hw, hw,h are the width and height respectively.
[0108] The key point detection in step (i-2) includes: for each face region BiB_iBi, the key point detector outputs the positions of 68 feature points, which are expressed as:
[0109]
[0110] Among them, (xk,yk)(x_k, y_k)(xk,yk) represents the coordinates of the kkkth key point.
[0111] In the above formula, the contour line is P1,P2,…,P17P_{1}, P_{2}, \ldots, P_{17}P1,P2,…,P17; the left eyebrow is P18,P19,…,P22P_{18}, P_{19}, \ldots, P_{22}P18,P19,…,P22; the right eyebrow is P23,P24,…,P27P_{23}, P_{24}, \ldots, P_{27}P23,P24,…,P27;
[0112] Nose Bridge: P28, P29, P30, P31P_{28}, P_{29}, P_{30}, P_{31}P28, P29, P30, P31;
[0113] Nose Wing is P32, P33, …, P36P_{32}, P_{33}, \ldots, P_{36}P32, P33, …, P36;
[0114] Left Eye: P37, P38, …, P42P_{37}, P_{38}, \ldots, P_{42}P37, P38, …, P42;
[0115] Right Eye (Right Eye is P43, P44, …, P48P_{43}, P_{44}, \ldots, P_{48}P43, P44, …, P48;
[0116] Outer lips are P49, P50, …, P60P_{49}, P_{50}, \ldots, P_{60}P49, P50, …, P60;
[0117] Inner lips are P61, P62, …, P68P_{61}, P_{62}, \ldots, P_{68}P61, P62, …, P68;
[0118] Each key point PkP_kPk is represented by (xk,yk)(x_k, y_k)(xk,yk), where kkk is an integer between 1 and 68, indicating the position of the kkkth key point.
[0119] (ii) Automatic rotation: Based on the detected key points, the rotation angle of the face is calculated and the image is automatically rotated to a standard angle to ensure horizontal alignment of the face;
[0120] (iii) Manual rotation: The rotation angle can be manually fine-tuned to further optimize the alignment effect.
[0121] The image enhancement and denoising include:
[0122] (a) Brightness and contrast adjustment: The brightness and contrast of the image are adjusted through methods such as histogram equalization to improve the visual effect and clarity of the image.
[0123] (b) Denoising: Apply filtering algorithms (median filtering, Gaussian filtering) to remove noise in the image and improve image quality;
[0124] For example, median filtering is a nonlinear filtering method that is often used to remove salt and pepper noise. The core idea is to use a sliding window to traverse the image, and replace the central pixel value with the median value of each pixel in the window. The expression forms include,
[0125] Assume the input image is , the window size is :
[0126] For each pixel , take a Window .
[0127] Sort all pixel values in the window and take the middle value as the new pixel value.
[0128] Let the pixel value of the sorted window be ,in , then the new pixel value It is expressed as:
[0129] ;
[0130] The Gaussian filter is a linear filtering method that smoothes the image through the weights distributed by the Gaussian function and is often used to remove Gaussian noise. The expressions include:
[0131] Assume the input image is , the Gaussian kernel size is , the standard deviation is :
[0132] Gaussian Kernel The calculation formula is:
[0133]
[0134] in, and are the relative positions of pixels in the Gaussian kernel, respectively.
[0135] For each pixel , convolve it with a Gaussian kernel, the new pixel value It is expressed as:
[0136]
[0137] In the above formula, the input image Represents the original image matrix. Output image Represents the image matrix after filtering. Window size Indicates the size of the sliding window or Gaussian kernel, usually an odd number. The center pixel is of Window. Standard Deviation Represents the standard deviation of the Gaussian kernel, which determines the degree of smoothing. represents the Gaussian distribution matrix used for convolution operation. The pixel values of the sliding window are sorted as follows: It represents the result of sorting all pixel values in the window from small to large. Gaussian kernel formula Represents the Gaussian function used to calculate the weight of each position in the Gaussian kernel.
[0138] As you can understand, the Python sample code for implementing median filtering and Gaussian filtering using OpenCV includes:
[0139] import cv2
[0140] import numpy as np
[0141] Reading input image
[0142] image = cv2.imread("input.jpg", cv2.IMREAD_GRAYSCALE);
[0143] The median filter code is median_filtered = cv2.medianBlur(image, ksize=5).
[0144] The Gaussian filtering code is gaussian_filtered = cv2.GaussianBlur(image, ksize=(5, 5), sigmaX=1.5);
[0145] After the denoising process in step (b), the code to display the resulting image is:
[0146] cv2.imshow("Original", image)
[0147] cv2.imshow("Median Filtered", median_filtered)
[0148] cv2.imshow("Gaussian Filtered", gaussian_filtered)
[0149] cv2.waitKey(0)
[0150] cv2.destroyAllWindows();
[0151] (c) Color correction: adjust the white balance and color saturation of the image to make the image color more natural and realistic;
[0152] The image normalization includes:
[0153] (A) Pixel value normalization: Normalize the pixel values of the image to the range of 0-1 to standardize the image data for subsequent feature extraction and model processing;
[0154] (B) Data format conversion: convert image data into the data format required by the model (numpy array, tensor, etc.);
[0155] The facial feature point verification includes:
[0156] (I) Landmark Detection: The facial landmark detection algorithm is used again to verify whether the facial landmarks in the image are clearly visible and accurate.
[0157] (II) Quality assessment: If the feature point detection result is not ideal, you will be prompted to re-upload a clearer photo.
[0158] S103, digital human modeling: generating a digital human model that is highly similar to the photo based on the extracted facial feature points and the pre-trained facial model;
[0159] The face model specifically includes:
[0160] S1031, data preprocessing: use the preprocess_data function to load and preprocess the image and key point data and convert them into the format used by the model.
[0161] S1032, build model: use the build_face_model function to build a convolutional neural network (CNN) model to extract facial features from the image and predict key point coordinates.
[0162] S1033, model training: compile and train the model using the train_model function, use mean square error as the loss function, and optimize the model parameters.
[0163] S1034, main function: use the main function to integrate data preprocessing, model building and training steps, and save the trained model.
[0164] Exemplarily, in step S1031, the expression for data preprocessing is:
[0165] Loading image data and key point data .
[0166] Normalize image data to the interval [0, 1].
[0167] Normalized key point data to the interval [-1, 1].
[0168] The running code is:
[0169] import numpy as np
[0170] import cv2
[0171] def preprocess_data(image_paths, keypoints):
[0172] X = []
[0173] Y = []
[0174] for img_path, kp in zip(image_paths, keypoints):
[0175] # Load the image and convert it to grayscale
[0176] img = cv2.imread(img_path, cv2.IMREAD_GRAYSCALE)
[0177] img = cv2.resize(img, (96, 96)) # Assume the image size is 96x96
[0178] img = img / 255.0 # Normalized image data
[0179] # Load key points and normalize
[0180] kp = np.array(kp)
[0181] kp = (kp - 48) / 48.0 # Assume that the key point range is (48, 48) at the center of the image
[0182] X.append(img)
[0183] Y.append(kp)
[0184] X = np.array(X).reshape(-1, 96, 96, 1)
[0185] Y = np.array(Y)
[0186] return X, Y.
[0187] In step S1032, in constructing a model, a convolutional neural network model is constructed using the build_face_model function to extract facial features from an image and predict key point coordinates.
[0188] The expression for model construction is:
[0189] Convolutional layer (Conv2D): extracts image features.
[0190] Pooling layer (MaxPooling2D): Reduces the dimension of the feature map.
[0191] Fully connected layer (Dense): learns the relationship between features.
[0192] The running code is:
[0193] import tensorflow as tf
[0194] from tensorflow.keras.models import Sequential
[0195] from tensorflow.keras.layers import Conv2D, MaxPooling2D, Flatten,Dense, Dropout
[0196] def build_face_model():
[0197] model = Sequential([Conv2D(32, (3, 3), activation='relu'
[0198] input_shape=(96, 96, 1))
[0199] MaxPooling2D(pool_size=(2, 2)),Conv2D(64, (3, 3)
[0200] activation='relu'),MaxPooling2D(pool_size=(2, 2)),Conv2D(128, (3, 3)
[0201] activation='relu'),MaxPooling2D(pool_size=(2, 2))
[0202] Flatten(),Dense(500, activation='relu')
[0203] Dropout(0.5),Dense(136) # 68 key points, each with (x, y) coordinates])
[0204] return model.
[0205] In step S1033, in model training, the model is compiled and trained using the train_model function, and the mean square error (MSE) is used as the loss function to optimize the model parameters.
[0206] Expression for model training:
[0207] Compile the model, specifying the loss function and optimizer.
[0208] Train the model and iteratively optimize the parameters.
[0209] The running code is:
[0210] def train_model(model, X_train, Y_train, X_val, Y_val, epochs=50,batch_size=32):
[0211] model.compile(optimizer='adam', loss='mean_squared_error', metrics=['mae']) history = model.fit(X_train, Y_train,validation_data=(X_val, Y_val),
[0212] epochs=epochs,batch_size=batch_size,verbose=1 )
[0213] return history.
[0214] In step S1034, the main function is used to integrate data preprocessing, model building and training steps, and save the trained model.
[0215] The running code is:
[0216] def main(image_paths, keypoints, val_split=0.2):
[0217] # Data preprocessing
[0218] X, Y = preprocess_data(image_paths, keypoints)
[0219] # Divide into training set and validation set
[0220] split_idx = int(len(X) * (1 - val_split))
[0221] X_train, X_val = X[:split_idx], X[split_idx:]
[0222] Y_train, Y_val = Y[:split_idx], Y[split_idx:]
[0223] # Build the model
[0224] model = build_face_model()
[0225] # Model training
[0226] train_model(model, X_train, Y_train, X_val, Y_val)
[0227] # Save the model
[0228] model.save("face_landmark_model.h5")
[0229] # Example call
[0230] image_paths = ["path / to / image1.jpg", "path / to / image2.jpg"]
[0231] # Image path list keypoints = [[x1, y1, x2, y2, ..., x68, y68], [x1, y1,x2, y2, ..., x68, y68]]
[0232] # Keypoint list
[0233] main(image_paths, keypoints).
[0234] Exemplarily, the models and symbols involved in the digital human modeling in step S103 include:
[0235] is the preprocessed image data, the shape is ,in is the sample size.
[0236] is the preprocessed key point data, the shape is .
[0237] It is a convolutional layer to extract features.
[0238] It is a pooling layer to reduce the dimension.
[0239] For the flatten layer, the two-dimensional feature map is flattened into one dimension.
[0240] It is a fully connected layer that learns feature relationships.
[0241] It is the Dropout layer to prevent overfitting.
[0242] To compile the model, specify the optimizer, loss function, and evaluation metric.
[0243] To train the model.
[0244] In another exemplary embodiment, in step S103, the digital human modeling process is:
[0245] 1) Image preprocessing and feature extraction: Use the preprocess_image function to read and preprocess the uploaded headshot photo, and use the extract_features function to detect the face using the Dlib library and extract the coordinates of 68 key points.
[0246] 2) Initial 3D model generation: Use the generate_initial_model function to load the pre-trained benchmark model and adjust the model vertex positions according to the extracted key points.
[0247] 3) Detail adjustment and optimization: Use the sculpt_and_optimize_model function to manually or automatically adjust the model details using Blender's sculpting tools, and optimize the model by reducing the number of polygons.
[0248] 4) Expression and animation generation: Use the generate_animations function to bind the model to the skeleton system and create a shape base for generating various expressions and animations.
[0249] 5) Texture generation and mapping: Use the generate_textures function to map the texture information in the 2D image to the 3D model surface through UV mapping and texture mapping.
[0250] 6) Lighting and rendering: Use the render_model function to configure lighting and rendering parameters to generate the final 3D rendering effect.
[0251] Exemplarily, the animation generation in step 4) is as follows: by capturing the facial expressions, eye contact and other subtle movements of the person in the photo, a corresponding animation is created for the digital human model to make it more realistic;
[0252] Specifically, capturing facial movements and generating animations include:
[0253] 4-1) Capturing facial movements:
[0254] Use deep learning models (such as OpenFace, DeepFace, etc.) to capture facial movements from photos and extract key points and movement parameters.
[0255] Facial animation data is generated according to the extracted facial action parameters.
[0256] 4-2) Generate animation sequence:
[0257] The facial action parameters are used to drive the skeleton system of the digital human model to generate continuous animation frames.
[0258] Make sure the transitions between animation frames are smooth so that the animation looks natural and realistic.
[0259] As another example, in step 1), image preprocessing and feature extraction, the preprocess_image function is used to read and preprocess the uploaded head portrait photo, and the extract_features function uses the Dlib library to detect the face and extract the coordinates of 68 key points.
[0260] The running code is:
[0261] import cv2
[0262] import dlib
[0263] import numpy as np
[0264] def preprocess_image(image_path):
[0265] img = cv2.imread(image_path)
[0266] gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
[0267] return img, gray
[0268] def extract_features(gray):
[0269] detector = dlib.get_frontal_face_detector()
[0270] predictor = dlib.shape_predictor("shape_predictor_68_face_landmarks.dat")
[0271] faces = detector(gray)
[0272] for face in faces:
[0273] landmarks = predictor(gray, face)
[0274] keypoints = np.array([(px, py) for p in landmarks.parts()])
[0275] return keypoints
[0276] return None;
[0277] In step 2), the initial 3D model is generated by using the generate_initial_model function to load the pre-trained benchmark model and adjust the model vertex positions according to the extracted key points.
[0278] The running code is:
[0279] import bpy
[0280] def generate_initial_model(keypoints):
[0281] # Load the pre-trained baseline model
[0282] bpy.ops.import_scene.obj(filepath="base_model.obj")
[0283] obj = bpy.context.selected_objects[0]
[0284] # Adjust the model vertex position according to the key points
[0285] for i, (x, y) in enumerate(keypoints):
[0286] obj.data.vertices[i].co.x = x
[0287] obj.data.vertices[i].co.y = y
[0288] return obj;
[0289] In step 3), detail adjustment and optimization, use the sculpt_and_optimize_model function to manually or automatically adjust the model details using Blender's sculpting tools, and optimize the model by reducing the number of polygons.
[0290] The running code is:
[0291] def sculpt_and_optimize_model(obj):
[0292] bpy.ops.object.mode_set(mode='SCULPT')
[0293] # Use Blender's sculpting tools to manually or automatically adjust model details
[0294] # Here you can call Blender's specific sculpting tools and operations
[0295] bpy.ops.object.mode_set(mode='OBJECT')
[0296] # Optimize the model by reducing the number of polygons
[0297] bpy.ops.object.modifier_add(type='DECIMATE')
[0298] obj.modifiers["Decimate"].ratio = 0.5
[0299] bpy.ops.object.modifier_apply(modifier="Decimate")
[0300] return obj.
[0301] In step 4), expressions and animations are generated. The generate_animations function is used to bind the model to the skeleton system and create a shape base for generating various expressions and animations.
[0302] def generate_animations(obj):
[0303] # Create a skeleton system and bind it to the model
[0304] bpy.ops.object.armature_add()
[0305] armature = bpy.context.object
[0306] bpy.ops.object.parent_set(type='ARMATURE_NAME')
[0307] # Create a shape base for generating multiple expressions
[0308] # Here you can call Blender's specific operations to create and adjust the shape base
[0309] return obj, armature.
[0310] In step 5), texture generation and mapping use the generate_textures function to map the texture information in the 2D image to the 3D model surface through UV mapping and texture mapping.
[0311] def generate_textures(obj, image_path):
[0312] UV Mapping
[0313] bpy.ops.object.mode_set(mode='EDIT')
[0314] bpy.ops.uv.unwrap()
[0315] bpy.ops.object.mode_set(mode='OBJECT')
[0316] # Texture Map
[0317] mat = bpy.data.materials.new(name="Material")
[0318] mat.use_nodes = 1
[0319] bsdf = mat.node_tree.nodes["Principled BSDF"]
[0320] tex_image = mat.node_tree.nodes.new('ShaderNodeTexImage')
[0321] tex_image.image = bpy.data.images.load(image_path)
[0322] mat.node_tree.links.new(bsdf.inputs['Base Color'], tex_image.outputs['Color'])
[0323] obj.data.materials.append(mat)
[0324] return obj.
[0325] In step 6), lighting and rendering, use the render_model function to configure lighting and rendering parameters to generate the final 3D rendering effect.
[0326] def render_model(obj, output_path):
[0327] # Configure lighting
[0328] bpy.ops.object.light_add(type='SUN')
[0329] light = bpy.context.object
[0330] light.location = (10, 10, 10)
[0331] # Configure rendering parameters
[0332] bpy.context.scene.camera = bpy.data.objects['Camera']
[0333] bpy.context.scene.render.image_settings.file_format = 'PNG'
[0334] bpy.context.scene.render.filepath = output_path
[0335] # Render the image
[0336] bpy.ops.render.render(write_still=1)
[0337] return output_path.
[0338] In another exemplary embodiment, in step S103, the above steps are integrated, and the overall code flow of the digital human modeling process includes:
[0339] def main(image_path, output_path):
[0340] # Image preprocessing and feature extraction
[0341] img, gray = preprocess_image(image_path)
[0342] keypoints = extract_features(gray)
[0343] if keypoints is None:
[0344] raise ValueError("No face or key points detected")
[0345] # Initial 3D model generation
[0346] obj = generate_initial_model(keypoints)
[0347] #Detail adjustment and optimization
[0348] obj = sculpt_and_optimize_model(obj)
[0349] # Expression and animation generation
[0350] obj, armature = generate_animations(obj)
[0351] # Texture generation and mapping
[0352] obj = generate_textures(obj, image_path)
[0353] # Lighting and Rendering
[0354] render_model(obj, output_path)
[0355] # Example call
[0356] image_path = "path / to / user_image.jpg"
[0357] output_path = "path / to / rendered_output.png"
[0358] main(image_path, output_path).
[0359] The symbols involved include:
[0360] : Uploaded avatar photo path.
[0361] : The save path of the final rendering effect.
[0362] : The color image read.
[0363] : The converted grayscale image.
[0364] : The extracted coordinates of 68 key points.
[0365] : Three-dimensional model object.
[0366] : Skeletal system object.
[0367] : Material object, used for texture mapping.
[0368] : Light source object, used to configure lighting.
[0369] S104, video synthesis: synthesizing the generated digital human animation with the preset business card template, adding corresponding text information, background music, etc., to generate a digital human business card video with personalized characteristics;
[0370] The video synthesis and export process specifically includes: S1041, video synthesis:
[0371] Use the video processing library (FFmpeg) to synthesize the digital human animation with the business card template to generate a complete video.
[0372] Make sure the digital human animation is aligned with the character area in the template and handle background transparency issues.
[0373] S1042, add text information and background music:
[0374] Add corresponding text information and background music to the synthesized video.
[0375] S1043, Export video:
[0376] Export the final composited video to a common video format (MP4).
[0377] Output and share: The generated digital business card video is output as a file and integrated into the personal business card for top display.
[0378] S2, the social business card contains the personal profile played by the digital human technology and the company's strength displayed by the digital exhibition hall technology.
[0379] S3, you can choose to add the business card to your personal business card folder or save it to your phone's address book for easy management and use.
[0380] S4. If you choose to make your business card public, you can search and exchange business card information from all walks of life in the Network Planet module to expand your social network.
[0381] The specific process is:
[0382] S41, set the personal business card privacy option to be public in the network planet;
[0383] S42, the system recognizes that the privacy option is public, and then makes the data viewing permission of the network planet module public to the user;
[0384] To identify the privacy options and adjust the data viewing permissions of the People Planet module according to their settings, the following steps and algorithms can be used. This process involves reading the privacy settings from the configuration file and adjusting the data access permissions according to these settings. The specific steps are as follows:
[0385] S421, Privacy Options reads:
[0386] Privacy options are read from a configuration file or database.
[0387] Algorithms or rules are used to parse these privacy options and determine whether to make the business card information public.
[0388] S422, Privacy Option Identification Algorithm:
[0389] Privacy settings can be parsed using simple conditionals or more complex rule engines.
[0390] If the privacy option is public, the data viewing permission of the Network Planet module will be made public.
[0391] S423, adjust data viewing permissions:
[0392] Adjust the data viewing permissions of the Network Planet module based on the analysis results.
[0393] This can be accomplished using access control lists (ACLs) or a role-based permissions model.
[0394] The specific implementation process is:
[0395] S4231, Privacy options read; First, the privacy options are read from the configuration file or database. Assume that the configuration files are stored in the database and each has a `privacy_settings` field.
[0396] S4232, privacy option identification algorithm, uses a simple conditional judgment to parse the privacy option. If the privacy option is "public", it returns 1; otherwise, it returns 0.
[0397] S4233, adjust data viewing permissions, according to the analysis results of privacy options, adjust the data viewing permissions of the network planet module. This can be achieved by updating the access control list (ACL).
[0398] In another exemplary embodiment, the above steps are combined to form a complete identification and permission adjustment process. The specific steps include:
[0399] S401, privacy option reading: connect to the database and query the privacy settings.
[0400] S402, privacy option identification algorithm: the parsed privacy setting is marked as 1 if it is set to "public".
[0401] S403, adjusting data viewing permissions: updating the access control list according to the analysis result, and setting the data viewing permissions to public or private.
[0402] S404, expansion and optimization, including:
[0403] Complex rules engine: To make privacy settings more complex, a rules engine (Drools) is used to parse the privacy options.
[0404] Real-time updates: To ensure real-time updates of privacy settings, the permission update process is triggered when the privacy options are changed.
[0405] Security: Ensure security during data access and update to prevent unauthorized access and modification.
[0406] Through the above detailed steps and implementation methods, you can identify your privacy options and adjust the data viewing permissions of the Renma Planet module according to their settings to ensure that your privacy is effectively managed.
[0407] Click the People Planet module to view the publicly available data permissions under the labels of various industries. Click a business card to view the information of the business card, including the digital human broadcast video, name, mobile phone number, email address, company information, etc.
[0408] Click Add to Business Card Folder to add the business card to your personal business card folder for easy access at any time.
[0409] As another example, in step S401, when reading the privacy options, the privacy settings are analyzed by conditional judgment or rule engine, and the data viewing permissions are determined based on these settings.
[0410] In step S402, the privacy option identification algorithm includes: assuming that the privacy settings are stored in a dictionary named user_privacy_settings, which contains the privacy options.
[0411] The running code is:
[0412] Python
[0413] def privacy_option_recognition(user_privacy_settings):
[0414] """
[0415] Parse the privacy settings and return the corresponding data viewing permissions.
[0416] :param user_privacy_settings: dict, privacy settings
[0417] :return: dict, data viewing permissions
[0418] """
[0419] # Initialize the data viewing permission dictionary
[0420] data_access_permissions = {}
[0421] # Traverse privacy settings
[0422] for module, setting in user_privacy_settings.items():
[0423] if setting == "public":
[0424] data_access_permissions[module] = "public"
[0425] else:
[0426] data_access_permissions[module] = "private"
[0427] return data_access_permissions
[0428] # Call
[0429] user_privacy_settings = {
[0430] "contacts": "public",
[0431] "location": "private",
[0432] "profile": "public",
[0433] "posts": "friends_only"
[0434] }
[0435] data_access_permissions = privacy_option_recognition(user_privacy_settings)
[0436] print(data_access_permissions);
[0437] In step S403, when adjusting the data viewing permission, a simple conditional judgment statement is used to parse the privacy setting. If the privacy option of a module is public, the data viewing permission of the module is set to public, otherwise it is set to private.
[0438] The running code is:
[0439] Python
[0440] Copy code
[0441] for module, setting in user_privacy_settings.items():
[0442] if setting == "public":
[0443] data_access_permissions[module] = "public"
[0444] else:
[0445] data_access_permissions[module] = "private".
[0446] The meanings of the symbols involved above include: user_privacy_settings: a privacy settings dictionary, where the key is the module name and the value is the privacy option (such as "public", "private", "friends_only").
[0447] data_access_permissions: A dictionary of data access permissions, where the key is the module name and the value is the permission setting (e.g. "public", "private").
[0448] module: The name of the module, e.g. "contacts", "location", "profile", "posts".
[0449] setting: Privacy options set for a specific module.
[0450] In another exemplary embodiment, in step S42, if the system recognizes that the privacy option is public, the data viewing permission of the network planet module is made public to the user, including:
[0451] An example main function that integrates a privacy option identification algorithm is used to determine whether to make the data viewing permissions of the People Planet module public.
[0452] The running code is:
[0453] Python
[0454] Copy code
[0455] def main(user_privacy_settings):
[0456] # Parse privacy settings and obtain data viewing permissions
[0457] data_access_permissions = privacy_option_recognition(user_privacy_settings)
[0458] # Determine the viewing permission of the network planet module
[0459] if data_access_permissions.get("contacts") == "public":
[0460] print("The data of the network planet module is open to the public.")
[0461] else:
[0462] print("The data of the network planet module is not open to the public.")
[0463] # Example call
[0464] user_privacy_settings = {
[0465] "contacts": "public",
[0466] "location": "private",
[0467] "profile": "public",
[0468] "posts": "friends_only"
[0469] }
[0470] main(user_privacy_settings).
[0471] The present invention can effectively enhance the interactivity and immersion of social interaction, improve social efficiency, and trigger network effects through the above technical solutions. At the same time, the present invention enhances the sense of security and trust by introducing stricter privacy protection measures. In addition, the present invention also reduces the cost of use and promotes the popularization of social interaction through technical integration. The present invention solves many problems and shortcomings in the prior art, provides a novel method for realizing social network circles, and has important practical value.
[0472] It can be seen from the above embodiments that the present invention provides a new metaverse social business card, which improves social efficiency by optimizing the interface and interactive design, and enhances trust by providing better privacy protection measures through personal settings. In addition, the present invention can also attract by providing richer social scenes and more realistic VR immersion, thereby helping to trigger network effects and promote platform growth. The present invention relates to a method for realizing a metaverse social network circle, which aims to generate a metaverse social business card through a personal exclusive digital person, solving many problems and shortcomings of existing metaverse social platforms in terms of interactivity, immersion, social efficiency, privacy protection, etc.
[0473] Example 2, as another implementation of the present invention, the implementation system of the social network circle provided by the embodiment of the present invention includes:
[0474] The registration and login module is used to provide registration and login interfaces, and supports multiple authentication methods (such as email, mobile phone number, third-party account, etc.). You can set personal basic information and privacy preferences.
[0475] The digital human image creation module is used for uploading and processing avatars. After uploading the avatar photo, the system guides the user to select the style and personalized elements.
[0476] It is also used for facial feature extraction, using the BlazeFace algorithm to extract facial feature points.
[0477] It is also used for digital human modeling to generate three-dimensional digital human models that are highly similar to photos.
[0478] Exemplarily, in digital human modeling, the following technical features are included;
[0479] (1) Geometric expression: Geometric expression defines the shape and structure of a 3D model, usually including vertices, edges, and faces; Polygonal mesh: Use vertices, edges, and faces to build a model. Each vertex has a 3D coordinate (x, y, z).
[0480] (2) Material and texture expressions: Materials and textures define the appearance of the model, including properties such as color, reflectivity, and transparency.
[0481] Among them, material: use material properties (diffuse reflection, specular reflection, ambient light, etc.) to define the lighting response of the model surface.
[0482] Textures: Mapping is the process of applying a two-dimensional image (texture map, normal map, reflection map, etc.) to the surface of a model to add detail and realism.
[0483] (3) Skeleton and binding expressions: Skeleton and binding are used to define the movement and deformation of three-dimensional models.
[0484] Among them, bones: a series of bones are used to build the character's skeleton. Each bone node can have its own position, rotation and scaling properties.
[0485] Binding: By binding the vertices of the model to the bones, the model can be driven to deform when the bones move.
[0486] (4) Animation expression: Animation expression defines the movement of the model, including changes in position, rotation, and scale.
[0487] Among them, keyframe animation: by setting keyframes on the timeline, define the position, rotation and scale of the model at different time points.
[0488] Skeletal animation: Drive the bound model to move by adjusting the keyframes of the bones.
[0489] Blend Shapes (Morph Targets): Achieve facial expressions or other subtle deformations by interpolating multiple predefined shapes.
[0490] (5) Physical property expression: Physical properties define the interaction behavior between the model and the environment, such as collision, gravity, and physical simulation.
[0491] Among them, collision body: defines the collision boundary of the model and is used for collision detection in the physics engine.
[0492] Rigid body / soft body: defines the physical properties of the model (mass, friction, elasticity) for physical simulation.
[0493] It is also used for animation generation to create animation effects for digital human models and simulate subtle movements in photos.
[0494] It is also used for video synthesis, combining the animated digital human model with the preset business card template to generate a digital human business card video.
[0495] Exemplarily, the digital human image creation module is used for digital human modeling to generate a three-dimensional digital human model that is highly similar to a photo. The three-dimensional digital human model generation process includes:
[0496] Step 1: Vertices. A 3D model is composed of multiple vertices (points). The position of each vertex is represented by a 3D coordinate:
[0497]
[0498] in, Indicates The coordinates of the vertices, , , They are the coordinates of the vertex on the X, Y, and Z axes respectively.
[0499] Step 2, Edges and Faces
[0500] Vertices are connected by edges to form polygons, usually triangles or quadrilaterals. A face can be represented by the index of the vertex. For example, a triangular face can be represented as:
[0501]
[0502] in, Indicates A face, consisting of three vertices , and constitute.
[0503] Step 3, Normal Vectors;
[0504] The normal vector for each face can be calculated by cross product, indicating the direction the face is facing:
[0505]
[0506] in, It is The normal vector of the face.
[0507] Step 4, Transformation Matrices;
[0508] The position, size, and orientation of a model in three-dimensional space can be manipulated using transformation matrices. Common transformations include translation, rotation, and scaling:
[0509] Translation matrix: ;
[0510] Rotation matrix (around the X, Y, and Z axes):
[0511]
[0512] Scaling matrix:
[0513] Step 5: Surface Representation
[0514] The complex human body model surface can be represented by parametric surfaces (such as Bézier surfaces and NURBS). The mathematical expression of Bézier surfaces is:
[0515]
[0516] in, is a point on the surface, is the control point, and are the Bézier basis functions.
[0517] Step 6: Texture Mapping;
[0518] The surface color or texture of a digital human model is represented by texture mapping. Texture coordinates are usually two-dimensional coordinates:
[0519]
[0520] in, Representation and Vertex The corresponding texture coordinates.
[0521] The business card management module is used for business card creation and editing. You can create and edit digital business cards, add personal information, contact information, professional information, etc. It is also used for business card preview and publishing. You can preview business card videos and choose whether to publish them publicly.
[0522] The "Planet of People" module is used for searching and browsing business cards. You can search and browse public business cards in the "Planet of People" module to find suitable connections based on your interests or needs.
[0523] It can also be used for business card exchange and collection. You can exchange business cards with others and collect the business cards you are interested in into your personal business card folder.
[0524] The social interaction and message notification module is used for instant messaging, supports instant messaging exchanges between users, and enhances interactivity. It is also used for message notifications, such as business card exchange requests, collection notifications, system updates, etc.
[0525] The privacy and security module is used for privacy settings, which can set the public scope and privacy level of the business card. It is also used for data encryption, which can encrypt data to ensure information security.
[0526] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principles of the present invention should be covered within the protection scope of the present invention.
Claims
1. A method for implementing a social network circle, characterized in that: This method uses digital human technology to create a personal digital human image and generate a social business card; If the business card is made public, the business card information of various industries can be found and exchanged in the Renchuang Planet module to expand the social network, including: S1, Registration and Login: Provides registration and login interfaces, supports identity authentication methods including email, mobile phone number and third-party account, and sets personal basic information and privacy preferences; S2, digital human image creation: upload the head portrait photo, the system pre-processes the photo; extracts facial features, generates a 3D digital human model, generates animation and performs video synthesis; S3, Business Card Management: Create and edit digital business cards, add personal information, contact information, and professional information; preview business card videos, and choose whether to publish them publicly; S4, Network Planet Module: Search and browse public business cards, find network information based on interests or needs; exchange business cards, and save the business cards of interest to personal business card folders; S5, social interaction and message notification: conduct instant messaging exchanges and receive business card exchange requests, favorite notifications, and system update messages; S6, Privacy and Security: Set the public scope and privacy level of the business card and encrypt the data; In step S2, a digital human image is created, including: Avatar upload and processing: upload the avatar photo, and the system will guide you to select the style and personalized elements; Face feature extraction: Use the face detector BlazeFace algorithm to extract facial feature points; Digital human modeling: Based on the extracted key facial feature points and combined with the pre-trained facial model, a 3D digital human model that is highly similar to the photo is generated; Animation generation: Create animation effects for the 3D digital human model, simulating subtle movements of the face in the photo, including facial expressions and eye contact; Video synthesis: synthesize the 3D digital human model with the preset business card template to generate a digital human business card video; Output and share: Output the generated digital business card video in the form of a file and integrate it into the personal business card for top display; Generate a 3D digital human model, including: Step 1: Vertex representation. A 3D model is composed of multiple vertices, and the position of each vertex is represented by a 3D coordinate: v i =(x i ,y i ,z i ) In the formula, v i is the coordinate of the i-th vertex, x i ,y i ,z i are the coordinates of the vertex on the X, Y, and Z axes respectively; Step 2, edges and faces, vertices are connected by edges to form polygons, a face is represented by the index of the vertex, where a triangular face is represented as: f j =(v a ,v b ,v c ) In the formula, f j is the jth face, v a ,v b ,v c are three vertices; Step 3, normal vector; the normal vector of each face is calculated by cross product to indicate the direction the face is facing: n j =(v b -v a )×(v c -v a ) Among them, n j is the normal vector of the jth face; Step 4, transformation matrix: The position, size and orientation of the model in three-dimensional space are manipulated through the transformation matrix, which includes translation, rotation and scaling. Step 5: Surface representation: The surface of the human body model is represented by a parametric surface. The mathematical expression of the Bézier surface is: Among them, P(u,v) is a point on the surface, P ij is the control point, and is the Bézier basis function; Step 6: Texture mapping: The surface color or texture of the digital human model is represented by texture mapping, and the texture coordinates are two-dimensional coordinates: t i =(u i ,v i ) Among them, t i Represents the vertex (u i ,v i ) corresponding to the texture coordinates.
2. The method for implementing a social network circle according to claim 1, characterized in that: The head portrait upload and processing includes: the pre-processing process of personal head portrait photos, image upload and format verification, image cropping and size adjustment, image rotation and alignment, image enhancement and denoising, image normalization and facial feature point verification; Among them, image upload and format verification include: after uploading the headshot photo, the system detects the format and size of the photo; if the photo format or size does not meet the requirements, the system prompts to make corresponding adjustments; Image cropping and resizing, including: (1) Automatic cropping: The system uses the facial detection algorithm BlazeFace to automatically identify the face area in the photo and crop it to ensure that the face is in the center of the image; (2) Manual adjustment: Manually adjust the cropping frame to ensure the integrity and boundaries of the face area; (3) Resizing: resizing the cropped image to a standard size; Image rotation and alignment, including: (i) Face alignment: Use the facial key point detection algorithm to identify the key feature points of the face. The facial key point detection algorithm is dlib's 68-point facial landmarks. The key feature points of the face include the position of the facial features and the contour lines. (ii) Automatic rotation: Based on the detected key points, the rotation angle of the face is calculated and the image is automatically rotated to a standard angle to ensure horizontal alignment of the face; (iii) Manual rotation: Manually fine-tune the rotation angle to optimize the alignment effect; The dlib's 68-point facial landmark algorithm consists of the following steps: (i-1) Perform face detection and use a pre-trained face detector to detect the face area in the image; (i-2) Key point detection: use the facial key point detector to predict the positions of 68 feature points in the detected face area; (i-3) 68 facial landmarks. The 68 facial landmarks of dlib are arranged in the following order: Contour line: 1-17; left eyebrow: 18-22; right eyebrow: 23-27; nose bridge: 28-31; nose wing: 32-36; left eye: 37-42; right eye: 43-48; outer lip: 49-60; inner lip: 61-68; Image enhancement and denoising, including: (a) Brightness and contrast adjustment: The brightness and contrast of the image are adjusted by histogram equalization method; (b) Denoising: Use median filtering and Gaussian filtering algorithms to remove noise from the image; (c) Color correction: adjust the white balance and color saturation of the image; Image normalization, including: (A) Pixel value normalization: normalize the pixel value of the image to the range of 0-1 to standardize the image data; (B) Data format conversion: converting image data into the data format required by the model. The data formats required by the model include numpy arrays and tensors. Facial landmark verification, including: (I) Feature point detection: The facial key point detection algorithm is used again to verify whether the facial feature points in the image are clear, visible and accurate; (II) Quality assessment: If the feature point detection result is not ideal, you will be prompted to re-upload a clearer photo.
3. The method for implementing a social network circle according to claim 2, characterized in that: In step (i-1), face detection is performed, including: Let the input image be III, and the face detector outputs one or more bounding boxes, each of which is represented by B = (x, y, w, h), where x, y are the coordinates of the upper left corner of the bounding box, and w, h are the width and height respectively; In step (i-2), key point detection includes: for each face region, the key point detector outputs the positions of 68 feature points, which are represented as: P i ={(x1,y1),(x2,y2),…,(x 68 ,y 68 )} Where P i is a set of feature points, (x1, y1) is the first feature point, (x2, v2) is the second feature point, (x 68 ,y 68 ) is the 68th feature point.
4. The method for implementing a social network circle according to claim 1, characterized in that: Pre-trained face models, including: Data preprocessing: Use the preprocess_data function to load and preprocess image and key point data and convert them into the format used by the model; Build model: Use the build_face_model function to build a convolutional neural network model to extract facial features from images and predict key point coordinates; Model training: Use the train_model function to compile and train the model, use the mean square error as the loss function, and optimize the model parameters; Main function: Use the main function to integrate data preprocessing, model building and training steps, and save the trained model.
5. The method for implementing a social network circle according to claim 1, characterized in that: Digital human modeling, including: Image preprocessing and feature extraction: The preprocess_image function reads and preprocesses the uploaded headshot photo, and the extract_features function uses the Dlib library to detect the face and extract the coordinates of 68 key points; Initial 3D model generation: The generate_initial_model function loads the pre-trained benchmark model and adjusts the model vertex positions according to the extracted key points; Detail adjustment and optimization: The sculpt_and_optimize_model function uses Blender's sculpting tools to manually or automatically adjust model details and optimize the model by reducing the number of polygons; Expression and animation generation: The generate_animations function binds the model to the skeleton system and creates a shape base for generating various expressions and animations; Texture generation and mapping: The generate_textures function maps the texture information in the 2D image to the 3D model surface through UV mapping and texture mapping; Lighting and rendering: The render_model function configures lighting and rendering parameters to generate the final 3D rendering effect.
6. The method for implementing a social network circle according to claim 1, characterized in that: Extract facial feature points, including: Capturing facial movements: Using deep learning models to capture facial movements from photos, extract key points and movement parameters, and generate facial animation data based on the extracted facial movement parameters; Generate animation sequence: Use facial action parameters to drive the skeleton system of the digital human model to generate continuous animation frames and ensure smooth transition between animation frames; Video synthesis and export include: Video synthesis: Use the video processing library FFmpeg to synthesize the digital human animation with the business card template to generate a complete video; align the digital human animation with the character area in the template and handle the background transparency issue; add corresponding text information and background music to the synthesized video; Export video: Export the final synthesized video to MP4 video format; In the People Planet module, you can find and exchange business card information from all walks of life to expand your social network, including: Set the privacy option of your personal business card to be public in the People Planet; If the system recognizes that the privacy option is public, the data viewing permission of the People Planet module will be made public; Click the People Planet module to view the public data permissions under the labels of various industries, and click on a business card to view the information of the business card; Click Add to Business Cards to add the business card to your personal business card folder or save it to your phone's address book.
7. The method for implementing a social network circle according to claim 6, characterized in that: Business card information includes the digital person’s broadcast video, name, mobile phone number, email address, and company information; Identify privacy options and adjust data viewing permissions of the People Planet module according to the settings, including reading privacy settings from the configuration file and adjusting data access permissions according to these settings; Privacy option reading: the privacy option is read from the configuration file or database, and the privacy option is parsed using an algorithm or rule to determine whether the business card information should be made public; Privacy option identification algorithm: use conditional judgment or rule engine to analyze privacy settings; if the privacy option is public, the data viewing permission of the People Planet module will be made public; Adjust data viewing permissions: Adjust data viewing permissions of the Renmai Planet module based on the analysis results, using access control lists (ACLs) or role permission models, including: Privacy options read: privacy options read from configuration files or databases; Privacy option identification algorithm: parsed privacy settings; Adjust data viewing permissions: According to the analysis results of privacy options, adjust the data viewing permissions of the People Planet module by updating the access control list ACL; Use the rule engine Drools to parse privacy options; when privacy options are changed, the permission update process is triggered to ensure security during data access and update.
8. A system for implementing a social network circle, characterized in that: The system is implemented by the method for implementing a social network circle according to any one of claims 1 to 7, and the system comprises: The registration and login module is used to provide registration and login interfaces, support multiple authentication methods, and set personal basic information and privacy preferences; Digital human image creation module, used to realize head image uploading and processing, facial feature extraction, digital human modeling, animation generation and video synthesis functions; Business card management module, used to create and edit business cards, as well as preview and publish business cards; The network planet module is used to realize business card search and browsing, as well as business card exchange and collection functions; Social interaction and message notification module, used to realize instant messaging and message notification functions; Privacy and security module, used to implement privacy settings and data encryption functions.
Citation Information
Patent Citations
Business card making method and system based on virtual digital human technology, medium and equipment
CN117726729A