# Fine-Tuning Vgg16 For Depth Estimation
### Introduction
This repository contains a set of python scripts to fine-tune a vgg16 model in order to do real-time depth estimation task
### Network Architecture
I've added a 1*1 conv in order to reduce the number of channels of the last conv layer from 512 to 128.This reduces the model size in order to make it fit in my poor GPU [2GB].
![img_1](./Arch.png)
Note: I think implementing a FC-Layers is an improper approach to do this task instead i am currently training a model using a simple Up-Conv technique , I've got that feeling after several failed training sessions and the FC-layers are discriminative by its' nature.
I've added a Scale-Invarient Loss because i think learning relative depth estimation is much easier.
![img_1](./loss.png)
### Dataset
I've used the NYU Depth V2 dataset.
### Training
For the FC Implementation : I am working on it, but currently i am stucked at 0.15 RMSE on training data and 0.45 RMSE on validation data.
For the Up-Conv Implementation : I've reached a 0.109 RMSE on Training data and a 0.165 RMSE on Validation data.
### Output
![img_1](./output.png)
Note : the provided output samples are predicted by the Up-Conv implementation
### Conclusion
I've used only 1449 image-depthmap pairs during this fine-tuning process, I think getting more data will help me to significantly improve my results.
Some tricks as the 1*1 conv can make life easier and training faster while preserving most of the model's capcity
Using Upsampling to upsize the last feature map makes it sparse "Around 75% of the weights are zeros" , I think using this Up-Projection block to Up-Sample the last feature map will help.
Note : This block was introduced into ["**Depth from a Single Image by Harmonizing Overcomplete Local Network Predictions**,"
](https://arxiv.org/abs/1605.07081) NIPS 2016.
Note : I've already implemented this paper. ["**DeeperDepthEstimation**,"
](https://github.com/MahmoudSelmy/DeeperDepthEstimation)
![img_1](./up_projection.png)
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
深度估计_微调VGG16实现更加好的深度估计_优质项目实战.zip (37个子文件)
深度估计_微调VGG16实现更加好的深度估计_优质项目实战
up_projection.png 55KB
data_preprocessing.py 2KB
Utills.py 2KB
Arch.png 36KB
output.png 68KB
vgg16.py 5KB
data
nyu_datasets
00000.jpg 33KB
00001.png 40KB
00003.jpg 25KB
00004.png 57KB
00001.jpg 36KB
00005.png 64KB
00003.png 47KB
00006.jpg 41KB
00005.jpg 36KB
00002.jpg 28KB
00000.png 52KB
00004.jpg 33KB
00002.png 38KB
00006.png 63KB
loss.png 3KB
HelperAPI.py 4KB
featuresextration.py 3KB
output
00001.png 13KB
00000_ground.png 13KB
00000.png 15KB
00001_ground.png 13KB
.idea
vcs.xml 180B
misc.xml 238B
modules.xml 300B
DepthVGGTransferLearning.iml 545B
DepthLoss.py 1KB
sub_train.csv 223B
train.csv 78KB
train.py 8KB
README.md 2KB
test.csv 1KB
共 37 条
- 1
资源评论
极智视界
- 粉丝: 2w+
- 资源: 1425
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功