Giter VIP home page Giter VIP logo

dr_3dfm's Introduction

Differential Render based 3D Finger Reconstruction

基于可微渲染器的三维手指重建

Requirements

  • Python >= 3.5 (3.6 recommended)
  • Training : pytorch>=1.0
  • Deploy:ncnn
  • Protobuf
  • torchvision>=0.4.0
  • tqdm
  • kaolin=0.1 注意:kaolin0.1源码有bug,需要修改源码再编译安装kaolin0.1,修改处为: 将修改后的base.py, example.py, perspective.py覆盖掉原来的 examples/renderers/DIB-R kaolin/graphics/dib_renderer/renderer kaolin/graphics/dib_renderer/utils

使用方法

训练:python train.py -c config.json

文件夹目录

.
├── base :储存data_loader,网络,训练器的基类
├── config.json:配置文件
├── data:数据csv文件夹
├── data_loader:data_loader具体实现
├── logger:日志器代码实现
├── loss:损失
├── model:网络模型
├── parse_config.py:参数压缩加载
├── requirements.txt:依赖
├── saved:保存的模型、代码、日志都会在这
├── test.py:测试代码接口
├── trainer:训练器代码实现
├── train.py:训练代码接口
└── utils:小组件代码

如何更改训练网络

  1. 在model文件夹中添加网络代码
  2. 网络类继承自nn.Model类 在forward方法中实现输入图片x,输出logit的功能 在extract_feature方法中实现输入图片x,输出特征f的功能
  3. model/model.py中添加from model.文件名 import 网络类名
  4. 在config.json中修改arch字段的type属性为网络类名

如何更改训练数据集

  1. 训练文件和测试csv文件都在data/csv
  2. 训练csv文件格式为: 表头:number,flag,img_path,label,分别表示序号,是否为训练,图片路径和subject标签
  3. 测试csv文件格式为: 表头:number,flag,img1_path,img2_path,分别表示序号,是否为类内样本,图片1路径,图片2路径
  4. 制作好对应的csv后,在config.json中修改data_loader/args字段的data_dirtest_dir属性
  5. 修改arch/args下的num_classes属性为训练集中的类别数

如何更改train/test

修改trainer/trainer.py_train_epoch_valid_epoch

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.