stvir / pysot Goto Github PK
View Code? Open in Web Editor NEWSenseTime Research platform for single object tracking, implementing algorithms like SiamRPN and SiamMask.
License: Apache License 2.0
SenseTime Research platform for single object tracking, implementing algorithms like SiamRPN and SiamMask.
License: Apache License 2.0
how the set config.yaml?
and other operation
Thanks for your work.
I used the following command under ''/experiments/siammask_r50_l3/'':
CUDA_VISIBLE_DEVICES=0 # change your cuda visible devices here
python -m torch.distributed.launch --nproc_per_node=1 --master_port=2333 ../../tools/train.py --cfg config.yaml
But I encountered an error when I trained siammask:
Traceback (most recent call last):
File "../../tools/train.py", line 316, in <module>
main()
File "../../tools/train.py", line 311, in main
train(train_loader, dist_model, optimizer, lr_scheduler, tb_writer)
File "../../tools/train.py", line 211, in train
outputs = model(data)
File "/data/anaconda3/envs/tang0.4.1/lib/python3.7/site-packages/torch/nn/modules/module.py", line 477, in __call__
result = self.forward(*input, **kwargs)
File "/data/anaconda3/envs/tang0.4.1/lib/python3.7/site-packages/pysot/utils/distributed.py", line 43, in forward
return self.module(*args, **kwargs)
File "/data/anaconda3/envs/tang0.4.1/lib/python3.7/site-packages/torch/nn/modules/module.py", line 477, in __call__
result = self.forward(*input, **kwargs)
File "/data/anaconda3/envs/tang0.4.1/lib/python3.7/site-packages/pysot/models/model_builder.py", line 113, in forward
outputs['total_loss'] += cfg.TRAIN.MASK_WEIGHT * mask_loss
TypeError: unsupported operand type(s) for *: 'int' and 'NoneType'
Could you please tell me how to run train.py correctly?
Thank you very much!
您好!
非常感谢你们开源工作,不知道能否提供百度云链接下载;国内谷歌云下载很不稳定,经常下载失败。
ImportError: cannot import name region @
Thank you for your work, Could I run train.py in single GPU?what should I do? When I run 'train.py' directly, I get the following error:Traceback (most recent call last):
File "../../tools/train.py", line 314, in
main()
File "../../tools/train.py", line 256, in main
rank, world_size = dist_init()
File "/home/db/Subject/pysot/pysot/utils/distributed.py", line 104, in dist_init
rank, world_size = _dist_init()
File "/home/db/Subject/pysot/pysot/utils/distributed.py", line 83, in _dist_init
rank = int(os.environ['RANK'])
File "/home/db/anaconda3/envs/pysot/lib/python3.7/os.py", line 678, in getitem
raise KeyError(key) from None
KeyError: 'RANK'
is it ok for cuda 9.0 9.1 9.2 ,torch0.4.0?
can you offer the baidu wangpan for training dataset ?
thanks
TRAIN.md
Testing
python -u ../tools/test.py
--snapshot {}
--config config.py \
should be:
python -u ../../tools/test.py
--snapshot {}
--config config.yaml \
importError: cannot import name 'region',总是出现该错误,使用pip install region也显示安装成功了,我想咨询下这个是什么原因
RuntimeError: PyTorch was compiled without NumPy support
这个怎么解决呀?得用什么版本的numpy呀
When processing training dataset, how to generate corresponding annotations after cropping the training dataset?
I have
export PYTHONPATH=/home/cbl/PycharmProjects/pysot-master/pysot:$PYTHONPATH
Hi;
I want to save the model graph, but it occur errors when I save it via tb_writer.add_graph.
it seems like this issue: lanpa/tensorboardX#220
who can help me to visual network structure?
Traceback (most recent call last):
File "../../tools/train.py", line 378, in
main()
File "../../tools/train.py", line 327, in main
os.makedirs(cfg.TRAIN.LOG_DIR)
File "/home/public/anaconda3/lib/python3.6/os.py", line 220, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: './logs'
there is no cfg.TRAIN.LOG_DIR in the config.yaml
why os.makedirs(cfg.TRAIN.LOG_DIR)?
when use one node
File "/home/public/anaconda3/lib/python3.6/os.py", line 669, in getitem
raise KeyError(key) from None
KeyError: 'RANK'
The following error is encountered during (file pysot/testing_dataset/GOT-10k/GOT-10k_new.json, line 60)
with open(os.path.join(dataset_root, name+'_new.json'), 'r') as f:
This is due to the missing file GOT-10k_new.json which can neither be found on BaiduYun disk nor Google Drive. Would you mind upload this missing file? Thanks in advance.
Since you've stated that you only tested on Linux I wanted to let you know that your code works flawless for me on Windows as well.
https://github.com/STVIR/pysot/blob/master/INSTALL.md#installation
Thanks for sharing!
eval.py载入多个算法时
trackers = glob(os.path.join(args.tracker_path, args.dataset, args.tracker_prefix+'*'))
trackers = [x.split('/')[-1] for x in trackers]
这样语法会存在错误吧,是不是应该改成
trackers = args.tracker_prefix.split(" ")
Excuse me, can I run under @the window system?
self.search_cls_conv = nn.Conv2d(feature_in,
feature_in * cls_output, kernel_size=3)
self.search_loc_conv = nn.Conv2d(feature_in,
feature_in * loc_output, kernel_size=3)
should be :
self.search_cls_conv = nn.Conv2d(feature_in,
feature_in, kernel_size=3)
self.search_loc_conv = nn.Conv2d(feature_in,
feature_in, kernel_size=3)
请问如何不通过命令行运行train.py?目前我直接在运行test.py 可以,但是直接运行train.py:
File "/home/public/anaconda3/lib/python3.6/os.py", line 669, in getitem
raise KeyError(key) from None
KeyError: 'RANK'
请问如何在代码中设置:
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7
python -m torch.distributed.launch
--nproc_per_node=8
--master_port=2333
../../tools/train.py --cfg config.yaml
中的值,使得可以直接在pycharm运行train.py,
谢谢您的回复。
I evaluated the official checkpoint siamrpn_r50_l234_dwxcorr
on VOT2018, I found that if i drop out bounding box smoothness , it only got about 0.36 EAO (fast away from 0.41 using smoothness). It shows that this post-processing
refinement is important to boost the performance. But, why it was not mentioned at all in the paper?
Would you mind, if possible, indicate in pysot/MODEL_ZOO.md the training data sources of each reported model for fair comparison purpose? Thanks a lot in advance.
Hi,
when running the training for siamrpn_alex_dwxcorr as described, I always run into an error that seems to be related to tensor shapes:
Traceback (most recent call last):
File "../../tools/train.py", line 316, in
main()
File "../../tools/train.py", line 311, in main
train(train_loader, dist_model, optimizer, lr_scheduler, tb_writer)
File "../../tools/train.py", line 211, in train
outputs = model(data)
File "/home/users/kob/mastera/pysot/venv/lib/python3.5/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/home/users/kob/mastera/pysot/pysot/utils/distributed.py", line 43, in forward
return self.module(*args, **kwargs)
File "/home/users/kob/mastera/pysot/venv/lib/python3.5/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/home/users/kob/mastera/pysot/pysot/models/model_builder.py", line 103, in forward
loc_loss = weight_l1_loss(loc, label_loc, label_loc_weight)
File "/home/users/kob/mastera/pysot/pysot/models/loss.py", line 33, in weight_l1_loss
diff = (pred_loc - label_loc).abs()
RuntimeError: The size of tensor a (17) must match the size of tensor b (25) at non-singleton dimension 4
/home/public/anaconda3/bin/python -u ../../tools/test.py --snapshot model.pth --dataset VOT2018 --config config.yaml
but:ModuleNotFoundError: No module named 'pysot'
Hi, I want to train the alexnet with your training code on VID dataset, is there any backbone use the same structure as SiamRPN++? Means random shift and depth-wise cross correlation used even in alexnet.
从评估的baselines看,pysot是不是只提供了SiamRPN++和SiamMask加上几种backbone的模型,其他三种DaSiamRPN、SiamRPN、SiamFC没有提供,没找到可下载的链接。
May I ask how to solve this error when running the demo.py.
File "/home/shiyuanyuan/anaconda3/envs/pysot/lib/python3.7/site-packages/torch/nn/modules/module.py", line 719, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for ModelBuilder:
Missing key(s) in state_dict:
I want to test trackers on VOT2019 dataset. Can you tell me how to write a json file for the new dataset?
Is this directory still empty? When can you update?
class MultiRPN(RPN):
def __init__(self, anchor_num, in_channels, weighted=False):
super(MultiRPN, self).__init__()
self.weighted = weighted
for i in range(len(in_channels)):
self.add_module('rpn'+str(i+2),
DepthwiseRPN(anchor_num, in_channels[i], in_channels[i]))
if self.weighted:
self.cls_weight = nn.Parameter(torch.ones(len(in_channels)))
self.loc_weight = nn.Parameter(torch.ones(len(in_channels)))
def forward(self, z_fs, x_fs):
cls = []
loc = []
for idx, (z_f, x_f) in enumerate(zip(z_fs, x_fs), start=2):
rpn = getattr(self, 'rpn'+str(idx))
c, l = rpn(z_f, x_f)
cls.append(c)
loc.append(l)
if self.weighted:
cls_weight = F.softmax(self.cls_weight, 0)
loc_weight = F.softmax(self.loc_weight, 0)
def avg(lst):
return sum(lst) / len(lst)
def weighted_avg(lst, weight):
s = 0
for i in range(len(weight)):
s += lst[i] * weight[i]
return s
if self.weighted:
return weighted_avg(cls, cls_weight), weighted_avg(loc, loc_weight)
else:
return avg(cls), avg(loc)
where did you change the weight? It seems
cls_weight = F.softmax(self.cls_weight, 0)
loc_weight = F.softmax(self.loc_weight, 0)
will get a mean version.
请问如何不通过命令行运行train.py?目前我直接在运行test.py 可以,但是直接运行train.py:
File "/home/public/anaconda3/lib/python3.6/os.py", line 669, in getitem
raise KeyError(key) from None
KeyError: 'RANK'
请问如何在代码中设置:
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7
python -m torch.distributed.launch
--nproc_per_node=8
--master_port=2333
../../tools/train.py --cfg config.yaml
中的值,使得可以直接在pycharm运行train.py,
谢谢您的回复。
when do you offer the training code ?
thanks
你好。非常感谢提供的开源资源。在配置好环境后,运行python bin/eval.py报错。pyxbld/temp.linux-x86_64-3.7/pyrex/pysot/utils/region.c:594:24: fatal error: src/region.h: No such file or directory
#include "src/region.h"
现在找不到错误的原因,可否提供帮助
why I run it and false
conda create --name pysot python=3.7
conda activate pysot
CondaHTTPError: HTTP 404 NOT FOUND for url https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch/repodata.json
Elapsed: 00:09.424438
The remote server could not find the noarch directory for the
requested channel with url: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
As of conda 4.3, a valid channel must contain a noarch/repodata.json
and
associated noarch/repodata.json.bz2
file, even if noarch/repodata.json
is
empty. please request that the channel administrator create
noarch/repodata.json
and associated noarch/repodata.json.bz2
files.
$ mkdir noarch
$ echo '{}' > noarch/repodata.json
$ bzip2 -k noarch/repodata.json
You will need to adjust your conda configuration to proceed.
Use conda config --show channels
to view your configuration's current state.
Further configuration help can be found at https://conda.io/docs/config.html.
Hi, as I followed the instruction of install.md, I encountered the c1.exe failed with exit status 2 problem when I run python setup.py build_ext --inplace. How can I fix it?
Thanks a lot.
Hi, you said we should download models in PySOT Model Zoo and put the model.pth in the correct directory in experiments
But When I clicked the url link of siamrpn_r50_l234_dwxcorr on https://github.com/STVIR/pysot/blob/master/MODEL_ZOO.md, the web went to https://drive.google.com/open?id=1Q4-1563iPwV6wSf_lBHDj5CPFiGSlEPG which I can not open
to Download testing datasets ,
how to set the dataset?
could you say the detail of it ?
thanks
RT. Can you make some explanations, thanks.
Hi,
Is there a way to use the pretrained baseline models as base for the training, rather than just the pretrained backbones?
I want to train a model on a new dataset and don't want to retrain it with the provided four.
conda list:
cython 0.29.7 py37he6710b0_0 defaults
我执行:sudo python setup.py build_ext --inplace
出现错误:
Traceback (most recent call last):
File "setup.py", line 3, in
from Cython.Build import cythonize
ImportError: No module named 'Cython'
我明明已经装了Cython了,为什么还报错呢?
Hi, I'm wondering why it is named "SiamRPN", where I think it's more like "SiamSSD" since it is single staged. Just curious.
Dear authors!
the pre-trained baseline models were trained by VID and youtube-bb dataset? or just VID is enough? I trained on VID and filter some large objects but the model overfits a lot. Any training details i will appreciate so much
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.