diff --git a/MANIFEST.in b/MANIFEST.in index 959d48e..8d58b75 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,13 +1,4 @@ -include maps.txt include README.md include README.rst +include ivtmetrics/maps.txt recursive-include data * -README.txt -setup.cfg -setup.py -maps.txt -ivtmetrics/__init__.py -ivtmetrics/detection.py -ivtmetrics/disentangle.py -ivtmetrics/recognition.py -ivtmetrics/maps.txt diff --git a/README.rst b/README.rst index b8f0b72..ee52e67 100644 --- a/README.rst +++ b/README.rst @@ -19,7 +19,8 @@ Supports disentangle prediction and obtained filtered performance for the various components of the triplets as well as their association performances at various levels. -## Installation +Installation +============ Install via PyPi ~~~~~~~~~~~~~~~~ @@ -39,7 +40,8 @@ Install via Conda Python 3.5-3.9 and numpy and scikit-learn are required. -## Metrics +Metrics +======= The metrics have been aligned with what is reported by `CholecT50 `__ benchmark. @@ -133,7 +135,8 @@ args: - the output is a ``dict`` with keys(“AP”, “mAP”) for per-class and mean AP respectively. -#### Example usage +Example usage +~~~~~~~~~~~~~ .. code:: python @@ -232,7 +235,7 @@ The following function are possible with the ``Detection`` class: args: ~~~~~ -1. **list of list format**: [[tripletID, toolID, toolProbs, x, y, w, h], +1. ``list of list format``: [[tripletID, toolID, toolProbs, x, y, w, h], [tripletID, toolID, toolProbs, x, y, w, h], …], where: - ``tripletID`` = triplet unique identity @@ -244,7 +247,7 @@ args: - ``h`` = height of the box - The [x,y,w,h] are scaled between 0..1 -2. **list of dict format**: [{“triplet”:tripletID, “instrument”:[toolID, +2. ``list of dict format``: [{“triplet”:tripletID, “instrument”:[toolID, toolProbs, x, y, w, h]}, {“triplet”:tripletID, “instrument”:[toolID, toolProbs, x, y, w, h]}, …]. 3. ``format`` args describes the input format with either of the values @@ -258,7 +261,8 @@ args: “mPre”) for per-class AP, mean AP, per-class Recall, mean Recall, per-class Precision and mean Precision respectively. -#### Example usage +Example usage +~~~~~~~~~~~~~ .. code:: python @@ -303,11 +307,13 @@ args: Any ``nan`` value in results is for classes with no occurrence in the data sample. -## Docker +Docker +====== coming soon .. -# Citation +Citation +======== If you use this metrics in your project or research, please consider citing the associated publication: @@ -321,7 +327,8 @@ citing the associated publication: year={2021} } -### References +References +========== 1. Nwoye, C. I., Yu, T., Gonzalez, C., Seeliger, B., Mascagni, P., Mutter, D., … & Padoy, N. (2021). Rendezvous: Attention Mechanisms @@ -335,6 +342,7 @@ citing the associated publication: 3. https://cholectriplet2021.grand-challenge.org 4. http://camma.u-strasbg.fr/datasets + License ------- diff --git a/ivtmetrics/__init__.py b/ivtmetrics/__init__.py index 9fb401d..0480d75 100644 --- a/ivtmetrics/__init__.py +++ b/ivtmetrics/__init__.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- __library__ = "ivtmetrics" -__version__ = "0.0.4" +__version__ = "0.0.5" __author__ = 'Chinedu Nwoye' __supervisor__ = 'Nicolas Padoy' __credits__ = 'CAMMA, ICube Lab, University of Strasbourg, France' diff --git a/ivtmetrics/disentangle.py b/ivtmetrics/disentangle.py index dc659f3..bb7d802 100644 --- a/ivtmetrics/disentangle.py +++ b/ivtmetrics/disentangle.py @@ -26,7 +26,7 @@ class Disentangle(object): call filter a component labels from the inputs labels """ - def __init__(self, url="maps.txt"): + def __init__(self, url="maps.py"): self.bank = np.genfromtxt(url, dtype=int, comments='#', delimiter=',', skip_header=0) def decompose(self, inputs, component): diff --git a/setup.py b/setup.py index 628a469..dd4f0b1 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name='ivtmetrics', - version='0.0.4', + version='0.0.5', packages=['ivtmetrics'], author='Chinedu Nwoye', author_email='nwoye@unistra.fr', @@ -15,9 +15,8 @@ long_description = long_description, long_description_content_type ='text/x-rst', url='https://github.com/CAMMA-public/ivtmetrics', - download_url = 'https://github.com/CAMMA-public/ivtmetrics/archive/refs/tags/v0.0.4.tar.gz', # I explain this later on + download_url = 'https://github.com/CAMMA-public/ivtmetrics/archive/refs/tags/v0.0.5.tar.gz', # I explain this later on license='BSD 2-clause', # Chose a license from here: https://help.github.com/articles/licensing-a-repository - package_data={'': ['ivtmetrics/maps.txt', 'README.md', 'README.rst']}, include_package_data=True, install_requires=['scikit-learn', 'numpy', @@ -39,4 +38,5 @@ ) # guide @ https://medium.com/@joel.barmettler/how-to-upload-your-python-package-to-pypi-65edc5fe9c56 -# 'Operating System :: POSIX :: Linux :: Windows :: Mac :: Unix', +# 'Operating System :: POSIX :: Linux :: Windows :: Mac :: Unix', +# package_data={'': ['ivtmetrics/maps.txt', 'README.md', 'README.rst']},