Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
models
提交
7745eaf2
M
models
项目概览
PaddlePaddle
/
models
大约 1 年 前同步成功
通知
222
Star
6828
Fork
2962
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
602
列表
看板
标记
里程碑
合并请求
255
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
models
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
602
Issue
602
列表
看板
标记
里程碑
合并请求
255
合并请求
255
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
7745eaf2
编写于
2月 25, 2020
作者:
D
Double_V
提交者:
GitHub
2月 25, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update vot code (#4338)
上级
7ec3ec11
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
17 addition
and
16 deletion
+17
-16
PaddleCV/tracking/README.md
PaddleCV/tracking/README.md
+5
-3
PaddleCV/tracking/pytracking/eval_benchmark.py
PaddleCV/tracking/pytracking/eval_benchmark.py
+3
-3
PaddleCV/tracking/pytracking/libs/optimization.py
PaddleCV/tracking/pytracking/libs/optimization.py
+3
-3
PaddleCV/tracking/pytracking/parameter/atom/default_vot.py
PaddleCV/tracking/pytracking/parameter/atom/default_vot.py
+6
-7
未找到文件。
PaddleCV/tracking/README.md
浏览文件 @
7745eaf2
# tracking 单目标跟踪框架
# tracking 单目标跟踪框架
##
目标跟踪
介绍
## 介绍
tracking 是基于百度深度学习框架Paddle研发的视频单目标跟踪(Visual Object Tracking, VOT)库, 整体框架参考
[
pytracking
](
https://github.com/visionml/pytracking
)
,其优秀的设计使得我们能够方便地将其他跟踪器如SiamFC,SiamRPN,SiamMask等融合到一个框架中,方便后续统一的实验和比较。
tracking 是基于百度深度学习框架Paddle研发的视频单目标跟踪(Visual Object Tracking, VOT)库, 整体框架参考
[
pytracking
](
https://github.com/visionml/pytracking
)
,其优秀的设计使得我们能够方便地将其他跟踪器如SiamFC,SiamRPN,SiamMask等融合到一个框架中,方便后续统一的实验和比较。
当前tracking涵盖当前目标跟踪的主流模型,包括SiamFC, SiamRPN, SiamMask, ATOM。tracking旨在给开发者提供一系列基于PaddlePaddle的便捷、高效的目标跟踪深度学习算法,后续会不断的扩展模型的丰富度。
当前tracking涵盖当前目标跟踪的主流模型,包括SiamFC, SiamRPN, SiamMask, ATOM。tracking旨在给开发者提供一系列基于PaddlePaddle的便捷、高效的目标跟踪深度学习算法,后续会不断的扩展模型的丰富度。
##
目标跟踪库的
代码目录结构
## 代码目录结构
```
```
...
@@ -36,7 +36,7 @@ pytracking 包含跟踪代码
...
@@ -36,7 +36,7 @@ pytracking 包含跟踪代码
### 数据准备
### 数据准备
目标跟踪的训练集和测试集是不同的,目前最好的模型往往是使用多个训练集进行训练。
常用的数据集如下:
目标跟踪的训练集和测试集是不同的,目前最好的模型往往是使用多个训练集进行训练。
主流的训练数据集有:
主流的训练数据集有:
-
[
VID
](
http://bvisionweb1.cs.unc.edu/ilsvrc2015/ILSVRC2015_VID.tar.gz
)
-
[
VID
](
http://bvisionweb1.cs.unc.edu/ilsvrc2015/ILSVRC2015_VID.tar.gz
)
...
@@ -60,6 +60,8 @@ tracking的工作环境:
...
@@ -60,6 +60,8 @@ tracking的工作环境:
-
python3
-
python3
-
PaddlePaddle1.7
-
PaddlePaddle1.7
> 注意:如果遇到cmath无法import的问题,建议切换Python版本,建议使用python3.6.8, python3.7.0
### 安装依赖
### 安装依赖
1.
安装paddle,需要安装1.7版本的Paddle,如低于这个版本,请升级到Paddle 1.7.
1.
安装paddle,需要安装1.7版本的Paddle,如低于这个版本,请升级到Paddle 1.7.
...
...
PaddleCV/tracking/pytracking/eval_benchmark.py
浏览文件 @
7745eaf2
...
@@ -19,9 +19,9 @@ CURRENT_DIR = osp.dirname(__file__)
...
@@ -19,9 +19,9 @@ CURRENT_DIR = osp.dirname(__file__)
sys
.
path
.
append
(
osp
.
join
(
CURRENT_DIR
,
'..'
))
sys
.
path
.
append
(
osp
.
join
(
CURRENT_DIR
,
'..'
))
from
pytracking.admin.environment
import
env_settings
from
pytracking.admin.environment
import
env_settings
from
pytracking.pysot_toolkit.datasets
import
DatasetFactory
from
pytracking.pysot_toolkit.
pysot.
datasets
import
DatasetFactory
from
pytracking.pysot_toolkit.evaluation
import
EAOBenchmark
,
AccuracyRobustnessBenchmark
,
OPEBenchmark
from
pytracking.pysot_toolkit.
pysot.
evaluation
import
EAOBenchmark
,
AccuracyRobustnessBenchmark
,
OPEBenchmark
from
pytracking.pysot_toolkit.utils.region
import
vot_overlap
from
pytracking.pysot_toolkit.
pysot.
utils.region
import
vot_overlap
parser
=
argparse
.
ArgumentParser
(
description
=
'tracking evaluation'
)
parser
=
argparse
.
ArgumentParser
(
description
=
'tracking evaluation'
)
...
...
PaddleCV/tracking/pytracking/libs/optimization.py
浏览文件 @
7745eaf2
...
@@ -394,7 +394,7 @@ class ConjugateGradient(ConjugateGradientBase):
...
@@ -394,7 +394,7 @@ class ConjugateGradient(ConjugateGradientBase):
fetch_list
=
[
v
.
name
for
v
in
self
.
f0
])
fetch_list
=
[
v
.
name
for
v
in
self
.
f0
])
res
=
TensorList
(
res
)
res
=
TensorList
(
res
)
loss
=
self
.
problem
.
ip_output
(
res
,
res
)
loss
=
self
.
problem
.
ip_output
(
res
,
res
)
print
(
'Paddle Loss: {}'
.
format
(
loss
))
#
print('Paddle Loss: {}'.format(loss))
class
GaussNewtonCG
(
ConjugateGradientBase
):
class
GaussNewtonCG
(
ConjugateGradientBase
):
...
@@ -614,7 +614,7 @@ class GaussNewtonCG(ConjugateGradientBase):
...
@@ -614,7 +614,7 @@ class GaussNewtonCG(ConjugateGradientBase):
fetch_list
=
[
v
.
name
for
v
in
self
.
f0
])
fetch_list
=
[
v
.
name
for
v
in
self
.
f0
])
res
=
TensorList
(
res
)
res
=
TensorList
(
res
)
loss
=
self
.
problem
.
ip_output
(
res
,
res
)
loss
=
self
.
problem
.
ip_output
(
res
,
res
)
print
(
'Paddle Loss: {}'
.
format
(
loss
))
#
print('Paddle Loss: {}'.format(loss))
class
GradientDescentL2
:
class
GradientDescentL2
:
...
@@ -691,7 +691,7 @@ class GradientDescentL2:
...
@@ -691,7 +691,7 @@ class GradientDescentL2:
fetch_list
=
[
self
.
loss
.
name
]
+
grad_names
)
fetch_list
=
[
self
.
loss
.
name
]
+
grad_names
)
if
self
.
debug
:
if
self
.
debug
:
loss
=
res
[
0
]
loss
=
res
[
0
]
print
(
'Paddle Loss: {}'
.
format
(
loss
))
#
print('Paddle Loss: {}'.format(loss))
grad
=
TensorList
(
res
[
1
:])
grad
=
TensorList
(
res
[
1
:])
...
...
PaddleCV/tracking/pytracking/parameter/atom/default_vot.py
浏览文件 @
7745eaf2
import
numpy
as
np
import
numpy
as
np
from
pytracking.features.deep
import
ResNet50
from
pytracking.features.deep
import
ResNet
18
,
ResNet
50
from
pytracking.features.extractor
import
MultiResolutionExtractor
from
pytracking.features.extractor
import
MultiResolutionExtractor
from
pytracking.utils
import
TrackerParams
,
FeatureParams
from
pytracking.utils
import
TrackerParams
,
FeatureParams
...
@@ -42,7 +42,9 @@ def parameters():
...
@@ -42,7 +42,9 @@ def parameters():
params
.
train_skipping
=
10
# How often to run training (every n-th frame)
params
.
train_skipping
=
10
# How often to run training (every n-th frame)
# Online model parameters
# Online model parameters
deep_params
.
kernel_size
=
(
4
,
4
)
# Kernel size of filter
# deep_params.kernel_size = (4, 4) # when slice double grad is support,
# else, deep_params.kernel_size = (5, 5)
deep_params
.
kernel_size
=
(
5
,
5
)
# Kernel size of filter
deep_params
.
compressed_dim
=
64
# Dimension output of projection matrix
deep_params
.
compressed_dim
=
64
# Dimension output of projection matrix
deep_params
.
filter_reg
=
1e-1
# Filter regularization factor
deep_params
.
filter_reg
=
1e-1
# Filter regularization factor
deep_params
.
projection_reg
=
1e-4
# Projection regularization factor
deep_params
.
projection_reg
=
1e-4
# Projection regularization factor
...
@@ -104,11 +106,8 @@ def parameters():
...
@@ -104,11 +106,8 @@ def parameters():
# Setup the feature extractor (which includes the IoUNet)
# Setup the feature extractor (which includes the IoUNet)
deep_fparams
=
FeatureParams
(
feature_params
=
[
deep_params
])
deep_fparams
=
FeatureParams
(
feature_params
=
[
deep_params
])
deep_feat
=
ResNet50
(
deep_feat
=
ResNet18
(
net_path
=
'/home/vis/bily/code/baidu/personal-code/libi-13/paddle_ATOMnet-ep0040'
,
output_layers
=
[
'block2'
],
fparams
=
deep_fparams
,
normalize_power
=
2
)
output_layers
=
[
'block2'
],
fparams
=
deep_fparams
,
normalize_power
=
2
)
params
.
features
=
MultiResolutionExtractor
([
deep_feat
])
params
.
features
=
MultiResolutionExtractor
([
deep_feat
])
params
.
vot_anno_conversion_type
=
'preserve_area'
params
.
vot_anno_conversion_type
=
'preserve_area'
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录