Skip to content

Commit

Permalink
Public code release.
Browse files Browse the repository at this point in the history
  • Loading branch information
fubel committed Sep 17, 2024
1 parent eba3056 commit 9a90543
Show file tree
Hide file tree
Showing 18 changed files with 2,376 additions and 0 deletions.
171 changes: 171 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
# Project-specific
data/
eval/
resources/
outputs/
wandb/

.ruff_cache

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-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/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# 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
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .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

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
.pdm.toml
.pdm-python
.pdm-build/

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__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/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
83 changes: 83 additions & 0 deletions conf/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# config.yaml
hydra/hydra_logging: null

defaults:
- dataset: CityFlow
- encoder: precomputed

dataset_path: ./data/AICITY/
output_path: ./outputs/

device: cuda

logging:
wandb:
enable: false
project: ggmc
upload_results: false
tags: null
tensorboard:
enable: false

resources:
path: ./resources/
detector: YOLOX
reid: null

visuals:
plot_interval: 1
plot_results: false
plot_ground_truth: false
plot_to_tensorboard: false
grid_rows: 2
store_files: true
border_size: 3

solver:
backend: PD

tracker:
matching:
distance_threshold: 0.02
rescale_threshold: 0.65
reid_decay: 1.0
rescale_weight: 0.5
distance_weight: 0.5
confidence_thresh: 0.7
low_confidence_thresh: null
patience: 1
memory: 15
fdim: 512
enable_accumulator: true
prematching:
enabled: true
iou_bias: 0.60
iou_threshold: 0.50
prune_remaining: false

preprocess:
nms_thresh: null
roi_filter: true
bottom: true
box_projection_centers:
alpha_w: null
alpha_h: null

postprocess:
expand_boxes:
enable: true
factor: 1.4
remove_borders:
enable: true
border_size: 5
size_filter:
enable: true
min_size: 6220
max_size: 622080

evaluation:
inplace: true
evaluate_standard: true
evaluate_hota: false
evaluate_bev: false
evaluate_external: true
8 changes: 8 additions & 0 deletions conf/dataset/CityFlow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: AICITY
scene_path: ./validation/S02
camera_pattern: c00*
img_path: ./img1/
img_ext: jpg
offsets: [0, 0, 3, 8]
calibration_path: calibration.json
roi_path: "./data/AICITY/eval/ROIs/validation"
1 change: 1 addition & 0 deletions conf/encoder/precomputed.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name: precomputed
44 changes: 44 additions & 0 deletions conf/experiment/CityFlow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# @package _global_

defaults:
- override /dataset: CityFlow
- override /encoder: precomputed

dataset_path: ./data/AICITY/

resources:
reid: LCFractal
detector: YOLOX

tracker:
matching:
distance_threshold: 0.001
rescale_threshold: 0.7
reid_decay: 0.7
rescale_weight: 0.9
confidence_thresh: 0.70
low_confidence_thresh: null
patience: 0
memory: 160
fdim: 2048
prematching:
enabled: false
iou_bias: 0.50
iou_threshold: 0.70
prune_remaining: false

preprocess:
nms_thresh: 0.7
roi_filter: true

postprocess:
expand_boxes:
enable: true
factor: 1.4
remove_borders:
enable: true
border_size: 0
size_filter:
enable: true
min_size: 6000
max_size: 600000
35 changes: 35 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
from setuptools import find_packages, setup


setup(
name="stmc",
version="0.1.0",
packages=find_packages(),
install_requires=[
"hydra-core",
"torch",
"wandb",
"loguru",
"omegaconf",
"qqdm",
"pillow",
"ramapy",
],
entry_points={
"console_scripts": [
"track=tools.track:main",
],
},
author="Fabian Herzog",
author_email="[email protected]",
description="Spatial-Temporal Multi-Cuts for Online Multiple-Camera Vehicle Tracking",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
url="https://github.com/fubel/stmc",
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires=">=3.8",
)
Empty file added src/__init__.py
Empty file.
Loading

0 comments on commit 9a90543

Please sign in to comment.