Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
all:
# install pycocotools locally
pip install -r requirements.txt
python setup.py build_ext --inplace
python3 setup.py build_ext --inplace
rm -rf build

install:
# install pycocotools to the Python site-packages
python setup.py build_ext install
rm -rf build
python3 setup.py build_ext install
rm -rf build
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ Use the Makefile to install the coco-analyze api:
### Usage
To run the extended multi-instance keypoint estimation error analysis: update the paths of the detections and annotations and execute the command line.

[annFile] -> ./annotations/keypoints_val2014.json
[annFile] -> ./annotations/person_keypoints_val2014.json
[dtsFile] -> ./detections/fakekeypoints100_keypoints_val2014_results.json
[saveDir] -> ./results/fakekeypoints100
[teamName] -> fakekeypoints100
[version] -> 1.0
$ python run_analysis.py [annFile] [dtsFile] [saveDir] [teamName] [version]
$ python3 run_analysis.py [annFile] [dtsFile] [saveDir] [teamName] [version]

### Results
- A summary file called `[teamName]_performance_report.tex` will be created once the analysis is complete.
Expand Down
3 changes: 2 additions & 1 deletion analysisAPI/backgroundFalseNegErrors.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.path as mplPath
from scipy.misc import imresize
#from scipy.misc import imresize
from skimage.transform import resize as imresize
import skimage.io as io

# package imports
Expand Down
3 changes: 2 additions & 1 deletion analysisAPI/backgroundFalsePosErrors.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.path as mplPath
from scipy.misc import imresize
#from scipy.misc import imresize
from skimage.transform import resize as imresize
import skimage.io as io

# package imports
Expand Down
3 changes: 2 additions & 1 deletion analysisAPI/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
import matplotlib.path as mplPath
from matplotlib.collections import PatchCollection
from matplotlib.patches import Polygon
from scipy.misc import imresize
#from scipy.misc import imresize
from skimage.transform import resize as imresize
import skimage.io as io

"""
Expand Down
10 changes: 8 additions & 2 deletions pycocotools/cocoeval.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ def accumulate(self, p = None):
tps = np.logical_and( dtm, np.logical_not(dtIg) )
fps = np.logical_and(np.logical_not(dtm), np.logical_not(dtIg) )

np.float = float #For Numpy > 1.20
tp_sum = np.cumsum(tps, axis=1).astype(dtype=np.float)
fp_sum = np.cumsum(fps, axis=1).astype(dtype=np.float)
for t, (tp, fp) in enumerate(zip(tp_sum, fp_sum)):
Expand Down Expand Up @@ -616,8 +617,13 @@ def setKpParams(self):
self.imgIds = []
self.catIds = []
# np.arange causes trouble. the data point on arange is slightly larger than the true value
self.iouThrs = np.linspace(.5, 0.95, np.round((0.95 - .5) / .05) + 1, endpoint=True)
self.recThrs = np.linspace(.0, 1.00, np.round((1.00 - .0) / .01) + 1, endpoint=True)
#Switch from :
#self.iouThrs = np.linspace(.5, 0.95, np.round((0.95 - .5) / .05) + 1, endpoint=True)
#self.recThrs = np.linspace(.0, 1.00, np.round((1.00 - .0) / .01) + 1, endpoint=True)
#To :
self.iouThrs = np.linspace(.5, 0.95, int(np.round((0.95 - .5) / .05) + 1), endpoint=True)
self.recThrs = np.linspace(.0, 1.00, int(np.round((1.00 - .0) / .01) + 1), endpoint=True)
#Using this advice : https://github.com/matteorr/coco-analyze/issues/28
self.maxDets = [20]
self.areaRng = [[0 ** 2, 1e5 ** 2], [32 ** 2, 96 ** 2], [96 ** 2, 1e5 ** 2]]
self.areaRngLbl = ['all', 'medium', 'large']
Expand Down
7 changes: 6 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
pillow
cython
scipy
colour
numpy
matplotlib
matplotlib
jinja2
scikit-image