Giter Site home page Giter Site logo

microsoft / pysiamtracking Goto Github PK

View Code? Open in Web Editor NEW
28.0 11.0 11.0 8.15 MB

PySiamTracking project provides a flexible and effective framework that supports mainstream siamese-network-based trackers.

License: MIT License

Shell 0.10% Python 87.16% C 4.76% C++ 3.53% Cuda 4.45%

pysiamtracking's Introduction

PySiamTracking

Introduction

PySiamTracking is an open source toolbox that supports a series of siamese-network-based tracking methods like SiamFC / SiamRPN / SPM. It's built based on PyTorch.

We follow the modular design in mmdetection. The components in a typical siamese-network-based tracker (e.g. backbone, fusion module, post head, loss functions, ...) are decomposed so that it is easy to verify the effectiveness of each component. One can also easily replace some components with the customized modules. We hope this project can help to the research in visual object tracking.

Benchmark and Model Zoo

We provide dozens of models trained on 4 datasets: COCO, TrackingNet, LaSOT-train, GOT10K. For more information, please visit to Model Zoo.

Getting Started

Requirement

  • Linux (Ubuntu 16.04 is tested)
  • Python > 3.5 (Python 3.6 is tested)
  • CUDA >= 9.0 (CUDA 9.0 & 10.0 are tested)

Installation

  1. (Recommend) Create a new virtual environment and install PyTorch >= 1.0.
conda create -n siamtracking python=3.6 -y
conda activate siamtracking
# please select a suitable version for your device
conda install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=10.0 -c pytorch
  1. Clone this repository.
  2. Install some necessary python packages
pip install --upgrade pip
pip install -r requirements.txt
  1. Compile some custom operations.
bash ./compile.sh

Play with pre-trained models

The pre-trained models can be downloaded from Model Zoo. See INFERENCE.md for more detailed instruction.

Training models

Please see TRAIN.md for more details about training.

Reference


This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

pysiamtracking's People

Contributors

andiceluo avatar microsoftopensource avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pysiamtracking's Issues

code bug!?

  • 1、I only have the GOT10k data set for the time being. When I use the script to generate the cut image, I found that the image cannot be read, and the debug finds that there is a problem with the file path.
    I added two lines of code in converter.py for the time being (for got10k), as follows

image

Hope to fix this bug!

  • 2、The following errors occurred during training:

Connected to pydev debugger (build 193.5233.109)
2020-04-05 21:11:43,790 - INFO - Set random seed to 7
2020-04-05 21:11:43,840 - INFO - Loading pretrained model from data/pretrained_models/resnet18.pth
Traceback (most recent call last):
File "/opt/pycharm-anaconda-2019.3/plugins/python/helpers/pydev/pydevd.py", line 1434, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "/opt/pycharm-anaconda-2019.3/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/home/bluo/git_clone/PySiamTracking/tools/train_tracker.py", line 93, in
gpus=cfg.gpus)
File "/home/bluo/git_clone/PySiamTracking/siam_tracker/models/builder.py", line 57, in build_train_wrapper
train_wrapper = TRAIN_WRAPPERS.get_module(training_type)(train_cfg=train_cfg, *args, kwargs)
File "/home/bluo/git_clone/PySiamTracking/siam_tracker/models/train_wrappers/pairwise_wrapper.py", line 44, in init
train_dataset = TrainPairDataset(train_cfg.train_data)
File "/home/bluo/git_clone/PySiamTracking/siam_tracker/datasets/train_pair_dataset.py", line 23, in init
self._load_datasets(data_cfg.datasets)
File "/home/bluo/git_clone/PySiamTracking/siam_tracker/datasets/train_pair_dataset.py", line 101, in _load_datasets
self.dataset_list.append(ImageDataset(
_cfg)) # !
File "/home/bluo/git_clone/PySiamTracking/siam_tracker/datasets/image_dataset.py", line 51, in init
self._load_dataset()
File "/home/bluo/git_clone/PySiamTracking/siam_tracker/datasets/image_dataset.py", line 191, in _load_dataset
self._load_pkl_annotation(anno_file_path)
File "/home/bluo/git_clone/PySiamTracking/siam_tracker/datasets/image_dataset.py", line 175, in _load_pkl_annotation
assert valid_inds[0]
AssertionError

Debug found that whenever seq_id=4224, valid_inds=False, I know this is to delete some invalid boxes, but why not continue to execute?

pysiamtracking_image_dataset

Issue with Preprocessing

I downloaded coco dataset 2017 and its annotation file and tried to follow the train.md file
in Preprocessing I provide the path to my train2017 folder (unzipped) and instances_train2017.json (unzipped)
in the end its giving me errors like list indices must be integers or slices, not list. I felt there is an issue with the way i pass the data.

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.