forked from noahcao/OC_SORT
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
init code commit after refactoring code
- Loading branch information
Showing
243 changed files
with
111,094 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
evaldata/ | ||
# C extensions | ||
*.so | ||
traj_plots | ||
# Distribution / packaging | ||
datasets/ | ||
.Python | ||
build/ | ||
evaldata | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
pip-wheel-metadata/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
datasets/ | ||
# 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/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# 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/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
# output | ||
docs/api | ||
.code-workspace.code-workspace | ||
*.pkl | ||
*.npy | ||
*.pth | ||
*.onnx | ||
*.engine | ||
events.out.tfevents* | ||
pretrained | ||
YOLOX_outputs | ||
visualizations | ||
results/ | ||
error_log.txt | ||
dance_detections/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
FROM nvcr.io/nvidia/tensorrt:21.09-py3 | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
ARG USERNAME=user | ||
ARG WORKDIR=/workspace/OC_SORT | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
automake autoconf libpng-dev nano python3-pip \ | ||
curl zip unzip libtool swig zlib1g-dev pkg-config \ | ||
python3-mock libpython3-dev libpython3-all-dev \ | ||
g++ gcc cmake make pciutils cpio gosu wget \ | ||
libgtk-3-dev libxtst-dev sudo apt-transport-https \ | ||
build-essential gnupg git xz-utils vim \ | ||
libva-drm2 libva-x11-2 vainfo libva-wayland2 libva-glx2 \ | ||
libva-dev libdrm-dev xorg xorg-dev protobuf-compiler \ | ||
openbox libx11-dev libgl1-mesa-glx libgl1-mesa-dev \ | ||
libtbb2 libtbb-dev libopenblas-dev libopenmpi-dev \ | ||
&& sed -i 's/# set linenumbers/set linenumbers/g' /etc/nanorc \ | ||
&& apt clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN git clone https://github.com/noahcao/OC_SORT\ | ||
&& cd OC_SORT \ | ||
&& git checkout 3434c5e8bc6a5ae8ad530528ba8d9a431967f237 \ | ||
&& mkdir -p YOLOX_outputs/yolox_x_mix_det/track_vis \ | ||
&& sed -i 's/torch>=1.7/torch==1.9.1+cu111/g' requirements.txt \ | ||
&& sed -i 's/torchvision==0.10.0/torchvision==0.10.1+cu111/g' requirements.txt \ | ||
&& sed -i "s/'cuda'/0/g" tools/demo_track.py \ | ||
&& pip3 install pip --upgrade \ | ||
&& pip3 install -r requirements.txt -f https://download.pytorch.org/whl/torch_stable.html \ | ||
&& python3 setup.py develop \ | ||
&& pip3 install cython \ | ||
&& pip3 install 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI' \ | ||
&& pip3 install cython_bbox gdown \ | ||
&& ldconfig \ | ||
&& pip cache purge | ||
|
||
RUN git clone https://github.com/NVIDIA-AI-IOT/torch2trt \ | ||
&& cd torch2trt \ | ||
&& git checkout 0400b38123d01cc845364870bdf0a0044ea2b3b2 \ | ||
# https://github.com/NVIDIA-AI-IOT/torch2trt/issues/619 | ||
&& wget https://github.com/NVIDIA-AI-IOT/torch2trt/commit/8b9fb46ddbe99c2ddf3f1ed148c97435cbeb8fd3.patch \ | ||
&& git apply 8b9fb46ddbe99c2ddf3f1ed148c97435cbeb8fd3.patch \ | ||
&& python3 setup.py install | ||
|
||
RUN echo "root:root" | chpasswd \ | ||
&& adduser --disabled-password --gecos "" "${USERNAME}" \ | ||
&& echo "${USERNAME}:${USERNAME}" | chpasswd \ | ||
&& echo "%${USERNAME} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/${USERNAME} \ | ||
&& chmod 0440 /etc/sudoers.d/${USERNAME} | ||
USER ${USERNAME} | ||
RUN sudo chown -R ${USERNAME}:${USERNAME} ${WORKDIR} | ||
WORKDIR ${WORKDIR} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 Yifu Zhang | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
## ByteTrack-ONNXRuntime in Python | ||
|
||
This doc introduces how to convert your pytorch model into onnx, and how to run an onnxruntime demo to verify your convertion. | ||
|
||
### Convert Your Model to ONNX | ||
|
||
```shell | ||
cd <ByteTrack_HOME> | ||
python3 tools/export_onnx.py --output-name bytetrack_s.onnx -f exps/example/mot/yolox_s_mix_det.py -c pretrained/bytetrack_s_mot17.pth.tar | ||
``` | ||
|
||
### ONNXRuntime Demo | ||
|
||
You can run onnx demo with **16 FPS** (96-core Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz): | ||
|
||
```shell | ||
cd <ByteTrack_HOME>/deploy/ONNXRuntime | ||
python3 onnx_inference.py | ||
``` |
Oops, something went wrong.