Comments (9)
@AlonZolfi The pseudo code is as follows
def get_mask_texture(src_image_path, seg_image_path):
seg_image = imread(seg_image_path)
src_image = imread(src_image_path)
# use src_image to get pos and vertices with the help of PRN model
lms_info = read_info.read_landmark_106_array(src_face_lms)
pos = prn_model.process(src_image, lms_info)
vertices = prn_model.get_vertices(pos)
# map mask texture to UV texture map
mask_image = mask_image/255.
mask_UV = cv2.remap(mask_image, pos[:, :, :2].astype(np.float32), None, interpolation=cv2.INTER_NEAREST, boarderMode=cv2.BORDER_CONSTANT, borderValue=(0))
mask_UV = mask_UV.astype(np.float32)
mask_UV = cv2.cvtColor(mask_UV, cv2.COLOR_RGB2RGBA)
mask_UV[background_pos, 3] = 0
return mask_UV
from facex-zoo.
Thanks for your interest in our project. Please refer to our tech-report, In short, given a masked face image R, we first compute the uv position map P by PRNet. Then we obtain the 'uv_mask.png' by map the segmentation map of R into uv space with the uv position map P.
from facex-zoo.
@wang21jun , thanks for your explanation, still i have some questions, i notice that the mask texture file under path Data/mask-data(called 0.png, 1.png...) is a 4-channel matrix.
1.Is that 0-3 channel of this matrix(ref_texture_src) is the uv_texture generated by PRNet by keeping the mask part of original image using the mask segmentation?
2.What' s the meaning of 4th channel of this 4-channel matrix(uv_mask_src), how to generate this channel?
from facex-zoo.
@wang21jun , thanks for your explanation, still i have some questions, i notice that the mask texture file under path Data/mask-data(called 0.png, 1.png...) is a 4-channel matrix.
1.Is that 0-3 channel of this matrix(ref_texture_src) is the uv_texture generated by PRNet by keeping the mask part of original image using the mask segmentation?
2.What' s the meaning of 4th channel of this 4-channel matrix(uv_mask_src), how to generate this channel?
The 4th channel is the alpha channel of RGBA image. It can be obtained by the segmentation model or Photoshop tool. The values in this channel mean the probability that pixels belong to mask region.
from facex-zoo.
Thanks for your interest in our project. Please refer to our tech-report, In short, given a masked face image R, we first compute the uv position map P by PRNet. Then we obtain the 'uv_mask.png' by map the segmentation map of R into uv space with the uv position map P.
Could you please elaborate more on how did you do the 3d reconstruction on the mask only (step (b) -> (c))?
from facex-zoo.
感谢您对我们项目的关注。请参考我们的技术报告,简而言之,给定一个蒙版面部图像R,我们首先通过PRNet计算UV位置图P。然后,我们将R的分割图映射到UV空间,并使用UV位置图P获得“uv_mask.png”。
好喽 您这个问题解决了吗,我在用这个的时候也遇到了这个问题
from facex-zoo.
@AlonZolfi伪代码如下
def get_mask_texture(src_image_path, seg_image_path): seg_image = imread(seg_image_path) src_image = imread(src_image_path) # use src_image to get pos and vertices with the help of PRN model lms_info = read_info.read_landmark_106_array(src_face_lms) pos = prn_model.process(src_image, lms_info) vertices = prn_model.get_vertices(pos) # map mask texture to UV texture map mask_image = mask_image/255. mask_UV = cv2.remap(mask_image, pos[:, :, :2].astype(np.float32), None, interpolation=cv2.INTER_NEAREST, boarderMode=cv2.BORDER_CONSTANT, borderValue=(0)) mask_UV = mask_UV.astype(np.float32) mask_UV = cv2.cvtColor(mask_UV, cv2.COLOR_RGB2RGBA) mask_UV[background_pos, 3] = 0 return mask_UV
您好,请问这个函数返回值是从(a)上取下口罩返回的(c)吗 另外这个函数的输入是什么呢
from facex-zoo.
感谢您的出色项目,3d 面罩非常坚固。 但是,我想为面罩生成添加更多种类的面罩纹理,但找不到有关如何执行此操作的任何文档。你能提供一些信息吗?
好喽,大佬请问您这个问题解决了吗,我也遇到了这个问题
from facex-zoo.
感谢您的出色项目,3d 面罩非常坚固。 但是,我想为面罩生成添加更多种类的面罩纹理,但找不到有关如何执行此操作的任何文档。你能提供一些信息吗?
您好。大佬您这个问题就解决了吗,我也遇到了这个问题
from facex-zoo.
Related Issues (20)
- 请问有没有pytorch安装接口?
- add a mask
- [face_sdk] Error when detect and align face-down
- render_cy error
- loading pretrained backbones
- model4 is missing on net disk
- semi-siamese traning error
- semi-siamese training error
- multi-processing
- Questions about DMUE training on different datasets HOT 3
- FileNotFoundError: [Errno 2] No such file or directory: './weights/AffectNet_res18_acc0.6285.pth'
- CASIA-MFSD Dataset
- swin transformer depoly HOT 1
- face_parsing first time inference waits too long
- Training and Testing Image Format - Was the training done on BGR images and testing on RGB?
- face_sdk的face_pipeline里,人脸检测模型已经输出了5个关键点,为什么还要用faceAlignModel再检测关键点?
- DMUE pre-trained models
- 请问,我在lfw测试上效果不好?
- File "logging.conf" has a redundant ']' in line 32
- Model weights are trash
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from facex-zoo.