# Im2Avatar: Colorful 3D Reconstruction from a Single Image
This work reconstructs colorful 3D model from a single-view image. We tested the proposed framework on [ShapeNet](https://www.shapenet.org) sub-database and selected 3D human meshes from [MakeHuman](http://www.makehuman.org).
[[Project]](https://liuziwei7.github.io/projects/Im2Avatar) [[Paper]](https://arxiv.org/abs/1804.06375)
<img src='./misc/demo_teaser.png' width=800>
## Data
We provided processed ground truth 3D color and 2D-to-3D appearance flow data. The data will be automatically downloaded for the first time running training script. Both color data and flow data are stored as 3D volumes, but with different channels (color data has 3 channels and flow data owns 2 channels).
* Color data ranges from 0 to 1 to represent normalized colors for occupied surface voxels, and uses -1 for empty voxels.
* Flow data ranges from 0 to 1 to represent normalized coordinates in the 2D images for occupied surface voxels, and uses -1 for empty voxels.
For each 3D model, 12 images are provided from different viewpoints. The data indices used for training, validating and testing can be found in the **data_list** folder. Specifically, the processed ShapeNet subdataset can be downloaded from [here](https://www.dropbox.com/s/s03fc1rx4ljkhix/ShapeNetCore_im2avatar.tar.gz), and Colorful Human dataset can be downloaded from [here](https://www.dropbox.com/s/imgiu8xump2zlvm/human_im2avatar.tar.gz).
<img src='./misc/demo_data.png' width=800>
## Requirements
* [TensorFlow](https://www.tensorflow.org/)
## ShapeNet Subdataset
### Train
The model is trained per category, change the category id when working on different categories.
| Category | Id |
| ------------- | ------------- |
| Car | 02958343 |
| Table | 04379243 |
| Guitar | 03467517 |
| Chair | 03001627 |
* Run shape training script for car category:
``` bash
python train_shape.py --cat_id 02958343
```
* Run color training script for car category:
``` bash
python train_color.py --cat_id 02958343
```
### Inference
* To generate testing shape volumes for car category:
``` bash
python inference_shape.py --cat_id 02958343
```
* To generate testing color volumes for car category:
``` bash
python inference_color.py --cat_id 02958343
```
### Eval
After generating all the shape and color volumes, evaluate surface PSNR and IoU.
Please change the category id correspondingly within each file!
* Evaluate surface PSNR:
``` bash
python eval_surface_psnr.py
```
* Evaluate IoU:
``` bash
python eval_iou.py
```
## Colorful Human Dataset
### Train
* Run shape training script:
``` bash
python train_shape_human.py
```
* Run color training script:
``` bash
python train_color_human.py
```
### Inference
* To generate testing shape volumes:
``` bash
python inference_shape_human.py
```
* To generate testing color volumes:
``` bash
python inference_color_human.py
```
## Citation
Please cite this paper if you want to use it in your work,
@article{sun2018im2avatar,
title={Im2Avatar: Colorful 3D Reconstruction from a Single Image},
author={Sun, Yongbin and Liu, Ziwei and Wang, Yue and Sarma, Sanjay E},
journal={arXiv preprint arXiv:1804.06375},
year={2018}
}
## License
MIT License
没有合适的资源?快使用搜索试试~ 我知道了~
Python-Im2Avatar基于TensorFlow实现的单幅图像的彩色3D重建
共35个文件
py:17个
txt:14个
png:2个
需积分: 50 17 下载量 15 浏览量
2019-08-11
08:21:25
上传
评论 2
收藏 1.23MB ZIP 举报
温馨提示
Im2Avatar: 基于TensorFlow实现的单幅图像的彩色3D重建
资源推荐
资源详情
资源评论
收起资源包目录
Python-Im2Avatar基于TensorFlow实现的单幅图像的彩色3D重建.zip (35个子文件)
im2avatar-master
train_color.py 6KB
models
model_color.py 8KB
model_shape.py 6KB
misc
demo_teaser.png 900KB
demo_data.png 227KB
train_shape.py 6KB
eval_iou.py 2KB
inference_shape.py 3KB
train_color_human.py 5KB
inference_color.py 3KB
eval_surface_psnr.py 5KB
LICENSE 1KB
data_list
test_list_02958343.txt 22KB
train_list_human.txt 6KB
val_list_03467517.txt 2KB
test_list_03001627.txt 14KB
val_list_02958343.txt 11KB
train_list_03467517.txt 14KB
test_list_03467517.txt 4KB
val_list_03001627.txt 7KB
train_list_02958343.txt 76KB
test_list_04379243.txt 16KB
train_list_03001627.txt 49KB
val_list_04379243.txt 8KB
train_list_04379243.txt 57KB
test_list_human.txt 748B
train_shape_human.py 5KB
inference_shape_human.py 3KB
README.md 3KB
utils
vol_utils.py 417B
dataset.py 5KB
tf_utils.py 27KB
img_utils.py 1KB
dataset_human.py 5KB
inference_color_human.py 3KB
共 35 条
- 1
资源评论
weixin_39840387
- 粉丝: 784
- 资源: 3万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 蓝桥杯2024年第十五届省赛真题-前缀总分
- com.qihoo.appstore_300101305-1.apk
- tensorflow-gpu-2.7.1-cp37-cp37m-manylinux2010-x86-64.whl
- tensorflow-2.7.2-cp37-cp37m-manylinux2010-x86-64.whl
- tensorflow-2.7.1-cp39-cp39-manylinux2010-x86-64.whl
- 蓝桥杯2024年第十五届省赛真题-传送阵
- com.qihoo.appstore_300101305.apk
- linux之线程同步一.doc
- keil5配色方案10种
- python烟花代码.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功