Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tadejsv/EvalDeT
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.1.4
Choose a base ref
...
head repository: tadejsv/EvalDeT
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 10 commits
  • 72 files changed
  • 1 contributor

Commits on Sep 29, 2022

  1. Fix MOT and CVAT imports (#20)

    * Fix MOT and CVAT import
    
    * Change packaging from poetry to hatch
    
    * Add changelog
    
    * Fix readme
    
    * Fix CI env
    tadejsv authored Sep 29, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    879a161 View commit details
  2. Fix publishing (#21)

    tadejsv authored Sep 29, 2022
    Copy the full SHA
    18330db View commit details

Commits on Oct 2, 2022

  1. Fix typing for Python 3.8 (#22)

    * Fix typing for Python 3.8
    
    * Fix set typing
    
    * Add changelog and bump version
    tadejsv authored Oct 2, 2022
    Copy the full SHA
    4188cf4 View commit details

Commits on Oct 5, 2022

  1. ID and HOTA metric performance improvements (#23)

    * Improve ID metrics to use less memory
    
    * Improve HOTA and ID metrics computation
    
    * One more simplification
    tadejsv authored Oct 5, 2022
    Copy the full SHA
    ce6df1f View commit details

Commits on Oct 11, 2022

  1. Add new features to Tracks (#24)

    * Bump version
    
    * Add slicing and some new tests
    
    * Add slicing with all tests
    
    * Add exports plus tests
    
    * Update changelog
    
    * Remove comments
    tadejsv authored Oct 11, 2022
    Copy the full SHA
    5f0866c View commit details
  2. Add py.typed file (#26)

    tadejsv authored Oct 11, 2022
    Copy the full SHA
    8729e7b View commit details
  3. Hotfix: bump version

    tadejsv committed Oct 11, 2022
    Copy the full SHA
    2f18c7c View commit details

Commits on Dec 2, 2022

  1. Refactor and add parquet format (#30)

    * WIP
    
    * Add documentation
    
    * Finish refactoring
    
    * Fix some env things
    
    * Add parquet export/import
    
    * Update version and changelog
    tadejsv authored Dec 2, 2022
    Copy the full SHA
    a60fe17 View commit details

Commits on Jun 5, 2023

  1. Add COCO object detection metrics (#36)

    * Drop support for python 3.8
    
    * Update CI and some types
    
    * Reformat code, move unnecessary classes to functions
    
    * Move olddocs to new folder
    
    * WIP
    
    * Finish PR curve
    
    * WIP
    
    * WIP
    
    * Change coco
    
    * WIP
    
    * WIP
    
    * Improvements
    
    * Final changes
    
    * Fix env.yaml for CI
    
    * Fix numba for CI
    
    * More CI fix
    
    * Fix numba req
    
    * Fix ci
    
    * Remove some wrong name hardcoding
    
    * Last refactoring
    
    * Fix typing
    
    * Changelog fix
    tadejsv authored Jun 5, 2023
    Copy the full SHA
    27c22f8 View commit details

Commits on Jul 12, 2024

  1. Remove upper limits on dependencies (#38)

    * Remove upper limits on dependencies
    
    * Update CHANGELOG.md
    
    * Bump version
    tadejsv authored Jul 12, 2024
    Copy the full SHA
    66db55c View commit details
Showing with 6,051 additions and 1,672 deletions.
  1. +0 −8 .flake8
  2. +4 −5 .github/workflows/cd.yaml
  3. +8 −7 .github/workflows/ci.yaml
  4. +0 −22 .pre-commit-config.yaml
  5. +0 −23 .readthedocs.yaml
  6. +72 −0 CHANGELOG.md
  7. +1 −1 Makefile
  8. +14 −2 env.yaml
  9. 0 {docs → old_docs}/Makefile
  10. 0 {docs → old_docs}/make.bat
  11. 0 {docs → old_docs}/requirements.txt
  12. 0 {docs → old_docs}/source/conf.py
  13. 0 {docs → old_docs}/source/guide/index.rst
  14. 0 {docs → old_docs}/source/index.rst
  15. 0 {docs → old_docs}/source/reference/dist.rst
  16. 0 {docs → old_docs}/source/reference/index.rst
  17. 0 {docs → old_docs}/source/reference/metrics.rst
  18. 0 {docs → old_docs}/source/reference/tracks.rst
  19. 0 {docs → old_docs}/source/start.rst
  20. +45 −28 pyproject.toml
  21. +2 −2 src/evaldet/__init__.py
  22. +547 −0 src/evaldet/det/coco.py
  23. +160 −0 src/evaldet/det/utils.py
  24. +455 −0 src/evaldet/detections.py
  25. +33 −17 src/evaldet/dist.py
  26. +4 −0 src/evaldet/mot/__init__.py
  27. 0 src/evaldet/{mot_metrics → mot}/alta.py
  28. +129 −0 src/evaldet/mot/clearmot.py
  29. +141 −0 src/evaldet/mot/hota.py
  30. +90 −0 src/evaldet/mot/identity.py
  31. +37 −35 src/evaldet/{metrics.py → mot/motmetrics.py}
  32. +69 −0 src/evaldet/mot/utils.py
  33. +0 −15 src/evaldet/mot_metrics/base.py
  34. +0 −109 src/evaldet/mot_metrics/clearmot.py
  35. +0 −138 src/evaldet/mot_metrics/hota.py
  36. +0 −70 src/evaldet/mot_metrics/identity.py
  37. 0 src/evaldet/{mot_metrics/__init__.py → py.typed}
  38. +647 −381 src/evaldet/tracks.py
  39. +45 −0 src/evaldet/utils/prec_recall.py
  40. +0 −39 src/evaldet/utils/preprocess.py
  41. +8 −0 tests/conftest.py
  42. +8 −0 tests/data/csv_save/dets.csv
  43. +3 −0 tests/data/csv_save/labels.txt
  44. +2 −0 tests/data/cvat_video_export.xml
  45. +2 −0 tests/data/cvat_video_export_empty.xml
  46. +125 −0 tests/data/detections/coco.json
  47. +32 −0 tests/data/detections/coco_nums.json
  48. BIN tests/data/detections/sample.parquet
  49. BIN tests/data/empty.parquet
  50. +1 −0 tests/data/integration/dets_coco.json
  51. +1 −0 tests/data/integration/gts_coco.json
  52. BIN tests/data/out.parquet
  53. +8 −8 tests/data/tracks/cvat_mot_sample.csv
  54. +1 −0 tests/data/tracks/cvat_video_sample.xml
  55. +8 −8 tests/data/tracks/mot_sample.csv
  56. +20 −0 tests/integration/test_integration_coco.py
  57. +21 −16 tests/integration/{test_integration.py → test_integration_mot.py}
  58. 0 tests/unit/{test_utils.py → __init__.py}
  59. +95 −0 tests/unit/conftest.py
  60. +80 −133 tests/unit/test_clearmot.py
  61. +524 −0 tests/unit/test_coco_compute.py
  62. +1,215 −0 tests/unit/test_coco_metrics.py
  63. +260 −0 tests/unit/test_det_utils.py
  64. +304 −0 tests/unit/test_detections.py
  65. +147 −0 tests/unit/test_detections_io.py
  66. +5 −3 tests/unit/test_dist.py
  67. +136 −191 tests/unit/test_hota.py
  68. +87 −125 tests/unit/test_identity.py
  69. +7 −6 tests/unit/test_mot_metrics.py
  70. +101 −0 tests/unit/test_prec_recall_curve.py
  71. +225 −280 tests/unit/test_tracks.py
  72. +122 −0 tests/unit/test_tracks_export.py
8 changes: 0 additions & 8 deletions .flake8

This file was deleted.

9 changes: 4 additions & 5 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -13,12 +13,11 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Setup mamba
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-file: env.yaml
- name: Install package with requirements
run: poetry install --no-dev
- name: Build and publish
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: poetry publish --build
HATCH_INDEX_USER: __token__
HATCH_INDEX_AUTH: ${{ secrets.PYPI_TOKEN }}
run: hatch build && hatch publish
15 changes: 8 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -16,11 +16,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Setup mamba
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-file: env.yaml
- name: Install package with requirements
run: poetry install
create-args: >-
python=3.9
- name: Lint
run: make lint

@@ -33,19 +33,20 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest, macos-latest]
python-version: ["3.9", "3.10"]
python-version: ["3.9", "3.10", "3.11"]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
with:
lfs: true
- name: Setup mamba
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-file: env.yaml
extra-specs: python=${{ matrix.python-version }}
create-args: >-
python=${{ matrix.python-version }}
- name: Install package with requirements
run: poetry install
run: pip install -e .
- name: Run PyTest
run: pytest
22 changes: 0 additions & 22 deletions .pre-commit-config.yaml

This file was deleted.

23 changes: 0 additions & 23 deletions .readthedocs.yaml

This file was deleted.

72 changes: 72 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -4,6 +4,78 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## 0.4.1 - 2024-07-12

* Remove upper limits on dependencies (#38)

## 0.4.0 - 2023-06-06

### Added

* Add module for computing COCO object detection metrics (#36)
* Add Detections class to represent object detections, and load from and save to COCO and parquet formats (#36)

### Changed

* Drop support for Python 3.8, add support for Python 3.11 (#36)
* Refactor the individual MOT metrics from classes to functions (#36)

## [0.3.0] - 2022-12-02

### Added

* Support for reading/writing to parquet formats ([#30](https://github.com/tadejsv/EvalDeT/pull/30))

### Changed

* Changed internal representation of attributes to use a single numpy array instead of per-frame dict ([#30](https://github.com/tadejsv/EvalDeT/pull/30))

## [0.2.1] - 2022-10-11

### Added

* A `py.typed` file to support typing of this library in installations ([#25](https://github.com/tadejsv/EvalDeT/pull/25))

## [0.2.0] - 2022-10-11

### Added

* Slicing of `Tracks` ([#24](https://github.com/tadejsv/EvalDeT/pull/24))
* Export of `Tracks` to CVAT for Video and a custom CSV format ([#24](https://github.com/tadejsv/EvalDeT/pull/24))

### Changed

* When creating tracks, if `confs` or `classes` are not provided, they are now given a default value, instead of being `None`. ([#24](https://github.com/tadejsv/EvalDeT/pull/24))

## [0.1.8] - 2022-10-05

### Changed

* Improve HOTA metrics to use less memory ([#23](https://github.com/tadejsv/EvalDeT/pull/23))
* Improve ID metrics to use less memory ([#23](https://github.com/tadejsv/EvalDeT/pull/23))

## [0.1.7] - 2022-10-02

### Fixed

* Fix typing for compatibility with Python 3.8 ([#22](https://github.com/tadejsv/EvalDeT/pull/22))

## [0.1.6] - 2022-09-29

### Changed

* Fix publishing with `hatch` ([#21](https://github.com/tadejsv/EvalDeT/pull/21))

## [0.1.5] - 2022-09-29

### Changed

* Fix correct 1-index frame handling for MOT-based files ([#20](https://github.com/tadejsv/EvalDeT/pull/20))
* Fix handling of "outside" detections in CVAT format ([#20](https://github.com/tadejsv/EvalDeT/pull/20))

* Switch to `hatch` for packaging ([#20](https://github.com/tadejsv/EvalDeT/pull/20))


## [0.1.4] - 2022-08-29

### Changed
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: lint
lint:
flake8 .
ruff .
black --check .
isort --check-only .
mypy .
16 changes: 14 additions & 2 deletions env.yaml
Original file line number Diff line number Diff line change
@@ -2,6 +2,18 @@ name: EvalDeT
channels:
- conda-forge
dependencies:
- python
- python>=3.9
- pip
- poetry
- hatch=1.7.0
- numpy=1.23.5
- numba>=0.56.4
- scipy=1.10.1
- ruff=0.0.265
- black=23.3.0
- pytest=7.3.1
- isort=5.12.0
- mypy=1.2.0
- pyarrow=11.0.0
- pip:
- freezegun==1.2.2
- deepdiff==6.3.0
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
73 changes: 45 additions & 28 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,55 +1,72 @@
[build-system]
requires = ["poetry-core>=1.1.0"]
build-backend = "poetry.core.masonry.api"
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.poetry]
[project]
name = "evaldet"
version = "0.1.4"
description = "Evaluation for Detection and Tracking"
license = "Apache-2.0"
authors = ["Tadej Svetina <tadej.svetina@gmail.com>"]
authors = [
{ name = "Tadej", email = "tadej.svetina@gmail.com" },
]
readme = "README.md"
repository = "https://github.com/tadejsv/evaldet"
documentation = "https://evaldet.readthedocs.io"
requires-python = ">=3.9"
keywords = ["evaluation", "tracking", "object detection", "computer vision"]
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Development Status :: 4 - Beta",
"Topic :: Scientific/Engineering :: Image Recognition",
]
include = ["README.md", "LICENSE"]

[tool.poetry.dependencies]
python = ">=3.9,<3.11"
numpy = "^1.23.2"
scipy = "^1.9.0"

[tool.poetry.dev-dependencies]
pytest = "^7.1.2"
flake8 = "^5.0.4"
black = "^22.6.0"
isort = "^5.10.1"
mypy = "^0.971"
Sphinx = "^5.1.1"
pydata-sphinx-theme = "^0.9.0"
sphinx-autodoc-typehints = "^1.19.2"
pre-commit = "^2.20.0"
dependencies = [
"numpy>=1.23",
"scipy>=1.9",
"numba>=0.56",
"pyarrow>=10.0"
]
dynamic = ["version"]

[tool.hatch.version]
path = "src/evaldet/__init__.py"

[project.urls]
Documentation = "https://evaldet.readthedocs.io"
Issues = "https://github.com/tadejsv/evaldet/issues"
Source = "https://github.com/sasp-ai/evaldet"

[tool.hatch.build.targets.sdist]
exclude = [
"/.github",
"/.vscode",
"/docs",
"/tests"
]

[tool.ruff]
select = ["E", "F", "Q", "N", "ANN", "T20", "TID", "SIM"]
ignore = ["N806", "N805", "E501", "ANN101", "ANN102", "SIM108"]
target-version = "py310"
extend-exclude = ["old_docs/source/conf.py"]

[tool.ruff.flake8-quotes]
docstring-quotes = "double"

[tool.isort]
profile = "black"

[tool.mypy]
exclude = ['^tests/.*\.py', 'docs/source/conf.py']
exclude = ['old_docs/source/conf.py']
disallow_untyped_defs = true
ignore_missing_imports = true
# disallow_any_unimported = true
ignore_missing_imports = false
disallow_any_unimported = false
no_implicit_optional = true
check_untyped_defs = true
warn_unused_ignores = true
show_error_codes = true

[[tool.mypy.overrides]]
module = ["scipy"]
module = ["scipy.*", "pyarrow.*", "numba.*", "deepdiff.*"]
ignore_missing_imports = true
4 changes: 2 additions & 2 deletions src/evaldet/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.1.4"
__version__ = "0.4.1"

from .metrics import MOTMetrics # noqa: F401
from .detections import Detections # noqa: F401
from .tracks import Tracks # noqa: F401
Loading