Simon Shi的小站

人工智能,机器学习, 强化学习,大模型,自动驾驶

0%

[TOC]

3D Body Model reStructure

SMPLify

SMPLR

SMPL-X

1579242997000

1579243000955

MIP-virtualhumans

http://virtualhumans.mpi-inf.mpg.de/publications.html

[CVPR, 2020] 3D Shape Restruction:

Julian Chibane, Thiemo Alldieck, Gerard Pons-Moll
Implicit Functions in Feature Space for 3D Shape Reconstruction and Completion
in IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2020.

BibTeX PDF

[CVPR,2020] 3D Human Texture (mir-pix-suf)

Aymen Mir, Thiemo Alldieck, Gerard Pons-Moll
Learning to Transfer Texture from Clothing Images to 3D Humans
in IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2020.

BibTeX PDF

[CVPR,2020] VTailor

Chaitanya Patel, Zhouyingcheng Liao, Gerard Pons-Moll
The Virtual Tailor: Predicting Clothing in 3D as a Function of Human Pose, Shape and Garment Style
in IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2020.

BibTeX PDF

[CVPR,2020] Drees3DPeople

  • CAPE model

Qianli Ma, Jinlong Yang, Anurag Ranjan, Sergi Pujades, Gerard Pons-Moll, Siyu Tang, Michael Black
Learning to Dress 3D People in Generative Clothing

学习给3D人物穿上生成性服装

in IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2020.

BibTeX arXiv

  • 模型穿衣(无纹理效果)

[CVPR,2020] DeepCap

Marc Habermann, Weipeng Xu, Michael and Zollhoefer, Gerard Pons-Moll, Christian Theobalt
DeepCap: Monocular Human Performance Capture Using Weak Supervision
in IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2020.

BibTeX

[ICCV,2019] MGN

  • 1-8 Image

标题:Multi-Garment Net: Learning to Dress 3D People from Images

论文:https://arxiv.org/abs/1908.06903

代码:https://github.com/bharat-b7/MultiGarmentNetwork

  • ⭐⭐⭐⭐

作者:B. L. Bhatnagar

马克斯普朗克信息学院,萨尔兰信息学院,德国
专门研究REAL VIRTUAL HUMANS http://virtualhumans.mpi-inf.mpg.de/

学习从图像中为3D人物穿衣

基于SMPL,提出MGN网络,用于从视频帧中预测体型和服装的方法。

1579228893790

Garment Registration:

​ Laplacian Mesh Processing 三维网格拉普拉斯处理

We register the scans using multi-mesh registration

[ICCV,2019] Tex2Shape

作者:Thiemo Alldieck, Gerard Pons-Moll, Christian Theobalt, Marcus Magnor:

论文:Tex2Shape: Detailed Full Human Body Geometry from a Single Image

GitHub:https://github.com/thmoa/tex2shape

Arxiv: https://arxiv.org/abs/1904.08645

单张图片—人体3D建模(无纹理重建)

  • 形状回归—-转化—->图像到图像的对齐翻译问题

输入:现成方法得到的可见部分的纹理

image-20200211230827286

[ICCV,2019] AMASS

Naureen Mahmood, Nima Ghorbani, Nikolaus F. Troje, Gerard Pons-Moll, Michael J. Black
AMASS: Archive of Motion Capture as Surface Shapes

AMASS 作为曲面形状的运动捕捉存档

in IEEE International Conference on Computer Vision (ICCV), 2019

AMASS: Archive of Motion Capture as Surface Shapes

[3DV, 2019] 360tex

Verica Lazova, Eldar Insafutdinov, Gerard Pons-Moll
360-Degree Textures of People in Clothing from a Single Image
in International Conference on 3D Vision (3DV), 2019.

源码: http://virtualhumans.mpi-inf.mpg.de/360tex/

从1张图片生成3D穿衣人物(带纹理)

在本文中,我们从一个单一的图像预测一个人的完整的3D化身。我们使用图像到图像的转换方法来推断SMPL模型的uv空间中的纹理和几何体。在给定输入视图的局部纹理和分割布局图的情况下,我们的模型预测了完整的分割图、完整的纹理图和位移图。预测出的地图可以应用到SMPL模型中,以便自然地推广到新的姿势、形状,甚至新衣服。为了在一个公共的UV空间中学习我们的模型,我们将SMPL模型非刚性地注册到数千个3D扫描中,有效地将纹理和几何图形编码为对应的图像。这将困难的三维推理任务转换为更简单的图像转换任务。对DeepFashion数据集中的人物和图像的渲染扫描结果表明,我们的方法可以从单个图像中重建出可信的3D化身。我们进一步使用我们的模型来数字化地改变姿势、形状、在人与人之间交换衣服和编辑衣服。为了鼓励这方面的研究,我们将提供用于研究目的的源代码[5]。

image-20200312141027764

[CVPR, 2019] Octopus

Reconstruct 3D Cloth Body –CVPR_2019

  • Single Image

《Learning to Reconstruct People in Clothing From a Single RGB Camera》

8张照片生成3D模型

作者:T. Alldieck, M. A. Magnor, B. L. Bhatnagar, C. Theobalt and G. Pons-Moll

代码:https://github.com/thmoa/octopus

论文:https://arxiv.org/abs/1903.05885

image-20200211215035833

image-20200325191102583

image-20200211215109044

dataset

purchased 163 scans from renderpeople.com

purchased 54 from axyzdesign.com.

1826 scans were kindly provided from Twindom (https://web.twindom.com/).

PGN: 转换数据

网络结构:

 Generating 3D faces using convolutional mesh autoencoders. 

纹理计算参考:

​ Detailed human avatars from monocular video.

steps:

​ Rendering

​ segmentation

[3DV, 2018.8] [Detailed Human Avatars from Monocular Video]

paper

img

(a). estimate a medium level body shape based on segmentations (基于语义分割的中等级别的身体形状)

(b). we add details using shape-from-shading.(Body Shape细节的优化)

(c). Finally we compute a texture using a semantic prior (c) [ a novel graph cut optimization strategy]

问题: 如何从RGB视频中获取细致的人体模型

输入: 单人的单目视频+轮廓信息+语义分割

输出: 基于SMPL的更细致的人体模型

和之前的区别是,

  • 增加shape-from-shading方法,
  • 对SMPL模型进行了划分,增加其点的数量与面片的数量
  • 贴纹理用了graph cut优化

代码:

纹理拼接代码semantic human texture stitching

基于SMPL的p,$\theta$新增了W(混合皮肤)

skeleton joints J(β)

标准T-Pose

consists of N = 110210 vertices and F = 220416 faces.

[CVPR, 2018.3] [Video Based Reconstruction of 3D People Models]

Paper

论文解读

img

calculate poses using the SMPL model (a)

unpose silhouette camera rays (unposed silhouettes depicted in red) unpose轮廓相机射线

optimize for the subjects shape in the canonical T-pose (c) 优化的对象形状,以规范T-pose形式 (c)

calculate a texture and generate a personalized blend shape model (d) 计算纹理和生成混合形状模型

问题: 如何从RGB视频中获取细致的人体模型

输入: 单人的单目视频+轮廓

输出: 基于SMPL的细致的人体模型

https://graphics.tu-bs.de/people-snapshot

  • github code
  • dataset

[ECCV,2018]VRN-Body

《3D Human Body Reconstruction from a Single Image via Volumetric Regression》

  • ⭐⭐⭐

https://arxiv.org/pdf/1809.03770v1.pdf

1
2
3
4
A.S. Jackson [](https://aaronsplace.co.uk/) 英国诺丁汉大学计算机视觉实验室 研究员 -- 图像深度学习
博士研究重点--人脸深度学习(3D重建,面部对齐, 语义部分分割)
无源码

https://52zju.cn/?p=249

  • 3D Human Body Reconstruction
  • 3D Texture 复原:效果一般,人物恢复模糊。

image-20200211105449069

[2017] HMR

End to end recovery of human shape and pose: 201712

在这里插入图片描述

[2019] MTC

https://new.qq.com/omn/20200908/20200908A09RJD00.html

[2020] FrankMocap

科学怪物!3D人体全身运动捕捉系统,港中文联合Facebook出品

https://new.qq.com/omn/20200908/20200908A09RJD00.html

使用神经网络拟合smplx的人体参数,手部参数,极大的提升了原本SMPLify-x的运算效率

official web site introduction

github

img

基础知识SMPL:

SMPL N = 6890 vertices and F = 13776 faces.
video2mesh
Video Reconstruct 穿裙子解决不了 改变不了smpl model的拓扑结构 拉不过去
Video Avatars—v1 <Video based reconstruction of 3D people models> 贴图方法: 同一个作者
VideoAvatars-v2 consists of N = 110210 vertices and F = 220416 faces. 同一个作者
Octopus octopus 有模型 有纹理贴图 用了Detailed Human Avatars from Monocular Video.的贴图方法 2019.4video2mesh延伸论文,同一实验室
Tex2Shape N = 27554 vertices and F = 55104 faces
MGN V = 27554 VT+V = 29193 F = 54831

Video Avatar重建(同一作者)

《1803 Video based reconstruction of 3D people models》

​ - 我们的主要贡献是在一个共同的参考系中,将对应于动态人体轮廓的轮廓锥变换成视觉外壳。

《1808 Detailed Human Avatars from Monocular Video.》 consists of N = 110210 vertices and F = 220416 faces.

1803:

  1. pose reconstruction (Sec. 3.2)

  2. consensus shape estimation (Sec. 3.3)

  3. frame refinement and texture map generation (Sec. 3.4).

Our main contribution is step 2), the consensus shape estimation;

step 1) builds on previous work and step 3) to obtain texture and time-varying details is optional

基础知识CV

Non-rigid surface deformations 非刚性表面变形:

非刚性变形的思想是:皮肤变形,不是由单一骨骼的运动来控制,而是由许多骨头的共同运作的结果来支配。

[toc]

NRL:Network representation learning

NRL(网络表示学习)

GE(Graph Embedding图嵌入) :侧重于降维; 更加强调是传统的图表示方法,比如LLE,LE,GF等

NE(Network Embedding网络嵌入): 侧重是对于后来这种分布式假设的表示方法;比如Deepwalk,node2vec,LINE等。它们不仅关注降维任务,还更加强调要尽可能大的保存网络属性,比如高阶的近邻关系或者网络中的某些特性(如同质性/结构等价性等)。

关于NRL/GE/NE的相关理论和文献:

《A Tutorial on Network Embeddings》. //这是今年Deepwalk团队的作者给的综述(教程),写的很好。

《Graph Embedding Techniques, Applications, and Performance: A Survey.》 //该文写的比较浅显,但整体上不错,适合初学者,并且提供了GEM工具包。

《A Comprehensive Survey of Graph Embedding: Problems, Techniques and Applications》. //该文写的比较全面,适合进阶。

A Tutorial on Network Embeddings

paper:https://arxiv.org/abs/1808.02590

中文阅读-A Tutorial on Network Embeddings

DeepWalk

DeepWalk原理理解:DeepWalk: online learning of social representations

DeepWork.pdf

【论文笔记】DeepWalk

Github

人脸属性分析–性别、年龄和表情识别开源集合

人脸属性指的是根据给定的人脸判断其性别、年龄和表情等,当前在github上开源了一些相关的工作,大部分都是基于tensorflow的,还有一部分是keras,CVPR2015曾有一篇是用caffe做的。

1、CVPR2015 caffe实现

https://github.com/GilLevi/AgeGenderDeepLearning

2、CVPR2015对应的tensorflow实现

https://github.com/dpressel/rude-carnie

3、DEX: Deep EXpectation 实现

https://github.com/truongnmt/multi-task-learning

4、CVPR2017 Age progression/regression by conditional Adversarial Autoencoder

https://github.com/ZZUTK/Face-Aging-CAAE

5、使用inception v1同时预测性别和年龄,受限于使用的dlib检测器,效果并不是很好

https://github.com/BoyuanJiang/Age-Gender-Estimate-TF

6、性别种族识别:gender Accuracy: 0.951493,race Accuracy: 0.87557212

https://github.com/zZyan/race_gender_[recognition](http://www.seotest.cn/jishu/35507.html)

8、性别识别全流程实现:94% accuracy

https://github.com/jocialiang/gender_classifier

9、表情、性别识别(keras)

https://github.com/oarriaga/face_classification

注明:两个分开的模型对应表情识别和性别识别

10、性别和种族识别

https://github.com/wondonghyeon/face-classification

11、年龄识别

https://github.com/shamangary/SSR-Net

12、年龄识别(亚洲人优化

https://github.com/b02901145/SSR-Net_megaage-asian

13、年龄和性别识别(Keras )

https://github.com/yu4u/age-gender-estimation

14、表情和性别识别:表情66% with fer2013

https://github.com/isseu/emotion-recognition-neural-networks

15、性别和年龄识别(tensorflow ):91% accuracy in gender and 55% in age

https://github.com/zealerww/gender_age_classification

16、人脸检测、性别和表情识别、数字化妆、轮廓标识等多功能(tensorflow 、keras)

https://github.com/vipstone/faceai

http://www.seotest.cn/wenzhang/ai_7841/

17、表情识别(tensorflow、keras):fer2013

https://github.com/XiuweiHe/EmotionClassifier

18、表情和种族识别:表情 72% accuracy ,种族95% accuracy

https://github.com/HectorAnadon/Face-expression-and-ethnic-recognition

19、表情识别(caffe):66.7% on fer2013 with resnet50

https://github.com/ybch14/Facial-Expression-Recognition-ResNet

20、表情识别(keras)

https://github.com/JostineHo/mememoji

21、种族识别

https://github.com/mangorocoro/racedetector

22、多任务学习:性别、年龄、表情(tensorflow)

https://github.com/truongnmt/multi-task-learning

23、性别识别(tensorflow、keras):爬虫图片+人脸提取识别

https://github.com/StevenKe8080/recognition_gender

24、年龄识别(tensorflow)

https://github.com/zonetrooper32/AgeEstimateAdience

25、年龄和性别识别

https://github.com/OValery16/gender-age-classification

26、表情识别

【Fer】GitHub - WuJie1010/Facial-Expression-Recognition.Pytorch

modelscope.cn / Facial Expression Recognition Summary

A CNN based pytorch implementation on facial expression recognition (FER2013 and CK+), achieving 73.112% (state-of-the-art) in FER2013 and 94.64% in CK+ dataset

姿态识别

详见: ../Paper/Paper-CV-PoseEstimation.md

1、多人姿态识别框架——AlphaPose

https://github.com/MVIG-SJTU/AlphaPose

2、

开源表情

GitHub - WuJie1010/Facial-Expression-Recognition.Pytorch: A CNN based pytorch implementation on facial expression recognition (FER2013 and CK+), achieving 73.112% (state-of-the-art) in FER2013 and 94.64% in CK+ dataset

GitHub - vipstone/faceai: 一款入门级的人脸、视频、文字检测以及识别的项目.

阿里# Fer 模型介绍

[toc]

开源数据集-物体识别:

Cifar10:go: ref:

http://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz

http://www.cs.toronto.edu/~kriz/cifar-10-matlab.tar.gz

http://www.cs.toronto.edu/~kriz/cifar-10-binary.tar.gz

该数据集文件包含data_batch1……data_batch5,和test_batch。他们都是由cPickle库产生的序列化后的对象(关于pickle,移步https://docs.python.org/3/library/pickle.html)。

1
2
3
4
5
def unpickle(file):
import pickle
with open(file, 'rb') as fo:
dict = pickle.load(fo, encoding='bytes')
return dict

Cifar100 go:

Version Size md5sum
CIFAR-100 python version 161 MB eb9058c3a382ffc7106e4002c42a8d85
CIFAR-100 Matlab version 175 MB 6a4bfa1dcd5c9453dda6bb54194911f4
CIFAR-100 binary version (suitable for C programs) 161 MB 03b5dce01913d631647c71ecec9e9cb8

VOC:

LSUN: go

LSUN: Construction of a Large-scale Image Dataset using Deep Learning with Humans in the Loop

img

国外的PASCAL
VOC和ImageNet ILSVRC比赛使用的数据集,数据领域包括卧室、冰箱、教师、厨房、起居室、酒店等多个主题。

推荐度:★★,推荐应用方向:图像识别

介绍和下载地址:http://lsun.cs.princeton.edu

Abstract

While there has been remarkable progress in the performance of visual recognition algorithms, the state-of-the-art models tend to be exceptionally data-hungry. Large labeled training datasets, expensive and tedious to produce, are required to optimize millions of parameters in deep network models. Lagging behind the growth in model capacity, the available datasets are quickly becoming outdated in terms of size and density. To circumvent this bottleneck, we propose to amplify human effort through a partially automated labeling scheme, leveraging deep learning with humans in the loop. Starting from a large set of candidate images for each category, we iteratively sample a subset, ask people to label them, classify the others with a trained model, split the set into positives, negatives, and unlabeled based on the classification confidence, and then iterate with the unlabeled set. To assess the effectiveness of this cascading procedure and enable further progress in visual recognition research, we construct a new image dataset, LSUN. It contains around one million labeled images for each of 10 scene categories and 20 object categories. We experiment with training popular convolutional networks and find that they achieve substantial performance gains when trained on this dataset.

Paper

Fisher Yu, Ari Seff, Yinda Zhang, Shuran Song, Thomas Funkhouser and Jianxiong Xiao
LSUN: Construction of a Large-scale Image Dataset using Deep Learning with Humans in the Loop
arXiv:1506.03365 [cs.CV], 10 Jun 2015

Data

10 scene categories for LSUN Scene Classification Challange: Downloading Code

20 object categories: Link List. Images for each category are stored in LMDB format and the database is then zipped. After downloading and decompressing the zip files, please to refer to LSUN utility code to visualize and export the images. MD5 sum for each zip file is also provided so that you can verify your downloads.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
../
airplane.zip 06-Mar-2019 00:14 34G
airplane.zip.md5 19-Dec-2019 20:04 47
bicycle.zip 06-Mar-2019 00:44 129G
bicycle.zip.md5 19-Dec-2019 20:04 46
bird.zip 06-Mar-2019 00:57 65G
bird.zip.md5 19-Dec-2019 20:04 43
boat.zip 06-Mar-2019 01:12 86G
boat.zip.md5 19-Dec-2019 20:04 43
bottle.zip 06-Mar-2019 01:24 64G
bottle.zip.md5 19-Dec-2019 20:04 45
bus.zip 06-Mar-2019 01:29 24G
bus.zip.md5 19-Dec-2019 20:04 42
car.zip 06-Mar-2019 02:05 173G
car.zip.md5 19-Dec-2019 20:04 42
cat.zip 06-Mar-2019 02:12 42G
cat.zip.md5 19-Dec-2019 20:04 42
chair.zip 06-Mar-2019 02:31 116G
chair.zip.md5 19-Dec-2019 20:04 44
cow.zip 06-Mar-2019 02:34 15G
cow.zip.md5 19-Dec-2019 20:04 42
dining_table.zip 06-Mar-2019 02:50 48G
dining_table.zip.md5 19-Dec-2019 20:04 51
dog.zip 06-Mar-2019 03:14 145G
dog.zip.md5 19-Dec-2019 20:04 42
horse.zip 06-Mar-2019 03:25 69G
horse.zip.md5 19-Dec-2019 20:04 44
motorbike.zip 06-Mar-2019 03:32 42G
motorbike.zip.md5 19-Dec-2019 20:04 48
person.zip 06-Mar-2019 04:47 477G
person.zip.md5 19-Dec-2019 20:04 45
potted_plant.zip 06-Mar-2019 04:54 43G
potted_plant.zip.md5 19-Dec-2019 20:04 51
sheep.zip 06-Mar-2019 04:57 18G
sheep.zip.md5 19-Dec-2019 20:04 44
sofa.zip 06-Mar-2019 05:06 56G
sofa.zip.md5 19-Dec-2019 20:04 43
train.zip 06-Mar-2019 05:13 43G
train.zip.md5 19-Dec-2019 20:04 44
tv-monitor.zip 06-Mar-2019 05:21 46G
tv-monitor.zip.md5 19-Dec-2019 20:04 49

LSUN Challenge

In CVPR 2015 and 2016, a image classification challenge has been hosted in LSUN Challenge workshop to evaluate the progress of large-scale image understanding. More information can be found at the challenge webpage.

ImageNet数据集

ImageNet数据集是目前深度学习图像领域应用得非常多的一个领域,该数据集有1000多个图像,涵盖图像分类、定位、检测等应用方向。Imagenet数据集文档详细,有专门的团队维护,在计算机视觉领域研究论文中应用非常广,几乎成为了目前深度学习图像领域算法性能检验的“标准”数据集。很多大型科技公司都会参加ImageNet图像识别大赛,包括百度、谷歌、微软等。

推荐度:★★★,推荐应用方向:图像识别

介绍和下载地址:http://www.image-net.org/

Tiny Images Dataset

该数据集由79302017张图像组成,每张图像为32x32彩色图像。 该数据以二进制文件的形式存储,大约有400Gb图像。

推荐度:★★,推荐应用方向:图像识别

介绍和下载地址:http://horatio.cs.nyu.edu/mit/tiny/data/index.html

CoPhIR

CoPhIR是从Flickr中采集的大概1.06亿个图像数据集,图像中不仅包含了图表本身的数据,例如位置、标题、GPS、标签、评论等,还可提取出颜色模式、颜色布局、边缘直方图、均匀纹理等数据。

推荐度:★★,推荐应用方向:图像识别

介绍和下载地址:http://cophir.isti.cnr.it/whatis.html

Labeled Faces in the Wild数据集

该数据集是用于研究无约束面部识别问题的面部照片数据库。数据集包含从网络收集的13000多张图像。每张脸都贴上了所画的人的名字,图片中的1680人在数据集中有两个或更多不同的照片。

推荐度:★★,推荐应用方向:人脸识别

介绍和下载地址:http://vis-www.cs.umass.edu/lfw/

SVHN

SVHN数据来源于 Google 街景视图中房屋信息,它是一个真实世界的图像数据集,用于开发机器学习和对象识别算法,对数据预处理和格式化的要求最低。它跟MNIST相似,但是包含更多数量级的标签数据(超过60万个数字图像),并且来源更加多样,用来识别自然场景图像中的数字。

推荐度:★★,推荐应用方向:机器学习、图像识别

介绍和下载地址:http://ufldl.stanford.edu/housenumbers/

MS COCO

COCO(Common Objects in Context)是一个新的图像识别、分割和图像语义数据集,由微软赞助,图像中不仅有标注类别、位置信息,还有对图像的语义文本描述。COCO数据集的开源使得近两、三年来图像分割语义理解取得了巨大的进展,也几乎成为了图像语义理解算法性能评价的“标准”数据集。

推荐度:★★★,推荐应用方向:图像识别、图像语义理解

介绍和下载地址:http://mscoco.org/

谷歌YouTube-8M

YouTube-8M一个大型的多样性标注的视频数据集,目前拥有700万的YouTube视频链接、45万小时视频时长、3.2亿视频/音频特征、4716个分类、平均每个视频拥有3个标签。

推荐度:★★★,推荐应用方向:视频理解、表示学习(representation learning)、嘈杂数据建模、转移学习(transfer learning)和视频域适配方法(domain
adaptation approaches)

数据集介绍和下载地址:https://research.google.com/youtube8m/

Udacity开源的车辆行使视频数据集

数据集大概有223G,主要是有关车辆驾驶的数据,其中除了车辆拍摄的图像以外,还包括车辆本身的属性和参数信息,例如经纬度、制动器、油门、转向度、转速等。这些数据可用于车辆自动驾驶方向的模型训练和学习。

推荐度:★★★,推荐应用方向:自动驾驶

介绍和下载地址:https://github.com/udacity/self-driving-car

牛津RobotCar视频数据集

RobotCar数据集包含时间范围超过1年,测试超过100次的相同路线的驾驶数据。数据集采集了天气、交通、行人、建筑和道路施工等不同组合的数据。

推荐度:★★★,推荐应用方向:自动驾驶

介绍和下载地址:http://robotcar-dataset.robots.ox.ac.uk/

Udacity开源的自然场景短视频数据集

数据集大概为9T,由3500万个视频剪辑组成,每个视频为短视频(32帧),大约1秒左右的时长。

推荐度:★★★,推荐应用方向:目标跟踪、视频目标识别

介绍和下载地址:http://web.mit.edu/vondrick/tinyvideo/#data

3. 自然语言数据集

【todo】

ref:

https://www.zhihu.com/question/63383992

http://blog.itpub.net/29829936/viewspace-2219159/

瑜伽动作索引

[TOC]

站式

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Tadasana—Mountain Pose(山式)
Variation: Samasthiti—Equal Standing, Prayer Pose(山式变式)
Utkatasana—Chair Pose, Awkward Pose(椅式)
Uttanasana—Standing Forward Bend(站立前屈式)
Utthita Hasta Padangusthasana—Extended Hand Toe Pose(手拉脚单腿直立式)
Variation: With Spine Flexed(脊柱屈曲式)
Vrksasana—Tree Pose(树式)
Variation: With Arms Elevated(抬手树式)
Garudasana—Eagle Pose(鹰式)
Natarajasana—King of the Dancers Pose(舞王式)
Virabhadrasana I—Warrior I(勇士式I)
Variation: With Longer Stance(长站姿式)
Virabhadrasana II—Warrior II(勇士式II)
Virabhadrasana III—Warrior III(勇士式III)
Utthita Parsvakonasana—Extended Side Angle Pose(伸展侧角式)
Parivrtta Baddha Parsvakonasana—Revolved Side Angle Pose(旋转侧角式)
Utthita Trikonasana—Extended Triangle Pose(伸展三角式)
Variation: With Longer Stance(长站姿式)
Parivrtta Trikonasana—Revolved Triangle Pose(旋转三角式)
Parsvottanasana—Intense Side Stretch(加强侧伸展式)
Variation: With Arms in Reverse Namaskar(双手背后合十式)
Variation: With Spine Flexed(脊柱屈曲式)
Prasarita Padottanasana—Wide-Stance Forward Bend(宽站姿前屈式)
Upavesasana—Squat, Sitting-Down Pose(下蹲式)

坐式

1
2
3
4
5
6
7
8
9
10
11
12
13
14
Dandasana—Staff Pose(手杖式)
Paschimottanasana—West (Back) Stretching(西部(背部)伸展式)
Janu Sirsasana—Head-to-Knee Pose(头到膝式)
Parivrtta Janu Sirsasana—Revolved Head-to-Knee Pose(反转头碰膝式)
Mahamudra—The Great Seal(内女式)
Upavistha Konasana—Seated Wide-Angle Pose(坐式广角姿势)
Baddha Konasana—Bound Angle Pose(蝴蝶式)
Variation: Supta Baddha Konasana—Reclining Bound Angle Pose(卧蝴蝶式)
Kurmasana—Turtle Pose(乌龟式)
Variation: Supta Kurmasana—Reclining Turtle Pose(卧龟式)
Ardha Matsyendrasana—Half Lord of the Fishes Pose(半鱼主式)
Gomukhasana—Cow-Faced Pose(牛面式)
Hanumanasana—Monkey Pose(神猴式)
Navasana—Boat Pose(船式)

跪式

1
2
3
4
5
6
7
Balasana—Child's Pose(婴儿式)
Supta Virasana—Reclining Hero Pose(卧英雄式)
Ustrasana—Camel Pose(骆驼式)
Eka Pada Rajakapotasana—One-Legged Royal Pigeon Pose(单脚鸽王式)
Variation: Folded Forward(向前折叠)
Parighasana—Gate-Latch Pose(门闩式)
Simhasana—Lion Pose(狮子式)

仰卧式

1
2
3
4
5
6
7
8
9
10
11
12
13
14
Savasana—Corpse Pose(挺卧式)
Apanasana—Apana Pose, Wind Release Pose(下行气姿势、风速释放姿势)
Setu Bandhasana—Bridge Pose(桥式)
Variation: Dwi Pada Pitham—Two-Legged Table(双脚支撑式)
Salamba Sarvangasana—Supported Shoulder Stand(受支撑的肩倒立式)
Niralamba Sarvangasana—Unsupported (No-Arm) Shoulder Stand(无支撑(不用手臂)肩倒立式)
Viparita Karani—Inverted Pose(倒立姿势)
Halasana—Plow Pose(犁式)
Karnapidasana—Ear-to-Knee Pose(耳到膝式)
Jathara Parivrtti—Belly Twist(腹部扭转式)
Variation: With Legs Extended(双腿伸直)
Matsyasana—Fish Pose(鱼式)
Variation: With Arms and Legs Lifted(提升手臂和双腿)
Anantasana—Reclining Vishnu Couch Pose(毗湿奴躺沙发式)

俯卧式

1
2
3
4
5
Bhujangasana—Cobra Pose(蛇式)
Variation: With Knees Flexed(膝盖弯曲)
Dhanurasana—Bow Pose(弓式)
Salabhasana—Locust Pose(蝗虫式)
Viparita Salabhasana—Full Locust Pose(全蝗虫式)

臂架式

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Adho Mukha Svanasana—Downward-Facing Dog Pose(下犬式)
Urdhva Mukha Svanasana—Upward-Facing Dog Pose(上犬式)
Adho Mukha Vrksasana—Downward-Facing Tree Pose(手倒立式)
Chaturanga Dandasana—Four-Limbed Stick Pose(四肢支撑式)
Bakasana—Crow Pose, Crane Pose(乌鸦式、鹤禅式)
Parsva Bakasana—Side Crow Pose, Side Crane Pose(侧乌鸦式、侧鹤式)
Astavakrasana—Eight-Angle Pose(八角式)
Mayurasana—Peacock Pose(孔雀式)
Pincha Mayurasana—Feathered Peacock Pose(孔雀起舞式)
Salamba Sirsasana—Supported Headstand(支撑头倒立式)
Vrschikasana—Scorpion Pose(蝎子式)
Urdhva Dhanurasana—Upward Bow Pose, Wheel Pose(上弓式、轮式)
Vasisthasana—Side Plank Pose, Sage Vasistha's Pose(侧板式、圣人瓦西斯塔式)
Chatus Pada Pitham—Four-Footed Tabletop Pose(四脚桌子式)
Purvottanasana—Upward Plank Pose(上平板式)

NVlab

[TOC]

VAE生成模型

Variational autoencoder == 变分自编码器

可以输入一个低维空间的Z,映射到高维空间的真实数据。比如,生成不同样的数字,人脸,卡通头像等等。

img

2)VAE与GAN之间的差异性

既然VAE与GAN都是属于最近很火的生成网络序列,那么他们之间有什么不同呢?

假设,给定一系列猫的照片,我希望你能够对应我随机输入的一个n维向量,生成一张新的猫的照片,你需要怎么去做?对于GAN就是典型的深度学习时代的逻辑,你不是不清楚这个n维向量与猫的图片之间的关系嘛,没关系,我直接拟合出来猫的图片对于n维向量的分布,通过对抗学习的方式获得较好的模型效果,这个方法虽然很暴力,但是却是有效的。(暴力求解)

VAE则不同,他通过说我希望生成一张新的猫脸,那么这个n维向量代表的就是n个决定最终猫脸模样的隐形因素。对于每个因素,都对应产生一种分布,从这些分布关系中进行采样,那么我就可以通过一个深度网络恢复出最终的猫脸。VAE相比较于GAN它的效果往往会略微模糊一点,但是也不失为一种良好的解决方案。并且相对于GAN的暴力求解,VAE的建模思路无疑要复杂的多,它更能体现理科思维的艺术感。

https://blog.csdn.net/weixin_40955254/article/details/82315224 — Good

VAE是直接计算生成图片和原始图片的均方误差

GAN 对抗来学习

https://antkillerfarm.github.io/gan%20&%20vae/2019/05/05/VAE_3.html

img

不像标准自编码器那样产生实数值向量,VAE的编码器会产生两个向量:一个是均值向量,一个是标准差向量。

img

可以通过编码解码的步骤,直接比较重建图片和原始图片的差异,但是GAN做不到。

https://www.cnblogs.com/huangshiyu13/p/6209016.html

GAN生成模型

Generative Adversarial Nets

image-20201012154819284

image-20201012154844963

从判别器 D 的角度看,它希望自己能尽可能区分真实样本和虚假样本,因此希望 D(x) 尽可能大,D(G(z)) 尽可能小, 即 V(D,G)尽可能大。从生成器 G 的角度看,它希望自己尽可能骗过 D,也就是希望 D(G(z)) 尽可能大,即 V(D,G) 尽可能小。两个模型相对抗,最后达到全局最优。
从数据分布来说,就是开始的噪声noise,在G不断修正后,产生的分布,和目标数据分布达到一致:

image-20201012154857364

cGAN(Conditional GAN)

  • MG-VTON 采用了此技术

StyleGAN

A Style-Based Generator Architecture for Generative Adversarial Networks

https://github.com/NVlabs/stylegan

https://arxiv.org/abs/1812.04948

网络架构

1578381870941

Custom Date

  • 准备好数据集

  • 把数据集储存为多重分辨率的Tfrecords

  • 数据集表示为一个目录,里面的每张图像都有多种不同的分辨率,用于高效的streaming。每个分辨率都有一个自己的*.tfrecords文件。数据有标注的话,也是用一个分开的文件来储存的。

  • 1> python dataset_tool.py create_lsun datasets/lsun-bedroom-full ~/lsun/bedroom_lmdb --resolution 256
    
    2> python dataset_tool.py create_lsun_wide datasets/lsun-car -512x384 ~/lsun/car_lmdb --width 512--height 384
    
    3> python dataset_tool.py create_lsun datasets/lsun-cat-full ~/lsun/cat_lmdb --resolution 256
    
    4> python dataset_tool.py create_cifar10 datasets/cifar10 ~/cifar10
    
    # 自定义
    5> python dataset_tool.py create_from_images datasets/custom-dataset ~/custom-images
    

训练

官方提供的训练过程分四步:

1.编辑train.py,通过取消注释或者修改某些行,来指定数据集和训练配置;

2.用train.py来运行训练脚本;

3.结果会写在一个新目录里,叫results/ - ;

4.训练直至完成,几天时间可能是要的。

StyleGAN2

Analyzing and Improving the Image Quality of StyleGAN

https://github.com/NVlabs/stylegan2

https://arxiv.org/abs/1912.04958

StyleGAN2 Google Colab Example

网络结构:

1578382642371

数据集(origin)

https://github.com/NVlabs/ffhq-dataset

Path Size Files Format Description
ffhq-dataset 2.56 TB 210,014 Main folder
├  ffhq-dataset-v2.json 255 MB 1 JSON Metadata including copyright info, URLs, etc.
images1024x1024 89.1 GB 70,000 PNG Aligned and cropped images at 1024×1024 (同in-the-wild-image, 大小统一格式化)
thumbnails128x128 1.95 GB 70,000 PNG Thumbnails at 128×128
in-the-wild-images 955 GB 70,000 PNG Original images from Flickr(Human top)
tfrecords 273 GB 9 tfrecords Multi-resolution data for StyleGAN and StyleGAN2
zips 1.28 TB 4 ZIP Contents of each folder as a ZIP archive.

数据集合(baiduYUN):

images1024x1024 链接:https://pan.baidu.com/s/1Tdu2G2E8PLKsLnICUi13EQ
提取码:jtjv

参考资料: ffhq-dataset(images1024x1024)

相关Blog

1、零成本体验StyleGAN2:

style gan论文翻译

Colab代码直接使用,细节逼真难以分辨 https://www.jiqizhixin.com/articles/2019-12-21-3

2、StyleGAN效果图

用StyleGAN风格迁移模型生成人脸 https://www.jianshu.com/p/c728a7cc1a6b

3、StyleGAN 人脸生成器(网红脸)

http://www.gwylab.com/download.html

https://mp.weixin.qq.com/s/T9i7Pr054YylB3SI0k_88A 超模脸、网红脸、萌娃脸…换头像不重样?我开源了5款人脸生成器

[TOC]

人体3D建模:

  • 均是蒙皮模型,没有纹理

SMPL 2015

《A Skinned Multi-Person Linear Model》

Loper, Matthew and Mahmood, Naureen and Romero, Javier and Pons-Moll, Gerard and Black, Michael J.

  • 参数人体建模

Official

https://smpl.is.tue.mpg.de/

SMPL

https://github.com/CalciferZh/SMPL

  • Numpy, TF and PyTorch implementation of human body SMPL model and infant body SMIL model.

参数化的人体3D模型生成工具

SMPLify 2016

论文:《Keep it SMPL: Automatic Estimation of 3D Human Pose and Shape from a Single Image》

官网:http://smplify.is.tue.mpg.de/

github: https://github.com/vchoutas/smplify-x

论文解读: https://eros-l.github.io/weekly/2018/11/28/weekly5/

  • 根据单张照片生成3D模型

项目实践:

官网数据:

smplify_code_v2.zip

lsp_results.tar.gz

human_eva_results.tar.gz

h36M_results_wtout_plytar.gz

常见问题:

—–自定义自己的数据集

  • 使用经过LSP训练过的关节检测器CPM/DeepCut
  • fit_3d.py 的run_sigle_fit

Ubuntu下python3环境:

  1. 下载lsp数据集。
  2. DeepCut 提取lsp数据集2D Pose特征点 (DeepCut 提取的 lsp dataset 的二维特征点)
  3. SMPLify fit_3d.py 转换人体3D Pose的模型截图jpg和pkl格式。
  4. pkl 文件来生成对应的 obj 文件或者其他格式的 mesh(未完成)

参考文档:

​ 1.学习报告(week 5)

​ 2.(week 2)【经验教训】如何将CPM和SMPL的输入替换成任意图片并得到人体三维模型

SMPL-H(mano) 2017

官网:https://mano.is.tue.mpg.de/

论文:《Embodied Hands: Modeling and Capturing Hands and Bodies Together》 2017

Javier Romero*, Dimitrios Tzionas* and Michael J Black

SIGGRAPH ASIA 2017, BANGKOK, THAILAND

  • 增加了对手的部分的细节的还原

SMPLX 2019

官网:https://smpl-x.is.tue.mpg.de/

github: https://github.com/vchoutas/smplx

《Expressive Body Capture: 3D Hands, Face, and Body from a Single Image》

G. Pavlakos*, V. Choutas*, N. Ghorbani, T. Bolkart, A. A. A. Osman, D. Tzionas and M. J. Black

CVPR 2019

  • 增加了对手,脸部,身体的细节的完善

  • pytorch实现,摈弃了chumpy

SMPLify-X

https://github.com/vchoutas/smplify-x

从单张图片的3D人体复原

AMASS dataset

https://amass.is.tuebingen.mpg.de/

AMASS is a large database of human motion unifying different optical marker-based motion capture datasets by representing them within a common framework and parameterization. AMASS is readily useful for animation, visualization, and generating training data for deep learning.

AMASS是一个大型的人类运动数据库,通过在共同的框架和参数化中表示不同的基于光学标记的运动捕获数据集来统一这些数据。AMASS对于动画,可视化以及生成用于深度学习的训练数据非常有用。

SMPL模型源码/项目介绍

SMPL源码下载:http://smpl.is.tue.mpg.de/downloads 需要注册

本文主要讨论SMPL源码核心代码。需要储备的知识还有:三维重建基础知识,以及 chumpy阅读以及opendr阅读LBS DQS

SMPL文件主要包括 vert.py serialization.py lbs.py。下面将逐一说说明。

0、关节位置

SMPL模型关节点名称

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
self.j_names = {
0: ‘Pelvis’,
1: ‘L_Hip’,
2: ‘R_Hip’,
3: ‘Spine1’,
4: ‘L_Knee’,
5: ‘R_Knee’,
6: ‘Spine2’,
7: ‘L_Ankle’,
8: ‘R_Ankle’,
9: ‘Spine3’,
10: ‘L_Foot’,
11: ‘R_Foot’,
12: ‘Neck’,
13: ‘L_Collar’,
14: ‘R_Collar’,
15: ‘Head’,
16: ‘L_Shoulder’,
17: ‘R_Shoulder’,
18: ‘L_Elbow’,
19: ‘R_Elbow’,
20: ‘L_Wrist’,
21: ‘R_Wrist’,
22: ‘L_Hand’,
23: ‘R_Hand’, }

关节树图形:

img

1、posemapper.py

主要是实现关节角度到姿势混合形状的映射。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import chumpy as ch
import numpy as np
import cv2

class Rodrigues(ch.Ch): #创建函数类
dterms = 'rt' #可微变量旋度

def compute_r(self): #计算旋转矩阵
return cv2.Rodrigues(self.rt.r)[0]

def compute_dr_wrt(self, wrt): # 计算旋度
if wrt is self.rt:
return cv2.Rodrigues(self.rt.r)[1].T #返回旋度的转置


def lrotmin(p):
if isinstance(p, np.ndarray): # 判断p的类型是不是np,基本上都不是,跳过
p = p.ravel()[3:] # 转化成3*n矩阵
return np.concatenate([(cv2.Rodrigues(np.array(pp))[0]-np.eye(3)).ravel() for pp in p.reshape((-1,3))]).ravel()
if p.ndim != 2 or p.shape[1] != 3: # 判断姿势的维度,如果不是2维或第二维shape不为3
p = p.reshape((-1,3)) # 将pose转换成(24,3)的形式
p = p[1:] # 去掉root出,提取23个关节处
return ch.concatenate([(Rodrigues(pp)-ch.eye(3)).ravel() for pp in p]).ravel() # 将旋转向量转化成旋转矩阵,并拼接在一起

def posemap(s):
if s == 'lrotmin':
return lrotmin
else:
raise Exception('Unknown posemapping: %s' % (str(s),))

2、LBS.py

就是实现LBS

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
from posemapper import posemap
import chumpy
import numpy as np

#计算模型的全局刚体变换,包括旋度和平移量。实现论文里的公式4
def global_rigid_transformation(pose, J, kintree_table, xp):
results = {}
# 看了后面parents 终于知道这个kintree_table是干啥的了:关节树,可以理解为各个关节相互依赖的关系。
pose = pose.reshape((-1,3)) #静止的姿势参数:shape=(24,3) 可能都是0向量
# 下面两行主要是变换列表,并剔除[0,0]坐标的异常值(可以认为是root的方向异常)。kintree_table的shape=(2,24)
id_to_col = {kintree_table[1,i] : i for i in range(kintree_table.shape[1])}
parent = {i : id_to_col[kintree_table[0,i]] for i in range(1, kintree_table.shape[1])}
#如果xp是chumpy类型
if xp == chumpy:
from posemapper import Rodrigues # 则引入posemapper的函数
rodrigues = lambda x : Rodrigues(x) # 创建匿名类,ch对象
else:
import cv2
rodrigues = lambda x : cv2.Rodrigues(x)[0] #否则的话使用opencv的函数
# stack纵向拼接,改变的是行数,类似于concat。xp在这里就相当于chumpy类
with_zeros = lambda x : xp.vstack((x, xp.array([[0.0, 0.0, 0.0, 1.0]])))
# 先确定根关节的结果:目前还不知道这个result有什么用。
# hstack横向拼接,改变的是列数。输入的是pose的root节点和关节的root节点,最后输出是主对角线为1的4*4矩阵
# pose[0] 表示静止姿势的根关节位置
results[0] = with_zeros(xp.hstack((rodrigues(pose[0,:]), J[0,:].reshape((3,1)))))
# 利用关节的依赖关系求得其他关节的result
for i in range(1, kintree_table.shape[1]): # i从1到23,代表每个关节的编号
results[i] = results[parent[i]].dot(with_zeros(xp.hstack(( # 父关节的轴角乘以关节相对旋度等于当前关节的轴角
rodrigues(pose[i,:]),
((J[i,:] - J[parent[i],:]).reshape((3,1))) # 计算关节的相对位置
))))

pack = lambda x : xp.hstack([np.zeros((4, 3)), x.reshape((4,1))])

results = [results[i] for i in sorted(results.keys())]
results_global = results

if True:
results2 = [results[i] - (pack(
results[i].dot(xp.concatenate( ( (J[i,:]), 0 ) )))
) for i in range(len(results))]
results = results2
result = xp.dstack(results)
return result, results_global

# 计算每个顶点的关节影响度的混合
def verts_core(pose, v, J, weights, kintree_table, want_Jtr=False, xp=chumpy):
A, A_global = global_rigid_transformation(pose, J, kintree_table, xp) #调用函数,生成全局和局部的旋转矩阵。A.shape=[4,4,24] A_global.shape=[24,4,4]
T = A.dot(weights.T) # weight.shape=[6890,24],生成结果的shape=[4,4,6890]

rest_shape_h = xp.vstack((v.T, np.ones((1, v.shape[0])))) # 静止姿势的shape

v =(T[:,0,:] * rest_shape_h[0, :].reshape((1, -1)) +
T[:,1,:] * rest_shape_h[1, :].reshape((1, -1)) +
T[:,2,:] * rest_shape_h[2, :].reshape((1, -1)) +
T[:,3,:] * rest_shape_h[3, :].reshape((1, -1))).T # 应用公式2

v = v[:,:3]

if not want_Jtr:
return v
Jtr = xp.vstack([g[:3,3] for g in A_global])
return (v, Jtr)

3、vert.py

verts_decorated函数没有被用到就不过多注释了

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import chumpy
import lbs
from posemapper import posemap
import scipy.sparse as sp
from chumpy.ch import MatVecMult

def ischumpy(x): return hasattr(x, 'dterms') #如果没有dterm属性就返回chumpy

# verts_decorated函数:从另一个SMPL模型中参数来创建新的SMPL模型实例
def verts_decorated(trans, pose,
v_template, J, weights, kintree_table, bs_style, f,
bs_type=None, posedirs=None, betas=None, shapedirs=None, want_Jtr=False):
#各个参数的含义

for which in [trans, pose, v_template, weights, posedirs, betas, shapedirs]:
if which is not None:
assert ischumpy(which) #判断是否是chumpy类型,如果不是则报错

v = v_template

if shapedirs is not None:
if betas is None:
betas = chumpy.zeros(shapedirs.shape[-1])
v_shaped = v + shapedirs.dot(betas)
else:
v_shaped = v

if posedirs is not None:
v_posed = v_shaped + posedirs.dot(posemap(bs_type)(pose))
else:
v_posed = v_shaped

v = v_posed

if sp.issparse(J):
regressor = J
J_tmpx = MatVecMult(regressor, v_shaped[:,0])
J_tmpy = MatVecMult(regressor, v_shaped[:,1])
J_tmpz = MatVecMult(regressor, v_shaped[:,2])
J = chumpy.vstack((J_tmpx, J_tmpy, J_tmpz)).T
else:
assert(ischumpy(J))

assert(bs_style=='lbs')
result, Jtr = lbs.verts_core(pose, v, J, weights, kintree_table, want_Jtr=True, xp=chumpy)

tr = trans.reshape((1,3))
result = result + tr
Jtr = Jtr + tr

result.trans = trans
result.f = f
result.pose = pose
result.v_template = v_template
result.J = J
result.weights = weights
result.kintree_table = kintree_table
result.bs_style = bs_style
result.bs_type =bs_type
if posedirs is not None:
result.posedirs = posedirs
result.v_posed = v_posed
if shapedirs is not None:
result.shapedirs = shapedirs
result.betas = betas
result.v_shaped = v_shaped
if want_Jtr:
result.J_transformed = Jtr
return result

# verts_core :overloaded function inherited by lbs.verts_core
def verts_core(pose, v, J, weights, kintree_table, bs_style, want_Jtr=False, xp=chumpy):

if xp == chumpy:
assert(hasattr(pose, 'dterms'))
assert(hasattr(v, 'dterms'))
assert(hasattr(J, 'dterms'))
assert(hasattr(weights, 'dterms'))

assert(bs_style=='lbs')
result = lbs.verts_core(pose, v, J, weights, kintree_table, want_Jtr, xp)

return result

4、serialization.py

SMPL模型的序列化函数。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
def save_model(model, fname): # 保存模型model到文件名fname中
m0 = model
# 将模型参数存入字典。各个模型参数的含义:
# v_template:顶点模板 J:关节坐标,weight:关节权重,kintree_table:关节树,f:相机参数,bs_type:蒙皮方法LBS还是DQBS
trainer_dict = {'v_template': np.asarray(m0.v_template),'J': np.asarray(m0.J),'weights': np.asarray(m0.weights),'kintree_table': m0.kintree_table,'f': m0.f, 'bs_type': m0.bs_type, 'posedirs': np.asarray(m0.posedirs)}
if hasattr(model, 'J_regressor'):
trainer_dict['J_regressor'] = m0.J_regressor
if hasattr(model, 'J_regressor_prior'):
trainer_dict['J_regressor_prior'] = m0.J_regressor_prior
if hasattr(model, 'weights_prior'):
trainer_dict['weights_prior'] = m0.weights_prior
if hasattr(model, 'shapedirs'):
trainer_dict['shapedirs'] = m0.shapedirs
if hasattr(model, 'vert_sym_idxs'):
trainer_dict['vert_sym_idxs'] = m0.vert_sym_idxs
if hasattr(model, 'bs_style'):
trainer_dict['bs_style'] = model.bs_style
else:
trainer_dict['bs_style'] = 'lbs'
pickle.dump(trainer_dict, open(fname, 'w'), -1) #写入文件

# 加载model时更改参数名称
def backwards_compatibility_replacements(dd):

# replacements
if 'default_v' in dd:
dd['v_template'] = dd['default_v']
del dd['default_v']
if 'template_v' in dd:
dd['v_template'] = dd['template_v']
del dd['template_v']
if 'joint_regressor' in dd:
dd['J_regressor'] = dd['joint_regressor']
del dd['joint_regressor']
if 'blendshapes' in dd:
dd['posedirs'] = dd['blendshapes']
del dd['blendshapes']
if 'J' not in dd:
dd['J'] = dd['joints']
del dd['joints']

# defaults
if 'bs_style' not in dd:
dd['bs_style'] = 'lbs'


# 准备参数
def ready_arguments(fname_or_dict):

if not isinstance(fname_or_dict, dict):
dd = pickle.load(open(fname_or_dict))
else:
dd = fname_or_dict

backwards_compatibility_replacements(dd)

want_shapemodel = 'shapedirs' in dd
nposeparms = dd['kintree_table'].shape[1]*3 # 这些不是pose的变量,是关节树

if 'trans' not in dd:
dd['trans'] = np.zeros(3) # 定义平移量为0
if 'pose' not in dd:
dd['pose'] = np.zeros(nposeparms) # 定义姿势为 0
if 'shapedirs' in dd and 'betas' not in dd:
dd['betas'] = np.zeros(dd['shapedirs'].shape[-1])

for s in ['v_template', 'weights', 'posedirs', 'pose', 'trans', 'shapedirs', 'betas', 'J']:
if (s in dd) and not hasattr(dd[s], 'dterms'):
dd[s] = ch.array(dd[s])

if want_shapemodel: # 需要形状模型
dd['v_shaped'] = dd['shapedirs'].dot(dd['betas'])+dd['v_template']
v_shaped = dd['v_shaped']
J_tmpx = MatVecMult(dd['J_regressor'], v_shaped[:,0])
J_tmpy = MatVecMult(dd['J_regressor'], v_shaped[:,1])
J_tmpz = MatVecMult(dd['J_regressor'], v_shaped[:,2])
dd['J'] = ch.vstack((J_tmpx, J_tmpy, J_tmpz)).T
dd['v_posed'] = v_shaped + dd['posedirs'].dot(posemap(dd['bs_type'])(dd['pose']))
else:
dd['v_posed'] = dd['v_template'] + dd['posedirs'].dot(posemap(dd['bs_type'])(dd['pose']))

return dd



def load_model(fname_or_dict):
dd = ready_arguments(fname_or_dict)

args = {
'pose': dd['pose'],
'v': dd['v_posed'],
'J': dd['J'],
'weights': dd['weights'],
'kintree_table': dd['kintree_table'],
'xp': ch,
'want_Jtr': True,
'bs_style': dd['bs_style']
}

result, Jtr = verts_core(**args)
result = result + dd['trans'].reshape((1,3))
result.J_transformed = Jtr + dd['trans'].reshape((1,3))

for k, v in dd.items():
setattr(result, k, v)

return result

环境配置(SMPL)

chumpy安装

pip install chumpy (0.86的chumpy已经支持python3 不需要特别修改代码安装)

python2和python3一些库的名字不同:

例如:no module named cPickle

pickle模块,在ython3中为import pickle,python2中为import cPickle as pickle

opendr 安装

https://codeload.github.com/polmorenoc/opendr/zip/master

  • 1 python setup.py build
  • 2 python setup.py install

OPENGL-python 安装

https://files.pythonhosted.org/packages/d7/8a/5db9096aa6506e405309c400bd0feb41997689cbba30683479c30dba6355/PyOpenGL-3.1.4.tar.gz

  • 1- 解压
  • 2- python setup.py build
  • 3- python setup.py install

环境配置Ubuntu(SMPL)

opendr

1
pip3 install opendr

Mesa 3D Graphics Library

https://www.mesa3d.org/osmesa.html

1
2
sudo apt-get install libosmesa6-dev
pip3 install opendr

PyOpenGL

1
pip3 install  PyOpenGL PyOpenGL_accelerate
1
pip3 install Bottleneck

c参考资料:

SMPL模型改用python3+numpy计算

SMPL: A Skinned Multi-Person Linear Model

人体模型介绍 - SMPL

3D相关学术人员及Blog

浙大博士 https://52zju.cn/?paged=2 三维重建

SIFT

https://github.com/alicevision/popsift

SIFT即尺度不变特征变换,是用于图像处理领域的一种描述。这种描述具有尺度不变性,可在图像中检测出关键点,是一种局部特征描述子

一、SIFT算法特点:

1、具有较好的稳定性和不变性,能够适应旋转、尺度缩放、亮度的变化,能在一定程度上不受视角变化、仿射变换、噪声的干扰。

2、区分性好,能够在海量特征数据库中进行快速准确的区分信息进行匹配

3、多量性,就算只有单个物体,也能产生大量特征向量

4、高速性,能够快速的进行特征向量匹配

5、可扩展性,能够与其它形式的特征向量进行联合

二、SIFT算法实质

在不同的尺度空间上查找关键点,并计算出关键点的方向。
在这里插入图片描述

三、SIFT算法实现特征匹配主要有以下三个流程:

1、提取关键点:关键点是一些十分突出的不会因光照、尺度、旋转等因素而消失的点,比如角点、边缘点、暗区域的亮点以及亮区域的暗点。此步骤是搜索所有尺度空间上的图像位置。通过高斯微分函数来识别潜在的具有尺度和旋转不变的兴趣点。

2、定位关键点并确定特征方向:在每个候选的位置上,通过一个拟合精细的模型来确定位置和尺度。关键点的选择依据于它们的稳定程度。然后基于图像局部的梯度方向,分配给每个关键点位置一个或多个方向。所有后面的对图像数据的操作都相对于关键点的方向、尺度和位置进行变换,从而提供对于这些变换的不变性。

3、通过各关键点的特征向量,进行两两比较找出相互匹配的若干对特征点,建立景物间的对应关系。

四、尺度空间

1、概念

尺度空间即试图在图像领域中模拟人眼观察物体的概念与方法。例如:观察一颗树,关键在于我们想要观察是树叶子还是整棵树:如果是一整棵树(相当于大尺度情况下观察),那么就应该去除图像的细节部分。如果是树叶(小尺度情况下观察),那么就该观察局部细节特征。
SIFT算法在构建尺度空间时候采取高斯核函数进行滤波,使原始图像保存最多的细节特征,经过高斯滤波后细节特征逐渐减少来模拟大尺度情况下的特征表示。
利用高斯核函数进行滤波的主要原因有两个:
(1)高斯核函数是唯一的尺度不变核函数。
(2)DoG核函数可以近似为LoG函数,这样可以使特征提取更加简单。同时,David. Lowe作者在论文中提出将原始图像进行2倍上采样后滤波能够保留更多的信息便于后续特征提取与匹配。其实尺度空间图像生成就是当前图像与不同尺度核参数σ进行卷积运算后产生的图像。

2、表示

L(x, y, σ) ,定义为原始图像 I(x, y)与一个可变尺度的2维高斯函数G(x, y, σ) 卷积运算。

*表示卷积运算,(x,y)代表图像的像素位置。是尺度空间因子,值越小表示图像被平滑的越少,相应的尺度也就越小。大尺度对应于图像的概貌特征,小尺度对应于图像的细节特征。

五、高斯金字塔的构建

1、概念

尺度空间在实现时使用高斯金字塔表示,高斯金字塔的构建分为两步:
(1)对图像做高斯平滑;
(2)对图像做降采样。

图像的金字塔模型是指将原始图像不断降阶采样,得到一系列大小不一的图像,由大到小,从下到上构成的塔状模型。原图像为金子塔的第一层,每次降采样所得到的新图像为金字塔的一层(每层一张图像),每个金字塔共n层。为了让尺度体现其连续性,高斯金字塔在简单降采样的基础上加上了高斯滤波。如上图所示,将图像金字塔每层的一张图像使用不同参数做高斯模糊,Octave表示一幅图像可产生的图像组数,Interval表示一组图像包括的图像层数。另外,降采样时,高斯金字塔上一组图像的初始图像(底层图像)是由前一组图像的倒数第三张图像隔点采样得到的。

2、表示

高斯图像金字塔共o组、s层,则有

σ:尺度空间坐标;s:sub-level层坐标;σ0:初始尺度;S:每组层数(一般为3~5)
组内和组间尺度:

i:金字塔组数;n:每一组的层数

六、DOG空间极值检测

1、DOG函数

2、DoG高斯差分金字塔

(1)对应DOG算子,需构建DOG金字塔。
可以通过高斯差分图像看出图像上的像素值变化情况。(如果没有变化,也就没有特征。特征必须是变化尽可能多的点。)DOG图像描绘的是目标的轮廓。

(2)DOG局部极值检测
特征点是由DOG空间的局部极值点组成的。为了寻找DoG函数的极值点,每一个像素点要和它所有的相邻点比较,看其是否比它的图像域和尺度域的相邻点大或者小。特征点是由DOG空间的局部极值点组成的。为了寻找DoG函数的极值点,每一个像素点要和它所有的相邻点比较,看其是否比它的图像域和尺度域的相邻点大或者小。如下图,中间的检测点和它同尺度的8个相邻点和上下相邻尺度对应的9×2个点共26个点比较,以确保在尺度空间和二维图像空间都检测到极值点。

(2)去除边缘效应
在边缘梯度的方向上主曲率值比较大,而沿着边缘方向则主曲率值较小。候选特征点的DoG函数D(x)的主曲率与2×2Hessian矩阵H的特征值成正比。

其中,是候选点邻域对应位置的差分求得的。
H的特征值α和β代表x和y方向的梯度

表示矩阵H对角线元素之和,表示矩阵H的行列式。假设是α较大的特征值,而是β较小的特征值,令,则

该值在两特征值相等时达最小。Lowe论文中建议阈值T为1.2,即
时保留关键点,反之剔除

七、关键点方向分配

1、通过尺度不变性求极值点,需要利用图像的局部特征为给每一个关键点分配一个基准方向,使描述子对图像旋转具有不变性。对于在DOG金字塔中检测出的关键点,采集其所在高斯金字塔图像3σ邻域窗口内像素的梯度和方向分布特征。梯度的模值和方向如下:

2、本算法采用梯度直方图统计法,统计以关键点为原点,一定区域内的图像像素点确定关键点方向。在完成关键点的梯度计算后,使用直方图统计邻域内像素的梯度和方向。梯度直方图将0~360度的方向范围分为36个柱,其中每柱10度。如下图所示,直方图的峰值方向代表了关键点的主方向,方向直方图的峰值则代表了该特征点处邻域梯度的方向,以直方图中最大值作为该关键点的主方向。为了增强匹配的鲁棒性,只保留峰值大于主方向峰值80%的方向作为该关键点的辅方向。

八、关键点描述

对于每一个关键点,都拥有位置、尺度以及方向三个信息。为每个关键点建立一个描述符,用一组向量将这个关键点描述出来,使其不随各种变化而改变,比如光照变化、视角变化等等。这个描述子不但包括关键点,也包含关键点周围对其有贡献的像素点,并且描述符应该有较高的独特性,以便于提高特征点正确匹配的概率。

Lowe实验结果表明:描述子采用4×4×8=128维向量表征,综合效果最优(不变性与独特性)。

九、关键点匹配

1、分别对模板图(参考图,reference image)和实时图(观测图,
observation image)建立关键点描述子集合。目标的识别是通过两点集内关键点描述子的比对来完成。具有128维的关键点描述子的相似性度量采用欧式距离。

3、匹配可采取穷举法完成,但所花费的时间太多。所以一般采用kd树的数据结构来完成搜索。搜索的内容是以目标图像的关键点为基准,搜索与目标图像的特征点最邻近的原图像特征点和次邻近的原图像特征点。
Kd树如下如所示,是个平衡二叉树

十、总结

SIFT特征具有稳定性和不变性,在图像处理和计算机视觉领域有着很重要的作用。
1、DoG尺度空间的极值检测。
2、删除不稳定的极值点。
3、确定特征点的主方向
4、生成特征点的描述子进行关键点匹配。

参考资料

SIFT百科 https://baike.baidu.com/item/SIFT/1396275?fr=aladdin

SIFT算法详解 https://blog.csdn.net/zddblog/article/details/7521424

SIFT算法系列之尺度空间 https://blog.csdn.net/Small_Munich/article/details/79968229

SIFT特征详解 https://www.cnblogs.com/wangguchangqing/p/4853263.html

SIFT算法原理 https://blog.csdn.net/qq_37374643/article/details/88606351

[TOC]

3D建模

目前动画、游戏中使用的静态三维数字人体主要通过3D网格模型(英文一般叫mesh),贴上材质贴图来实现。

三维数字人体目前主要的方法有:

1.多视角几何重建(不同角度拍摄多张照片);

2.使用数字化人体表示模型预测网格

多视角几何重建

生成工具:

PhotoScan(商业软件)

MeshRoom(开源软件)

模型方法预测或生成3D网格

传统的基于骨架的Skinning方法有LBS, DQS, Implicit Skinning等,这些方法可以理解为产生了一个从骨架姿势(Posture of the skeleton)角色模型网格(Mesh of the character)的映射,输入是Posture,输出是Mesh,怎么产生的就是使用特定的方法,大多是几何物理方法等。

产生骨架姿势,可以用正向动力学(Forward Kinematics)、反向动力学(Inverse Kinematics)。

产生动画有几种思路,比如用网格(Mesh)内部的骨架(Skeleton)驱动,用Mesh外部的Cage驱动,用一些Handle来控制变形(在面部动画中经常使用,比如blend shape),用一些关键帧(Keyframes)插值得到中间的结果等。

数字化人体表示模型

SMPL

(A Skinned Multi-Person Linear Model)

SMPL-H

SMPL-X

SMPL-X (SMPL expressive)是针对SMPL模型的优化,增加了面部表情、手势姿态、脚的姿态以及人的性别,改进人体重建的3D细节。

Expressive Body Capture: 3D Hands, Face, and Body from a Single Image

https://smpl-x.is.tue.mpg.de/smpl-x.is.tue.mpg.de

有代码,实测可运行:

vchoutas/smplxgithub.com图标

Frank

Total Capture 2018 论文

LBS(Linear Blend Skinning)

中文名称:线性混合蒙皮

DQBS(Dual Quaternion Blend Skinning)

中文名称:双四元数蒙皮

[2005] SCAPE(Shape Completion and Animation of People)

官网:https://ai.stanford.edu/~drago/Projects/scape/scape.html

1579226914959

我们介绍了一种数据驱动的方法来构建涵盖对象形状和姿势变化的人体形状模型。该方法基于结合了关节变形和非刚性变形的表示。我们学习了一个姿态变形模型,该模型可以根据关节骨骼的姿态导出非刚性表面变形。我们还学习了基于体形的单独的变异模型。当两个模型都没有出现在训练集中时,可以将我们的两个模型结合起来以产生具有不同姿势的逼真的肌肉变形的3D表面模型。我们展示了如何将模型用于完成形状 -在指定目标形状的一组有限标记的情况下,生成完整的表面网格。我们介绍了形状完成在部分视图完成和运动捕捉动画中的应用。尤其是,我们的方法能够仅通过对单个移动物体进行一次静态扫描就可以构造出具有真实肌肉变形的移动物体的高质量动画表面模型。

Implicit Skinning

神经网络3D建模

[TOC]

3D 人体建模
HumanMesh Recovery CVPR 2018
HumanMeshNet 2019
HMR ICCV2019
Chained Representation Cycling
SPIN(SMPL OPtimization IN the loop)

Human Mesh Recovery CVPR2018

End-to-end Recovery of Human Shape and Pose

Human Mesh Recovery(HMR), 从单张彩色图片中恢复出3D 人体网格(包括人体形状和关节角度)

1579243110376

1579243115045

HMR-ICCV2019

标题:

下载: https://arxiv.org/pdf/1908.07172v2.pdf

Code: https://github.com/Arthur151/DSD-SATN

**简介:**本文描述了一种从单目图像和单目视频中恢复三维人体网格的端到端方法

HumanMeshNet

2019 Aug

印度 iiit,国际信息技术研究所

单目图像三维人体建模

1579228511503

semantic cholar

1579227847960

Chained Representation Cycling

苏黎世理工学院

一种新的图片转换3D模型的方法

2001.01613 [Chained Representation Cycling]Learning to Estimate 3D Human Pose and Shape by Cycling Between Representations.pdf

1579228149537

SPIN

(SMPL OPtimization IN the loop)

标题:<Learning to Reconstruct 3D Human Pose and Shape via Model-fitting in the Loop> ICCV2019

下载地址:https://arxiv.org/pdf/1909.12828v1.pdf

Code:https://github.com/nkolot/SPIN

**简介:**把optimization and regression做了一个结合:

img

技术流程:

img

Neal body fitting

基于SMPL

https://github.com/mohomran/neural_body_fitting

1579252060836

知名机构

Alicevision https://alicevision.org/#contributing

欧盟Horizon 2020研究与创新计划的资助

1
2
3
4
5
6
7
2010年,[IMAGINE](http://imagine.enpc.fr/)研究团队([巴黎理工学院](http://www.enpc.fr/en)与[法国](http://www.enpc.fr/en)[科学技术中心](http://international.cstb.fr/)联合研究小组)与Mikros Image围绕Pierre Moulon的论文建立了伙伴关系,由学术方面的Renaud Marlet和Pascal Monasse以及Benoit Maujean负责工业方面。2013年,他们发布了一个名为openMVG(“多视图几何”)的开源SfM管道,为创建[哑光绘画](https://en.wikipedia.org/wiki/Matte_painting)的视觉效果提供了更好的解决方案的基础。

2009年,CTU的CMP研究团队在Tomas Pajdla的指导下开始了Michal Jancosek的博士学位论文。他们在2012年发布了其MVS管道CMPMVS的Windows二进制文件。

2009年,INPT,INRIA和Duran Duboi启动了法国ANR项目,以基于自然特征和名为CCTag的新标记设计创建基于模型的相机跟踪解决方案。

2015年,Simula,INTT和Mikros Image共同参与了欧盟[POPART](http://www.popartproject.eu/)项目,以创建Previz系统。2017年,CTU加入了欧盟项目[LADIO中](http://www.ladioproject.eu/)的团队,创建了一个中央枢纽,可对在[现场](http://www.ladioproject.eu/)生成的所有数据进行结构化访问。

[toc]

FPN

Arch:

1577958895321

1577958921261

lateral connection & path way

1577958949126

ResNet的结构图:

这里写图片描述