From dbd18e5272b068bd0c6c943330089f7d470a59e6 Mon Sep 17 00:00:00 2001 From: Aakaash Jois Date: Sat, 18 May 2019 19:46:16 -0400 Subject: [PATCH] Update package name Created first release on PyPi --- pytorch_goturn/Goturn.py => GoTurn/Model.py | 4 ++-- GoTurn/__init__.py | 1 + README.rst | 12 ++++++------ pytorch_goturn/__init__.py | 1 - setup.py | 19 +++++++++++++------ 5 files changed, 22 insertions(+), 15 deletions(-) rename pytorch_goturn/Goturn.py => GoTurn/Model.py (98%) create mode 100644 GoTurn/__init__.py delete mode 100644 pytorch_goturn/__init__.py diff --git a/pytorch_goturn/Goturn.py b/GoTurn/Model.py similarity index 98% rename from pytorch_goturn/Goturn.py rename to GoTurn/Model.py index 8569cc6..7059ae9 100644 --- a/pytorch_goturn/Goturn.py +++ b/GoTurn/Model.py @@ -3,9 +3,9 @@ from torch import nn -class Goturn(nn.Module): +class Model(nn.Module): def __init__(self, pretrained=None): - super(Goturn, self).__init__() + super(Model, self).__init__() self.features_previous = nn.Sequential() self.features_previous.add_module('conv11', nn.Conv2d(in_channels=3, out_channels=96, kernel_size=11, stride=4)) self.features_previous.add_module('relu11', nn.ReLU()) diff --git a/GoTurn/__init__.py b/GoTurn/__init__.py new file mode 100644 index 0000000..eb5e192 --- /dev/null +++ b/GoTurn/__init__.py @@ -0,0 +1 @@ +from .Goturn import Model diff --git a/README.rst b/README.rst index 7e8ccfb..2abbfa0 100644 --- a/README.rst +++ b/README.rst @@ -1,5 +1,5 @@ ============== -pytorch_goturn +goturn_pytorch ============== A PyTorch port of GOTURN tracker ________________________________ @@ -7,19 +7,19 @@ ________________________________ **Installation:** 1. Download this repository - 2. navigate to the root of the repository and run :code:`pip install .` + 2. navigate to the root of the repository and run :code:`pip install goturn_pytorch` **Usage:** To create the model, - ``from pytorch_goturn import Goturn`` + ``from GoTurn import Model`` - ``goturn = Goturn()`` + ``goturn = Model()`` To create a pretrained model, - ``from pytorch_goturn import Goturn`` + ``from GoTurn import Model`` - ``goturn = Goturn(pretrained="path_to_weights.pkl")`` + ``goturn = Model(pretrained="path_to_weights.pkl")`` The :code:`weights.pkl` file is located at the root of the repository. diff --git a/pytorch_goturn/__init__.py b/pytorch_goturn/__init__.py deleted file mode 100644 index 81dd992..0000000 --- a/pytorch_goturn/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .Goturn import Goturn diff --git a/setup.py b/setup.py index ace973a..36a0fec 100644 --- a/setup.py +++ b/setup.py @@ -1,8 +1,17 @@ from setuptools import setup +from os import path -setup(name='pytorch-goturn', - version='1.0', +DIR = path.dirname(path.abspath(__file__)) + +with open(path.join(DIR, 'README.rst')) as f: + README = f.read() + +setup(name='goturn_pytorch', + packages=['GoTurn'], description='A PyTorch port of GOTURN tracker', + long_description=README, + install_requires=['torch'], + version='1.0', url='https://github.com/aakaashjois/PyTorch-GOTURN', classifiers=[ 'Development Status :: 5 - Production/Stable', @@ -10,9 +19,7 @@ 'Programming Language :: Python :: 3.7', 'Topic :: Scientific/Engineering :: Artificial Intelligence', ], + keywords=['machine-learning', 'pytorch', 'deep-learning'], author='Aakaash Jois', author_email='aakaashjois@gmail.com', - license='MIT', - packages=['pytorch_goturn'], - install_requires=['torch'], - zip_safe=False) + license='MIT')