Commit ca8a762a authored by chenzk's avatar chenzk
Browse files

v1.0

parents
Pipeline #716 failed with stages
in 0 seconds
version: 2.1
# this allows you to use CircleCI's dynamic configuration feature
setup: true
# the path-filtering orb is required to continue a pipeline based on
# the path of an updated fileset
orbs:
path-filtering: circleci/path-filtering@0.1.2
workflows:
# the always-run workflow is always triggered, regardless of the pipeline parameters.
always-run:
jobs:
# the path-filtering/filter job determines which pipeline
# parameters to update.
- path-filtering/filter:
name: check-updated-files
# 3-column, whitespace-delimited mapping. One mapping per
# line:
# <regex path-to-test> <parameter-to-set> <value-of-pipeline-parameter>
mapping: |
mmpose/.* lint_only false
requirements/.* lint_only false
tests/.* lint_only false
tools/.* lint_only false
configs/.* lint_only false
.circleci/.* lint_only false
base-revision: dev-1.x
# this is the path of the configuration we should trigger once
# path filtering and pipeline parameter value updates are
# complete. In this case, we are using the parent dynamic
# configuration itself.
config-path: .circleci/test.yml
ARG PYTORCH="1.7.1"
ARG CUDA="11.0"
ARG CUDNN="8"
FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel
# To fix GPG key error when running apt-get update
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
RUN apt-get update && apt-get install -y ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6 libgl1-mesa-glx
#!/bin/bash
TORCH=$1
CUDA=$2
# 10.2 -> cu102
MMCV_CUDA="cu`echo ${CUDA} | tr -d '.'`"
# MMCV only provides pre-compiled packages for torch 1.x.0
# which works for any subversions of torch 1.x.
# We force the torch version to be 1.x.0 to ease package searching
# and avoid unnecessary rebuild during MMCV's installation.
TORCH_VER_ARR=(${TORCH//./ })
TORCH_VER_ARR[2]=0
printf -v MMCV_TORCH "%s." "${TORCH_VER_ARR[@]}"
MMCV_TORCH=${MMCV_TORCH%?} # Remove the last dot
echo "export MMCV_CUDA=${MMCV_CUDA}" >> $BASH_ENV
echo "export MMCV_TORCH=${MMCV_TORCH}" >> $BASH_ENV
version: 2.1
# the default pipeline parameters, which will be updated according to
# the results of the path-filtering orb
parameters:
lint_only:
type: boolean
default: true
jobs:
lint:
docker:
- image: cimg/python:3.7.4
steps:
- checkout
- run:
name: Install pre-commit hook
command: |
pip install pre-commit
pre-commit install
- run:
name: Linting
command: pre-commit run --all-files
- run:
name: Check docstring coverage
command: |
pip install interrogate
interrogate -v --ignore-init-method --ignore-module --ignore-nested-functions --ignore-regex "__repr__" --fail-under 80 mmpose
build_cpu:
parameters:
# The python version must match available image tags in
# https://circleci.com/developer/images/image/cimg/python
python:
type: string
torch:
type: string
torchvision:
type: string
docker:
- image: cimg/python:<< parameters.python >>
resource_class: large
steps:
- checkout
- run:
name: Install Libraries
command: |
sudo apt-get update
sudo apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6 libturbojpeg git
- run:
name: Configure Python & pip
command: |
pip install --upgrade pip
pip install wheel
- run:
name: Install PyTorch
command: |
python -V
pip install torch==<< parameters.torch >>+cpu torchvision==<< parameters.torchvision >>+cpu -f https://download.pytorch.org/whl/torch_stable.html
- run:
name: Install mmpose dependencies
command: |
pip install -U numpy
pip install git+https://github.com/open-mmlab/mmengine.git@main
pip install -U openmim
mim install 'mmcv >= 2.0.0'
pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x
pip install -r requirements/tests.txt
pip install -r requirements/albu.txt
pip install -r requirements/poseval.txt
- run:
name: Build and install
command: |
pip install -e .
- run:
name: Run unittests
command: |
coverage run --branch --source mmpose -m pytest tests/
coverage xml
coverage report -m
build_cuda:
parameters:
torch:
type: string
cuda:
type: enum
enum: ["11.0", "11.7"]
cudnn:
type: integer
default: 8
machine:
image: ubuntu-2004-cuda-11.4:202110-01
# docker_layer_caching: true
resource_class: gpu.nvidia.small
steps:
- checkout
- run:
# Cloning repos in VM since Docker doesn't have access to the private key
name: Clone Repos
command: |
git clone -b main --depth 1 https://github.com/open-mmlab/mmengine.git /home/circleci/mmengine
git clone -b dev-3.x --depth 1 https://github.com/open-mmlab/mmdetection.git /home/circleci/mmdetection
- run:
name: Build Docker image
command: |
docker build .circleci/docker -t mmpose:gpu --build-arg PYTORCH=<< parameters.torch >> --build-arg CUDA=<< parameters.cuda >> --build-arg CUDNN=<< parameters.cudnn >>
docker run --gpus all -t -d -v /home/circleci/project:/mmpose -v /home/circleci/mmengine:/mmengine -v /home/circleci/mmdetection:/mmdetection -w /mmpose --name mmpose mmpose:gpu
- run:
name: Install mmpose dependencies
command: |
docker exec mmpose apt install git -y
docker exec mmpose pip install -U numpy
docker exec mmpose pip install -e /mmengine
docker exec mmpose pip install -U openmim
docker exec mmpose mim install 'mmcv >= 2.0.0'
docker exec mmpose pip install -e /mmdetection
docker exec mmpose pip install -r requirements/tests.txt
docker exec mmpose pip install -r requirements/albu.txt
docker exec mmpose pip install -r requirements/poseval.txt
- run:
name: Build and install
command: |
docker exec mmpose pip install -e .
- run:
name: Run unittests
command: |
docker exec mmpose pytest tests/
workflows:
pr_stage_lint:
when: << pipeline.parameters.lint_only >>
jobs:
- lint:
name: lint
filters:
branches:
ignore:
- dev-1.x
- main
pr_stage_test:
when:
not:
<< pipeline.parameters.lint_only >>
jobs:
- lint:
name: lint
filters:
branches:
ignore:
- dev-1.x
- main
- build_cpu:
name: minimum_version_cpu
torch: 1.7.1
torchvision: 0.8.2
python: 3.7.4
requires:
- lint
- build_cpu:
name: maximum_version_cpu
torch: 2.0.0
torchvision: 0.15.1
python: 3.9.0
requires:
- minimum_version_cpu
- hold:
type: approval
requires:
- maximum_version_cpu
- build_cuda:
name: mainstream_version_gpu
torch: 1.7.1
# Use double quotation mark to explicitly specify its type
# as string instead of number
cuda: "11.0"
requires:
- hold
- build_cuda:
name: maximum_version_gpu
torch: 2.0.0
cuda: "11.7"
cudnn: 8
requires:
- hold
merge_stage_test:
when:
not:
<< pipeline.parameters.lint_only >>
jobs:
- build_cuda:
name: minimum_version_gpu
torch: 1.7.1
# Use double quotation mark to explicitly specify its type
# as string instead of number
cuda: "11.0"
filters:
branches:
only:
- dev-1.x
- main
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
**/*.pyc
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/en/_build
docs/zh_cn/_build
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
# custom
mmpose/.mim
/models
/data
.vscode
.idea
*.pkl
*.pkl.json
*.log.json
*.npy
work_dirs/
docs/**/topics/
docs/**/papers/*.md
docs/**/datasets.md
docs/**/modelzoo.md
!tests/data/**/*.pkl
!tests/data/**/*.pkl.json
!tests/data/**/*.log.json
!tests/data/**/*.pth
!tests/data/**/*.npy
# Pytorch
*.pth
*.DS_Store
assign:
issues: enabled
pull_requests: disabled
strategy:
# random
daily-shift-based
scedule:
'*/1 * * * *'
assignees:
- Ben-Louis
- xiexinch
- Ben-Louis
- xiexinch
- Ben-Louis
- Ben-Louis
- Ben-Louis
exclude: ^tests/data/
repos:
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
hooks:
- id: flake8
- repo: https://github.com/PyCQA/isort
rev: 5.11.5
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-yapf
rev: v0.32.0
hooks:
- id: yapf
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: trailing-whitespace
- id: check-yaml
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: double-quote-string-fixer
- id: check-merge-conflict
- id: fix-encoding-pragma
args: ["--remove"]
- id: mixed-line-ending
args: ["--fix=lf"]
- repo: https://github.com/myint/docformatter
rev: v1.3.1
hooks:
- id: docformatter
args: ["--in-place", "--wrap-descriptions", "79"]
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
- id: codespell
args: ["--skip", "*.ipynb", "-L", "mot"]
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.14
hooks:
- id: mdformat
args: ["--number", "--table-width", "200"]
additional_dependencies:
- mdformat-openmmlab
- mdformat_frontmatter
- linkify-it-py
- repo: https://github.com/open-mmlab/pre-commit-hooks
rev: v0.2.0
hooks:
- id: check-copyright
args: ["mmpose", "tests", "demo", "tools", "--excludes", "demo/mmdetection_cfg", "demo/mmtracking_cfg"]
[MASTER]
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code.
extension-pkg-whitelist=
# Specify a score threshold to be exceeded before program exits with error.
fail-under=10.0
# Add files or directories to the blacklist. They should be base names, not
# paths.
ignore=CVS,configs
# Add files or directories matching the regex patterns to the blacklist. The
# regex matches against base names, not paths.
ignore-patterns=
# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
#init-hook=
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
# number of processors available to use.
jobs=1
# Control the amount of potential inferred values when inferring a single
# object. This can help the performance when dealing with large functions or
# complex, nested conditions.
limit-inference-results=100
# List of plugins (as comma separated values of python module names) to load,
# usually to register additional checkers.
load-plugins=
# Pickle collected data for later comparisons.
persistent=yes
# When enabled, pylint would attempt to guess common misconfiguration and emit
# user-friendly hints instead of false-positive error messages.
suggestion-mode=yes
# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
unsafe-load-any-extension=no
[MESSAGES CONTROL]
# Only show warnings with the listed confidence levels. Leave empty to show
# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
confidence=
# Disable the message, report, category or checker with the given id(s). You
# can either give multiple identifiers separated by comma (,) or put this
# option multiple times (only on the command line, not in the configuration
# file where it should appear only once). You can also use "--disable=all" to
# disable everything first and then reenable specific checks. For example, if
# you want to run only the similarities checker, you can use "--disable=all
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use "--disable=all --enable=classes
# --disable=W".
disable=print-statement,
parameter-unpacking,
unpacking-in-except,
old-raise-syntax,
backtick,
long-suffix,
old-ne-operator,
old-octal-literal,
import-star-module-level,
non-ascii-bytes-literal,
raw-checker-failed,
bad-inline-option,
locally-disabled,
file-ignored,
suppressed-message,
useless-suppression,
deprecated-pragma,
use-symbolic-message-instead,
apply-builtin,
basestring-builtin,
buffer-builtin,
cmp-builtin,
coerce-builtin,
execfile-builtin,
file-builtin,
long-builtin,
raw_input-builtin,
reduce-builtin,
standarderror-builtin,
unicode-builtin,
xrange-builtin,
coerce-method,
delslice-method,
getslice-method,
setslice-method,
no-absolute-import,
old-division,
dict-iter-method,
dict-view-method,
next-method-called,
metaclass-assignment,
indexing-exception,
raising-string,
reload-builtin,
oct-method,
hex-method,
nonzero-method,
cmp-method,
input-builtin,
round-builtin,
intern-builtin,
unichr-builtin,
map-builtin-not-iterating,
zip-builtin-not-iterating,
range-builtin-not-iterating,
filter-builtin-not-iterating,
using-cmp-argument,
eq-without-hash,
div-method,
idiv-method,
rdiv-method,
exception-message-attribute,
invalid-str-codec,
sys-max-int,
bad-python3-import,
deprecated-string-function,
deprecated-str-translate-call,
deprecated-itertools-function,
deprecated-types-field,
next-method-defined,
dict-items-not-iterating,
dict-keys-not-iterating,
dict-values-not-iterating,
deprecated-operator-function,
deprecated-urllib-function,
xreadlines-attribute,
deprecated-sys-function,
exception-escape,
comprehension-escape,
no-member,
invalid-name,
too-many-branches,
wrong-import-order,
too-many-arguments,
missing-function-docstring,
missing-module-docstring,
too-many-locals,
too-few-public-methods,
abstract-method,
broad-except,
too-many-nested-blocks,
too-many-instance-attributes,
missing-class-docstring,
duplicate-code,
not-callable,
protected-access,
dangerous-default-value,
no-name-in-module,
logging-fstring-interpolation,
super-init-not-called,
redefined-builtin,
attribute-defined-outside-init,
arguments-differ,
cyclic-import,
bad-super-call,
too-many-statements
# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# it should appear only once). See also the "--disable" option for examples.
enable=c-extension-no-member
[REPORTS]
# Python expression which should return a score less than or equal to 10. You
# have access to the variables 'error', 'warning', 'refactor', and 'convention'
# which contain the number of messages in each category, as well as 'statement'
# which is the total number of statements analyzed. This score is used by the
# global evaluation report (RP0004).
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
# Template used to display messages. This is a python new-style format string
# used to format the message information. See doc for all details.
#msg-template=
# Set the output format. Available formats are text, parseable, colorized, json
# and msvs (visual studio). You can also give a reporter class, e.g.
# mypackage.mymodule.MyReporterClass.
output-format=text
# Tells whether to display a full report or only the messages.
reports=no
# Activate the evaluation score.
score=yes
[REFACTORING]
# Maximum number of nested blocks for function / method body
max-nested-blocks=5
# Complete name of functions that never returns. When checking for
# inconsistent-return-statements if a never returning function is called then
# it will be considered as an explicit return statement and no message will be
# printed.
never-returning-functions=sys.exit
[TYPECHECK]
# List of decorators that produce context managers, such as
# contextlib.contextmanager. Add to this list to register other decorators that
# produce valid context managers.
contextmanager-decorators=contextlib.contextmanager
# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E1101 when accessed. Python regular
# expressions are accepted.
generated-members=
# Tells whether missing members accessed in mixin class should be ignored. A
# mixin class is detected if its name ends with "mixin" (case insensitive).
ignore-mixin-members=yes
# Tells whether to warn about missing members when the owner of the attribute
# is inferred to be None.
ignore-none=yes
# This flag controls whether pylint should warn about no-member and similar
# checks whenever an opaque object is returned when inferring. The inference
# can return multiple potential results while evaluating a Python object, but
# some branches might not be evaluated, which results in partial inference. In
# that case, it might be useful to still emit no-member and other checks for
# the rest of the inferred objects.
ignore-on-opaque-inference=yes
# List of class names for which member attributes should not be checked (useful
# for classes with dynamically set attributes). This supports the use of
# qualified names.
ignored-classes=optparse.Values,thread._local,_thread._local
# List of module names for which member attributes should not be checked
# (useful for modules/projects where namespaces are manipulated during runtime
# and thus existing member attributes cannot be deduced by static analysis). It
# supports qualified module names, as well as Unix pattern matching.
ignored-modules=
# Show a hint with possible names when a member name was not found. The aspect
# of finding the hint is based on edit distance.
missing-member-hint=yes
# The minimum edit distance a name should have in order to be considered a
# similar match for a missing member name.
missing-member-hint-distance=1
# The total number of similar names that should be taken in consideration when
# showing a hint for a missing member.
missing-member-max-choices=1
# List of decorators that change the signature of a decorated function.
signature-mutators=
[SPELLING]
# Limits count of emitted suggestions for spelling mistakes.
max-spelling-suggestions=4
# Spelling dictionary name. Available dictionaries: none. To make it work,
# install the python-enchant package.
spelling-dict=
# List of comma separated words that should not be checked.
spelling-ignore-words=
# A path to a file that contains the private dictionary; one word per line.
spelling-private-dict-file=
# Tells whether to store unknown words to the private dictionary (see the
# --spelling-private-dict-file option) instead of raising a message.
spelling-store-unknown-words=no
[LOGGING]
# The type of string formatting that logging methods do. `old` means using %
# formatting, `new` is for `{}` formatting.
logging-format-style=old
# Logging modules to check that the string format arguments are in logging
# function parameter format.
logging-modules=logging
[VARIABLES]
# List of additional names supposed to be defined in builtins. Remember that
# you should avoid defining new builtins when possible.
additional-builtins=
# Tells whether unused global variables should be treated as a violation.
allow-global-unused-variables=yes
# List of strings which can identify a callback function by name. A callback
# name must start or end with one of those strings.
callbacks=cb_,
_cb
# A regular expression matching the name of dummy variables (i.e. expected to
# not be used).
dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
# Argument names that match this expression will be ignored. Default to name
# with leading underscore.
ignored-argument-names=_.*|^ignored_|^unused_
# Tells whether we should check for unused import in __init__ files.
init-import=no
# List of qualified module names which can have objects that can redefine
# builtins.
redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
[FORMAT]
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
expected-line-ending-format=
# Regexp for a line that is allowed to be longer than the limit.
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
# Number of spaces of indent required inside a hanging or continued line.
indent-after-paren=4
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
# tab).
indent-string=' '
# Maximum number of characters on a single line.
max-line-length=100
# Maximum number of lines in a module.
max-module-lines=1000
# Allow the body of a class to be on the same line as the declaration if body
# contains single statement.
single-line-class-stmt=no
# Allow the body of an if to be on the same line as the test if there is no
# else.
single-line-if-stmt=no
[STRING]
# This flag controls whether inconsistent-quotes generates a warning when the
# character used as a quote delimiter is used inconsistently within a module.
check-quote-consistency=no
# This flag controls whether the implicit-str-concat should generate a warning
# on implicit string concatenation in sequences defined over several lines.
check-str-concat-over-line-jumps=no
[SIMILARITIES]
# Ignore comments when computing similarities.
ignore-comments=yes
# Ignore docstrings when computing similarities.
ignore-docstrings=yes
# Ignore imports when computing similarities.
ignore-imports=no
# Minimum lines number of a similarity.
min-similarity-lines=4
[MISCELLANEOUS]
# List of note tags to take in consideration, separated by a comma.
notes=FIXME,
XXX,
TODO
# Regular expression of note tags to take in consideration.
#notes-rgx=
[BASIC]
# Naming style matching correct argument names.
argument-naming-style=snake_case
# Regular expression matching correct argument names. Overrides argument-
# naming-style.
#argument-rgx=
# Naming style matching correct attribute names.
attr-naming-style=snake_case
# Regular expression matching correct attribute names. Overrides attr-naming-
# style.
#attr-rgx=
# Bad variable names which should always be refused, separated by a comma.
bad-names=foo,
bar,
baz,
toto,
tutu,
tata
# Bad variable names regexes, separated by a comma. If names match any regex,
# they will always be refused
bad-names-rgxs=
# Naming style matching correct class attribute names.
class-attribute-naming-style=any
# Regular expression matching correct class attribute names. Overrides class-
# attribute-naming-style.
#class-attribute-rgx=
# Naming style matching correct class names.
class-naming-style=PascalCase
# Regular expression matching correct class names. Overrides class-naming-
# style.
#class-rgx=
# Naming style matching correct constant names.
const-naming-style=UPPER_CASE
# Regular expression matching correct constant names. Overrides const-naming-
# style.
#const-rgx=
# Minimum line length for functions/classes that require docstrings, shorter
# ones are exempt.
docstring-min-length=-1
# Naming style matching correct function names.
function-naming-style=snake_case
# Regular expression matching correct function names. Overrides function-
# naming-style.
#function-rgx=
# Good variable names which should always be accepted, separated by a comma.
good-names=i,
j,
k,
ex,
Run,
_,
x,
y,
w,
h,
a,
b
# Good variable names regexes, separated by a comma. If names match any regex,
# they will always be accepted
good-names-rgxs=
# Include a hint for the correct naming format with invalid-name.
include-naming-hint=no
# Naming style matching correct inline iteration names.
inlinevar-naming-style=any
# Regular expression matching correct inline iteration names. Overrides
# inlinevar-naming-style.
#inlinevar-rgx=
# Naming style matching correct method names.
method-naming-style=snake_case
# Regular expression matching correct method names. Overrides method-naming-
# style.
#method-rgx=
# Naming style matching correct module names.
module-naming-style=snake_case
# Regular expression matching correct module names. Overrides module-naming-
# style.
#module-rgx=
# Colon-delimited sets of names that determine each other's naming style when
# the name regexes allow several styles.
name-group=
# Regular expression which should only match function or class names that do
# not require a docstring.
no-docstring-rgx=^_
# List of decorators that produce properties, such as abc.abstractproperty. Add
# to this list to register other decorators that produce valid properties.
# These decorators are taken in consideration only for invalid-name.
property-classes=abc.abstractproperty
# Naming style matching correct variable names.
variable-naming-style=snake_case
# Regular expression matching correct variable names. Overrides variable-
# naming-style.
#variable-rgx=
[DESIGN]
# Maximum number of arguments for function / method.
max-args=5
# Maximum number of attributes for a class (see R0902).
max-attributes=7
# Maximum number of boolean expressions in an if statement (see R0916).
max-bool-expr=5
# Maximum number of branch for function / method body.
max-branches=12
# Maximum number of locals for function / method body.
max-locals=15
# Maximum number of parents for a class (see R0901).
max-parents=7
# Maximum number of public methods for a class (see R0904).
max-public-methods=20
# Maximum number of return / yield for function / method body.
max-returns=6
# Maximum number of statements in function / method body.
max-statements=50
# Minimum number of public methods for a class (see R0903).
min-public-methods=2
[IMPORTS]
# List of modules that can be imported at any level, not just the top level
# one.
allow-any-import-level=
# Allow wildcard imports from modules that define __all__.
allow-wildcard-with-all=no
# Analyse import fallback blocks. This can be used to support both Python 2 and
# 3 compatible code, which means that the block might have code that exists
# only in one or another interpreter, leading to false positives when analysed.
analyse-fallback-blocks=no
# Deprecated modules which should not be used, separated by a comma.
deprecated-modules=optparse,tkinter.tix
# Create a graph of external dependencies in the given file (report RP0402 must
# not be disabled).
ext-import-graph=
# Create a graph of every (i.e. internal and external) dependencies in the
# given file (report RP0402 must not be disabled).
import-graph=
# Create a graph of internal dependencies in the given file (report RP0402 must
# not be disabled).
int-import-graph=
# Force import order to recognize a module as part of the standard
# compatibility libraries.
known-standard-library=
# Force import order to recognize a module as part of a third party library.
known-third-party=enchant
# Couples of modules and preferred modules, separated by a comma.
preferred-modules=
[CLASSES]
# List of method names used to declare (i.e. assign) instance attributes.
defining-attr-methods=__init__,
__new__,
setUp,
__post_init__
# List of member names, which should be excluded from the protected access
# warning.
exclude-protected=_asdict,
_fields,
_replace,
_source,
_make
# List of valid names for the first argument in a class method.
valid-classmethod-first-arg=cls
# List of valid names for the first argument in a metaclass class method.
valid-metaclass-classmethod-first-arg=cls
[EXCEPTIONS]
# Exceptions that will emit a warning when being caught. Defaults to
# "BaseException, Exception".
overgeneral-exceptions=BaseException,
Exception
version: 2
formats:
- epub
build:
os: ubuntu-22.04
tools:
python: "3.8"
python:
install:
- requirements: requirements/docs.txt
- requirements: requirements/readthedocs.txt
cff-version: 1.3.0
message: "If you use this software, please cite it as below."
authors:
- name: "MMPose Contributors"
title: "OpenMMLab Pose Estimation Toolbox and Benchmark"
date-released: 2020-08-31
url: "https://github.com/open-mmlab/mmpose"
license: Apache-2.0
Copyright 2018-2020 Open-MMLab. All rights reserved.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2018-2020 Open-MMLab.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# Licenses for special algorithms
In this file, we list the algorithms with other licenses instead of Apache 2.0. Users should be careful about adopting these algorithms in any commercial matters.
| Algorithm | Files | License |
| :-------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------: | :--------------: |
| EDPose | [mmpose/models/heads/transformer_heads/edpose_head.py](https://github.com/open-mmlab/mmpose/blob/main/mmpose/models/heads/transformer_heads/edpose_head.py) | IDEA License 1.0 |
include requirements/*.txt
include mmpose/.mim/model-index.yml
include mmpose/.mim/dataset-index.yml
recursive-include mmpose/.mim/configs *.py *.yml
recursive-include mmpose/.mim/tools *.py *.sh
recursive-include mmpose/.mim/demo *.py
# RTMO
本项目的步骤适用于mmpose中的RTMO算法,库中其它姿态估计算法的使用方式以此类推。
## 论文
`RTMO: Towards High-Performance One-Stage Real-Time Multi-Person Pose Estimation`
- https://arxiv.org/pdf/2312.07526.pdf
## 模型结构
为了提高关键点预测速度,无法选择计算量较大的模型,于是,作者选择了ResNet-50以及对GPU计算更为友好的CSPDarknet,同时去掉yolo系列经典模型结构中计算量最大的最大特征图的检测头。
<div align=center>
<img src="./doc/bockbone.png"/>
</div>
## 算法原理
借鉴yolopose的基本思想,先利用onestage方法生成BBox,但此时作者提出了改进思想,不在生成BBox的同时生成Kpt,而是对BBox所在的姿态特征图进行特征变换和维度转换,利用全连接层来控制关键点的个数,对BBox的坐标进行xy分离、位置编码和维度转换操作,再将两者相乘得到特征融合的结果,对此结果的关键点进行有监督训练,经过论文中提出的损失监督,便获得更好的关键点预测结果。
<div align=center>
<img src="./doc/rtmo.png"/>
</div>
## 环境配置
```
mv mmpose_pytorch mmpose # 去框架名后缀
```
### Docker(方法一)
```
docker pull image.sourcefind.cn:5000/dcu/admin/base/pytorch:1.13.1-centos7.6-dtk23.10-py38
# <your IMAGE ID>为以上拉取的docker的镜像ID替换,本镜像为:229ce1daddf6
docker run -it --shm-size=32G -v $PWD/mmpose:/home/mmpose -v /opt/hyhal:/opt/hyhal --privileged=true --device=/dev/kfd --device=/dev/dri/ --group-add video --name rtmo <your IMAGE ID> bash
cd mmpose
pip install -r requirements.txt
pip install mmcv-2.0.1+gite2f0eed.abi0.dtk2310.torch1.13-cp38-cp38-manylinux2014_x86_64.whl # dcu版mmcv,可从光合社区下载。
pip install -v -e . # 安装mmpose=1.3.0
# 训练时会自动下载目标检测权重到项目默认指定位置:yolox_s_8x8_300e_coco_20211121_095711-4592a793.pth
```
### Dockerfile(方法二)
```
cd mmpose/docker
docker build --no-cache -t rtmo:latest .
docker run --shm-size=32G --name rtmo -v /opt/hyhal:/opt/hyhal --privileged=true --device=/dev/kfd --device=/dev/dri/ --group-add video -v $PWD/../../mmpose:/home/mmpose -it rtmo bash
# 若遇到Dockerfile启动的方式安装环境需要长时间等待,可注释掉里面的pip安装,启动容器后再安装python库:pip install -r requirements.txt。
cd mmpose
pip install mmcv-2.0.1+gite2f0eed.abi0.dtk2310.torch1.13-cp38-cp38-manylinux2014_x86_64.whl # dcu版mmcv,可从光合社区下载。
pip install -v -e . # 安装mmpose=1.3.0
# 训练时会自动下载目标检测权重到项目默认指定位置:yolox_s_8x8_300e_coco_20211121_095711-4592a793.pth
```
### Anaconda(方法三)
1、关于本项目DCU显卡所需的特殊深度学习库可从光合开发者社区下载安装:
- https://developer.hpccube.com/tool/
```
DTK驱动:dtk23.10
python:python3.8
torch:1.13.1
torchvision:0.14.1
apex:0.1
mmcv:2.0.1
# cd mmpose & pip install -v -e . # 安装mmpose=1.3.0
```
`Tips:以上dtk驱动、python、torch等DCU相关工具版本需要严格一一对应。`
2、其它非特殊库参照requirements.txt安装
```
pip install -r requirements.txt
```
## 数据集
`COCO2017`
- http://cocodataset.org/#download
项目中已提供用于试验训练的迷你数据集,[`coco.zip`](./data/coco.zip)解压即可使用,训练数据目录结构如下,用于正常训练的完整数据集请按此目录结构进行制备:
```
data/coco/
├── annotations/
│ ├── person_keypoints_train2017.json
│ ├── person_keypoints_val2017.json
│ └── ...
├── train2017/
│ ├── xxx.png
│ ├── xxx.png
│ └── ...
├── val2017/
│ ├── xxx.png
│ ├── xxx.png
│ └── ...
```
`更多资料可参考源项目的README_origin.md`
## 训练
### 单机多卡
```
cd mmpose
sh train.sh
# if bug: Timeout while waiting for Database: /root/.cache/miopen/2.15.3.0b020ba8a/gfx92678.ukdb. rc=00000005
# then: rm -rf /root/.cache/miopen/2.15.3.0b020ba8a/*
```
## 推理
```
python demo/inferencer_demo.py tests/data/coco/ --pose2d configs/body_2d_keypoint/rtmo/coco/rtmo-s_8xb32-600e_coco-640x640.py --pose2d-weights checkpoint/epoch_xxx.pth --vis-out-dir vis_results # 采用coco2017自己训练的权重推理
# 官方默认权重推理:python demo/inferencer_demo.py tests/data/coco/000000000785.jpg --pose2d rtmo --vis-out-dir vis_results
```
## result
输入人物图片:
<div align=center>
<img src="./doc/000000197388.png"/>
</div>
识别出人物关键点:
<div align=center>
<img src="./doc/000000197388_result.png"/>
</div>
### 精度
测试数据:"tests/data/coco/",测试算法为RTMO-s,其bockbone为CSPDarknet,其中V100的精度为论文中作者公开结果,推理框架:pytorch。
| device | AP | AP50 | AP75 | APM | APL | AR |
|:---------:|:----:|:----:|:----:|:----:|:----:|:----:|
| DCU Z100SM | 67.8 | 87.8 | 73.9 | 61.6 | 77.1 | 71.6 |
| GPU V100 | 66.9 | 88.8 | 73.6 | 61.1 | 75.7 | 70.9 |
## 应用场景
### 算法类别
`姿态估计`
### 热点应用行业
`制造,广媒,能源,医疗,家居,教育`
## 源码仓库及问题反馈
- http://developer.hpccube.com/codes/modelzoo/mmpose-rtmo_pytorch.git
## 参考资料
- https://github.com/open-mmlab/mmpose.git
- https://zhuanlan.zhihu.com/p/649761492
This diff is collapsed.
This diff is collapsed.
dataset_info = dict(
dataset_name='300w',
paper_info=dict(
author='Sagonas, Christos and Antonakos, Epameinondas '
'and Tzimiropoulos, Georgios and Zafeiriou, Stefanos '
'and Pantic, Maja',
title='300 faces in-the-wild challenge: '
'Database and results',
container='Image and vision computing',
year='2016',
homepage='https://ibug.doc.ic.ac.uk/resources/300-W/',
),
keypoint_info={
0: dict(name='kpt-0', id=0, color=[255, 0, 0], type='', swap='kpt-16'),
1: dict(name='kpt-1', id=1, color=[255, 0, 0], type='', swap='kpt-15'),
2: dict(name='kpt-2', id=2, color=[255, 0, 0], type='', swap='kpt-14'),
3: dict(name='kpt-3', id=3, color=[255, 0, 0], type='', swap='kpt-13'),
4: dict(name='kpt-4', id=4, color=[255, 0, 0], type='', swap='kpt-12'),
5: dict(name='kpt-5', id=5, color=[255, 0, 0], type='', swap='kpt-11'),
6: dict(name='kpt-6', id=6, color=[255, 0, 0], type='', swap='kpt-10'),
7: dict(name='kpt-7', id=7, color=[255, 0, 0], type='', swap='kpt-9'),
8: dict(name='kpt-8', id=8, color=[255, 0, 0], type='', swap=''),
9: dict(name='kpt-9', id=9, color=[255, 0, 0], type='', swap='kpt-7'),
10:
dict(name='kpt-10', id=10, color=[255, 0, 0], type='', swap='kpt-6'),
11:
dict(name='kpt-11', id=11, color=[255, 0, 0], type='', swap='kpt-5'),
12:
dict(name='kpt-12', id=12, color=[255, 0, 0], type='', swap='kpt-4'),
13:
dict(name='kpt-13', id=13, color=[255, 0, 0], type='', swap='kpt-3'),
14:
dict(name='kpt-14', id=14, color=[255, 0, 0], type='', swap='kpt-2'),
15:
dict(name='kpt-15', id=15, color=[255, 0, 0], type='', swap='kpt-1'),
16:
dict(name='kpt-16', id=16, color=[255, 0, 0], type='', swap='kpt-0'),
17:
dict(name='kpt-17', id=17, color=[255, 0, 0], type='', swap='kpt-26'),
18:
dict(name='kpt-18', id=18, color=[255, 0, 0], type='', swap='kpt-25'),
19:
dict(name='kpt-19', id=19, color=[255, 0, 0], type='', swap='kpt-24'),
20:
dict(name='kpt-20', id=20, color=[255, 0, 0], type='', swap='kpt-23'),
21:
dict(name='kpt-21', id=21, color=[255, 0, 0], type='', swap='kpt-22'),
22:
dict(name='kpt-22', id=22, color=[255, 0, 0], type='', swap='kpt-21'),
23:
dict(name='kpt-23', id=23, color=[255, 0, 0], type='', swap='kpt-20'),
24:
dict(name='kpt-24', id=24, color=[255, 0, 0], type='', swap='kpt-19'),
25:
dict(name='kpt-25', id=25, color=[255, 0, 0], type='', swap='kpt-18'),
26:
dict(name='kpt-26', id=26, color=[255, 0, 0], type='', swap='kpt-17'),
27: dict(name='kpt-27', id=27, color=[255, 0, 0], type='', swap=''),
28: dict(name='kpt-28', id=28, color=[255, 0, 0], type='', swap=''),
29: dict(name='kpt-29', id=29, color=[255, 0, 0], type='', swap=''),
30: dict(name='kpt-30', id=30, color=[255, 0, 0], type='', swap=''),
31:
dict(name='kpt-31', id=31, color=[255, 0, 0], type='', swap='kpt-35'),
32:
dict(name='kpt-32', id=32, color=[255, 0, 0], type='', swap='kpt-34'),
33: dict(name='kpt-33', id=33, color=[255, 0, 0], type='', swap=''),
34:
dict(name='kpt-34', id=34, color=[255, 0, 0], type='', swap='kpt-32'),
35:
dict(name='kpt-35', id=35, color=[255, 0, 0], type='', swap='kpt-31'),
36:
dict(name='kpt-36', id=36, color=[255, 0, 0], type='', swap='kpt-45'),
37:
dict(name='kpt-37', id=37, color=[255, 0, 0], type='', swap='kpt-44'),
38:
dict(name='kpt-38', id=38, color=[255, 0, 0], type='', swap='kpt-43'),
39:
dict(name='kpt-39', id=39, color=[255, 0, 0], type='', swap='kpt-42'),
40:
dict(name='kpt-40', id=40, color=[255, 0, 0], type='', swap='kpt-47'),
41: dict(
name='kpt-41', id=41, color=[255, 0, 0], type='', swap='kpt-46'),
42: dict(
name='kpt-42', id=42, color=[255, 0, 0], type='', swap='kpt-39'),
43: dict(
name='kpt-43', id=43, color=[255, 0, 0], type='', swap='kpt-38'),
44: dict(
name='kpt-44', id=44, color=[255, 0, 0], type='', swap='kpt-37'),
45: dict(
name='kpt-45', id=45, color=[255, 0, 0], type='', swap='kpt-36'),
46: dict(
name='kpt-46', id=46, color=[255, 0, 0], type='', swap='kpt-41'),
47: dict(
name='kpt-47', id=47, color=[255, 0, 0], type='', swap='kpt-40'),
48: dict(
name='kpt-48', id=48, color=[255, 0, 0], type='', swap='kpt-54'),
49: dict(
name='kpt-49', id=49, color=[255, 0, 0], type='', swap='kpt-53'),
50: dict(
name='kpt-50', id=50, color=[255, 0, 0], type='', swap='kpt-52'),
51: dict(name='kpt-51', id=51, color=[255, 0, 0], type='', swap=''),
52: dict(
name='kpt-52', id=52, color=[255, 0, 0], type='', swap='kpt-50'),
53: dict(
name='kpt-53', id=53, color=[255, 0, 0], type='', swap='kpt-49'),
54: dict(
name='kpt-54', id=54, color=[255, 0, 0], type='', swap='kpt-48'),
55: dict(
name='kpt-55', id=55, color=[255, 0, 0], type='', swap='kpt-59'),
56: dict(
name='kpt-56', id=56, color=[255, 0, 0], type='', swap='kpt-58'),
57: dict(name='kpt-57', id=57, color=[255, 0, 0], type='', swap=''),
58: dict(
name='kpt-58', id=58, color=[255, 0, 0], type='', swap='kpt-56'),
59: dict(
name='kpt-59', id=59, color=[255, 0, 0], type='', swap='kpt-55'),
60: dict(
name='kpt-60', id=60, color=[255, 0, 0], type='', swap='kpt-64'),
61: dict(
name='kpt-61', id=61, color=[255, 0, 0], type='', swap='kpt-63'),
62: dict(name='kpt-62', id=62, color=[255, 0, 0], type='', swap=''),
63: dict(
name='kpt-63', id=63, color=[255, 0, 0], type='', swap='kpt-61'),
64: dict(
name='kpt-64', id=64, color=[255, 0, 0], type='', swap='kpt-60'),
65: dict(
name='kpt-65', id=65, color=[255, 0, 0], type='', swap='kpt-67'),
66: dict(name='kpt-66', id=66, color=[255, 0, 0], type='', swap=''),
67: dict(
name='kpt-67', id=67, color=[255, 0, 0], type='', swap='kpt-65'),
},
skeleton_info={},
joint_weights=[1.] * 68,
sigmas=[])
dataset_info = dict(
dataset_name='300wlp',
paper_info=dict(
author='Xiangyu Zhu1, and Zhen Lei1 '
'and Xiaoming Liu2, and Hailin Shi1 '
'and Stan Z. Li1',
title='300 faces in-the-wild challenge: '
'Database and results',
container='Image and vision computing',
year='2016',
homepage='http://www.cbsr.ia.ac.cn/users/xiangyuzhu/'
'projects/3DDFA/main.htm',
),
keypoint_info={
0: dict(name='kpt-0', id=0, color=[255, 0, 0], type='', swap=''),
1: dict(name='kpt-1', id=1, color=[255, 0, 0], type='', swap=''),
2: dict(name='kpt-2', id=2, color=[255, 0, 0], type='', swap=''),
3: dict(name='kpt-3', id=3, color=[255, 0, 0], type='', swap=''),
4: dict(name='kpt-4', id=4, color=[255, 0, 0], type='', swap=''),
5: dict(name='kpt-5', id=5, color=[255, 0, 0], type='', swap=''),
6: dict(name='kpt-6', id=6, color=[255, 0, 0], type='', swap=''),
7: dict(name='kpt-7', id=7, color=[255, 0, 0], type='', swap=''),
8: dict(name='kpt-8', id=8, color=[255, 0, 0], type='', swap=''),
9: dict(name='kpt-9', id=9, color=[255, 0, 0], type='', swap=''),
10: dict(name='kpt-10', id=10, color=[255, 0, 0], type='', swap=''),
11: dict(name='kpt-11', id=11, color=[255, 0, 0], type='', swap=''),
12: dict(name='kpt-12', id=12, color=[255, 0, 0], type='', swap=''),
13: dict(name='kpt-13', id=13, color=[255, 0, 0], type='', swap=''),
14: dict(name='kpt-14', id=14, color=[255, 0, 0], type='', swap=''),
15: dict(name='kpt-15', id=15, color=[255, 0, 0], type='', swap=''),
16: dict(name='kpt-16', id=16, color=[255, 0, 0], type='', swap=''),
17: dict(name='kpt-17', id=17, color=[255, 0, 0], type='', swap=''),
18: dict(name='kpt-18', id=18, color=[255, 0, 0], type='', swap=''),
19: dict(name='kpt-19', id=19, color=[255, 0, 0], type='', swap=''),
20: dict(name='kpt-20', id=20, color=[255, 0, 0], type='', swap=''),
21: dict(name='kpt-21', id=21, color=[255, 0, 0], type='', swap=''),
22: dict(name='kpt-22', id=22, color=[255, 0, 0], type='', swap=''),
23: dict(name='kpt-23', id=23, color=[255, 0, 0], type='', swap=''),
24: dict(name='kpt-24', id=24, color=[255, 0, 0], type='', swap=''),
25: dict(name='kpt-25', id=25, color=[255, 0, 0], type='', swap=''),
26: dict(name='kpt-26', id=26, color=[255, 0, 0], type='', swap=''),
27: dict(name='kpt-27', id=27, color=[255, 0, 0], type='', swap=''),
28: dict(name='kpt-28', id=28, color=[255, 0, 0], type='', swap=''),
29: dict(name='kpt-29', id=29, color=[255, 0, 0], type='', swap=''),
30: dict(name='kpt-30', id=30, color=[255, 0, 0], type='', swap=''),
31: dict(name='kpt-31', id=31, color=[255, 0, 0], type='', swap=''),
32: dict(name='kpt-32', id=32, color=[255, 0, 0], type='', swap=''),
33: dict(name='kpt-33', id=33, color=[255, 0, 0], type='', swap=''),
34: dict(name='kpt-34', id=34, color=[255, 0, 0], type='', swap=''),
35: dict(name='kpt-35', id=35, color=[255, 0, 0], type='', swap=''),
36: dict(name='kpt-36', id=36, color=[255, 0, 0], type='', swap=''),
37: dict(name='kpt-37', id=37, color=[255, 0, 0], type='', swap=''),
38: dict(name='kpt-38', id=38, color=[255, 0, 0], type='', swap=''),
39: dict(name='kpt-39', id=39, color=[255, 0, 0], type='', swap=''),
40: dict(name='kpt-40', id=40, color=[255, 0, 0], type='', swap=''),
41: dict(name='kpt-41', id=41, color=[255, 0, 0], type='', swap=''),
42: dict(name='kpt-42', id=42, color=[255, 0, 0], type='', swap=''),
43: dict(name='kpt-43', id=43, color=[255, 0, 0], type='', swap=''),
44: dict(name='kpt-44', id=44, color=[255, 0, 0], type='', swap=''),
45: dict(name='kpt-45', id=45, color=[255, 0, 0], type='', swap=''),
46: dict(name='kpt-46', id=46, color=[255, 0, 0], type='', swap=''),
47: dict(name='kpt-47', id=47, color=[255, 0, 0], type='', swap=''),
48: dict(name='kpt-48', id=48, color=[255, 0, 0], type='', swap=''),
49: dict(name='kpt-49', id=49, color=[255, 0, 0], type='', swap=''),
50: dict(name='kpt-50', id=50, color=[255, 0, 0], type='', swap=''),
51: dict(name='kpt-51', id=51, color=[255, 0, 0], type='', swap=''),
52: dict(name='kpt-52', id=52, color=[255, 0, 0], type='', swap=''),
53: dict(name='kpt-53', id=53, color=[255, 0, 0], type='', swap=''),
54: dict(name='kpt-54', id=54, color=[255, 0, 0], type='', swap=''),
55: dict(name='kpt-55', id=55, color=[255, 0, 0], type='', swap=''),
56: dict(name='kpt-56', id=56, color=[255, 0, 0], type='', swap=''),
57: dict(name='kpt-57', id=57, color=[255, 0, 0], type='', swap=''),
58: dict(name='kpt-58', id=58, color=[255, 0, 0], type='', swap=''),
59: dict(name='kpt-59', id=59, color=[255, 0, 0], type='', swap=''),
60: dict(name='kpt-60', id=60, color=[255, 0, 0], type='', swap=''),
61: dict(name='kpt-61', id=61, color=[255, 0, 0], type='', swap=''),
62: dict(name='kpt-62', id=62, color=[255, 0, 0], type='', swap=''),
63: dict(name='kpt-63', id=63, color=[255, 0, 0], type='', swap=''),
64: dict(name='kpt-64', id=64, color=[255, 0, 0], type='', swap=''),
65: dict(name='kpt-65', id=65, color=[255, 0, 0], type='', swap=''),
66: dict(name='kpt-66', id=66, color=[255, 0, 0], type='', swap=''),
67: dict(name='kpt-67', id=67, color=[255, 0, 0], type='', swap=''),
},
skeleton_info={},
joint_weights=[1.] * 68,
sigmas=[])
dataset_info = dict(
dataset_name='aflw',
paper_info=dict(
author='Koestinger, Martin and Wohlhart, Paul and '
'Roth, Peter M and Bischof, Horst',
title='Annotated facial landmarks in the wild: '
'A large-scale, real-world database for facial '
'landmark localization',
container='2011 IEEE international conference on computer '
'vision workshops (ICCV workshops)',
year='2011',
homepage='https://www.tugraz.at/institute/icg/research/'
'team-bischof/lrs/downloads/aflw/',
),
keypoint_info={
0: dict(name='kpt-0', id=0, color=[255, 0, 0], type='', swap='kpt-5'),
1: dict(name='kpt-1', id=1, color=[255, 0, 0], type='', swap='kpt-4'),
2: dict(name='kpt-2', id=2, color=[255, 0, 0], type='', swap='kpt-3'),
3: dict(name='kpt-3', id=3, color=[255, 0, 0], type='', swap='kpt-2'),
4: dict(name='kpt-4', id=4, color=[255, 0, 0], type='', swap='kpt-1'),
5: dict(name='kpt-5', id=5, color=[255, 0, 0], type='', swap='kpt-0'),
6: dict(name='kpt-6', id=6, color=[255, 0, 0], type='', swap='kpt-11'),
7: dict(name='kpt-7', id=7, color=[255, 0, 0], type='', swap='kpt-10'),
8: dict(name='kpt-8', id=8, color=[255, 0, 0], type='', swap='kpt-9'),
9: dict(name='kpt-9', id=9, color=[255, 0, 0], type='', swap='kpt-8'),
10:
dict(name='kpt-10', id=10, color=[255, 0, 0], type='', swap='kpt-7'),
11:
dict(name='kpt-11', id=11, color=[255, 0, 0], type='', swap='kpt-6'),
12:
dict(name='kpt-12', id=12, color=[255, 0, 0], type='', swap='kpt-14'),
13: dict(name='kpt-13', id=13, color=[255, 0, 0], type='', swap=''),
14:
dict(name='kpt-14', id=14, color=[255, 0, 0], type='', swap='kpt-12'),
15:
dict(name='kpt-15', id=15, color=[255, 0, 0], type='', swap='kpt-17'),
16: dict(name='kpt-16', id=16, color=[255, 0, 0], type='', swap=''),
17:
dict(name='kpt-17', id=17, color=[255, 0, 0], type='', swap='kpt-15'),
18: dict(name='kpt-18', id=18, color=[255, 0, 0], type='', swap='')
},
skeleton_info={},
joint_weights=[1.] * 19,
sigmas=[])
dataset_info = dict(
dataset_name='aic',
paper_info=dict(
author='Wu, Jiahong and Zheng, He and Zhao, Bo and '
'Li, Yixin and Yan, Baoming and Liang, Rui and '
'Wang, Wenjia and Zhou, Shipei and Lin, Guosen and '
'Fu, Yanwei and others',
title='Ai challenger: A large-scale dataset for going '
'deeper in image understanding',
container='arXiv',
year='2017',
homepage='https://github.com/AIChallenger/AI_Challenger_2017',
),
keypoint_info={
0:
dict(
name='right_shoulder',
id=0,
color=[255, 128, 0],
type='upper',
swap='left_shoulder'),
1:
dict(
name='right_elbow',
id=1,
color=[255, 128, 0],
type='upper',
swap='left_elbow'),
2:
dict(
name='right_wrist',
id=2,
color=[255, 128, 0],
type='upper',
swap='left_wrist'),
3:
dict(
name='left_shoulder',
id=3,
color=[0, 255, 0],
type='upper',
swap='right_shoulder'),
4:
dict(
name='left_elbow',
id=4,
color=[0, 255, 0],
type='upper',
swap='right_elbow'),
5:
dict(
name='left_wrist',
id=5,
color=[0, 255, 0],
type='upper',
swap='right_wrist'),
6:
dict(
name='right_hip',
id=6,
color=[255, 128, 0],
type='lower',
swap='left_hip'),
7:
dict(
name='right_knee',
id=7,
color=[255, 128, 0],
type='lower',
swap='left_knee'),
8:
dict(
name='right_ankle',
id=8,
color=[255, 128, 0],
type='lower',
swap='left_ankle'),
9:
dict(
name='left_hip',
id=9,
color=[0, 255, 0],
type='lower',
swap='right_hip'),
10:
dict(
name='left_knee',
id=10,
color=[0, 255, 0],
type='lower',
swap='right_knee'),
11:
dict(
name='left_ankle',
id=11,
color=[0, 255, 0],
type='lower',
swap='right_ankle'),
12:
dict(
name='head_top',
id=12,
color=[51, 153, 255],
type='upper',
swap=''),
13:
dict(name='neck', id=13, color=[51, 153, 255], type='upper', swap='')
},
skeleton_info={
0:
dict(link=('right_wrist', 'right_elbow'), id=0, color=[255, 128, 0]),
1: dict(
link=('right_elbow', 'right_shoulder'), id=1, color=[255, 128, 0]),
2: dict(link=('right_shoulder', 'neck'), id=2, color=[51, 153, 255]),
3: dict(link=('neck', 'left_shoulder'), id=3, color=[51, 153, 255]),
4: dict(link=('left_shoulder', 'left_elbow'), id=4, color=[0, 255, 0]),
5: dict(link=('left_elbow', 'left_wrist'), id=5, color=[0, 255, 0]),
6: dict(link=('right_ankle', 'right_knee'), id=6, color=[255, 128, 0]),
7: dict(link=('right_knee', 'right_hip'), id=7, color=[255, 128, 0]),
8: dict(link=('right_hip', 'left_hip'), id=8, color=[51, 153, 255]),
9: dict(link=('left_hip', 'left_knee'), id=9, color=[0, 255, 0]),
10: dict(link=('left_knee', 'left_ankle'), id=10, color=[0, 255, 0]),
11: dict(link=('head_top', 'neck'), id=11, color=[51, 153, 255]),
12: dict(
link=('right_shoulder', 'right_hip'), id=12, color=[51, 153, 255]),
13:
dict(link=('left_shoulder', 'left_hip'), id=13, color=[51, 153, 255])
},
joint_weights=[
1., 1.2, 1.5, 1., 1.2, 1.5, 1., 1.2, 1.5, 1., 1.2, 1.5, 1., 1.
],
# 'https://github.com/AIChallenger/AI_Challenger_2017/blob/master/'
# 'Evaluation/keypoint_eval/keypoint_eval.py#L50'
# delta = 2 x sigma
sigmas=[
0.01388152, 0.01515228, 0.01057665, 0.01417709, 0.01497891, 0.01402144,
0.03909642, 0.03686941, 0.01981803, 0.03843971, 0.03412318, 0.02415081,
0.01291456, 0.01236173
])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment