Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
food-round2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Joel Joseph
food-round2
Commits
86dd9979
Commit
86dd9979
authored
6 years ago
by
Kai Chen
Browse files
Options
Downloads
Plain Diff
Merge branch 'dev' of github.com:hellock/mmdetection into dev
parents
c136b5f4
9c65231a
No related branches found
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
mmdet/__init__.py
+1
-1
1 addition, 1 deletion
mmdet/__init__.py
mmdet/version.py
+0
-1
0 additions, 1 deletion
mmdet/version.py
setup.py
+93
-25
93 additions, 25 deletions
setup.py
tools/train.py
+3
-1
3 additions, 1 deletion
tools/train.py
with
98 additions
and
28 deletions
.gitignore
+
1
−
0
View file @
86dd9979
...
...
@@ -105,4 +105,5 @@ venv.bak/
# cython generated cpp
mmdet/ops/nms/*.cpp
mmdet/version.py
data
This diff is collapsed.
Click to expand it.
mmdet/__init__.py
+
1
−
1
View file @
86dd9979
from
.version
import
__version__
from
.version
import
__version__
,
short_version
This diff is collapsed.
Click to expand it.
mmdet/version.py
deleted
100644 → 0
+
0
−
1
View file @
c136b5f4
__version__
=
'
0.5.0
'
This diff is collapsed.
Click to expand it.
setup.py
+
93
−
25
View file @
86dd9979
import
os
import
subprocess
import
time
from
setuptools
import
find_packages
,
setup
...
...
@@ -7,34 +10,99 @@ def readme():
return
content
MAJOR
=
0
MINOR
=
5
PATCH
=
0
SUFFIX
=
''
SHORT_VERSION
=
'
{}.{}.{}{}
'
.
format
(
MAJOR
,
MINOR
,
PATCH
,
SUFFIX
)
version_file
=
'
mmdet/version.py
'
def
get_git_hash
():
def
_minimal_ext_cmd
(
cmd
):
# construct minimal environment
env
=
{}
for
k
in
[
'
SYSTEMROOT
'
,
'
PATH
'
,
'
HOME
'
]:
v
=
os
.
environ
.
get
(
k
)
if
v
is
not
None
:
env
[
k
]
=
v
# LANGUAGE is used on win32
env
[
'
LANGUAGE
'
]
=
'
C
'
env
[
'
LANG
'
]
=
'
C
'
env
[
'
LC_ALL
'
]
=
'
C
'
out
=
subprocess
.
Popen
(
cmd
,
stdout
=
subprocess
.
PIPE
,
env
=
env
).
communicate
()[
0
]
return
out
try
:
out
=
_minimal_ext_cmd
([
'
git
'
,
'
rev-parse
'
,
'
HEAD
'
])
sha
=
out
.
strip
().
decode
(
'
ascii
'
)
except
OSError
:
sha
=
'
unknown
'
return
sha
def
get_hash
():
if
os
.
path
.
exists
(
'
.git
'
):
sha
=
get_git_hash
()[:
7
]
elif
os
.
path
.
exists
(
version_file
):
try
:
from
mmdet.version
import
__version__
sha
=
__version__
.
split
(
'
+
'
)[
-
1
]
except
ImportError
:
raise
ImportError
(
'
Unable to get git version
'
)
else
:
sha
=
'
unknown
'
return
sha
def
write_version_py
():
content
=
"""
# GENERATED VERSION FILE
# TIME: {}
__version__ =
'
{}
'
short_version =
'
{}
'
"""
sha
=
get_hash
()
VERSION
=
SHORT_VERSION
+
'
+
'
+
sha
with
open
(
version_file
,
'
w
'
)
as
f
:
f
.
write
(
content
.
format
(
time
.
asctime
(),
VERSION
,
SHORT_VERSION
))
def
get_version
():
version_file
=
'
mmdet/version.py
'
with
open
(
version_file
,
'
r
'
)
as
f
:
exec
(
compile
(
f
.
read
(),
version_file
,
'
exec
'
))
return
locals
()[
'
__version__
'
]
setup
(
name
=
'
mmdet
'
,
version
=
get_version
(),
description
=
'
Open MMLab Detection Toolbox
'
,
long_description
=
readme
(),
keywords
=
'
computer vision, object detection
'
,
packages
=
find_packages
(),
classifiers
=
[
'
Development Status :: 4 - Beta
'
,
'
License :: OSI Approved :: GNU General Public License v3 (GPLv3)
'
,
'
Operating System :: OS Independent
'
,
'
Programming Language :: Python :: 2
'
,
'
Programming Language :: Python :: 2.7
'
,
'
Programming Language :: Python :: 3
'
,
'
Programming Language :: Python :: 3.4
'
,
'
Programming Language :: Python :: 3.5
'
,
'
Programming Language :: Python :: 3.6
'
,
'
Topic :: Utilities
'
,
],
license
=
'
GPLv3
'
,
setup_requires
=
[
'
pytest-runner
'
],
tests_require
=
[
'
pytest
'
],
install_requires
=
[
'
numpy
'
,
'
matplotlib
'
,
'
six
'
,
'
terminaltables
'
],
zip_safe
=
False
)
if
__name__
==
'
__main__
'
:
write_version_py
()
setup
(
name
=
'
mmdet
'
,
version
=
get_version
(),
description
=
'
Open MMLab Detection Toolbox
'
,
long_description
=
readme
(),
keywords
=
'
computer vision, object detection
'
,
packages
=
find_packages
(),
classifiers
=
[
'
Development Status :: 4 - Beta
'
,
'
License :: OSI Approved :: GNU General Public License v3 (GPLv3)
'
,
'
Operating System :: OS Independent
'
,
'
Programming Language :: Python :: 2
'
,
'
Programming Language :: Python :: 2.7
'
,
'
Programming Language :: Python :: 3
'
,
'
Programming Language :: Python :: 3.4
'
,
'
Programming Language :: Python :: 3.5
'
,
'
Programming Language :: Python :: 3.6
'
,
'
Topic :: Utilities
'
,
],
license
=
'
GPLv3
'
,
setup_requires
=
[
'
pytest-runner
'
],
tests_require
=
[
'
pytest
'
],
install_requires
=
[
'
numpy
'
,
'
matplotlib
'
,
'
six
'
,
'
terminaltables
'
],
zip_safe
=
False
)
This diff is collapsed.
Click to expand it.
tools/train.py
+
3
−
1
View file @
86dd9979
...
...
@@ -9,7 +9,7 @@ import torch
from
mmcv
import
Config
from
mmcv.torchpack
import
Runner
,
obj_from_dict
from
mmdet
import
datasets
from
mmdet
import
datasets
,
__version__
from
mmdet.core
import
(
init_dist
,
DistOptimizerHook
,
DistSamplerSeedHook
,
MMDataParallel
,
MMDistributedDataParallel
,
CocoDistEvalRecallHook
,
CocoDistEvalmAPHook
)
...
...
@@ -89,6 +89,8 @@ def main():
if
args
.
work_dir
is
not
None
:
cfg
.
work_dir
=
args
.
work_dir
cfg
.
gpus
=
args
.
gpus
# add mmdet version to checkpoint as meta data
cfg
.
checkpoint_config
.
meta
=
dict
(
mmdet_version
=
__version__
)
logger
=
get_logger
(
cfg
.
log_level
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment