Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG Fix #20

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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 PythonAPI/pycocotools/cocoeval.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ def _toMask(anns, coco):
_toMask(dts, self.cocoDt)
# set ignore flag
for gt in gts:
gt['ignore'] = gt['ignore'] if 'ignore' in gt else 0
gt['ignore'] = 'iscrowd' in gt and gt['iscrowd']
gt['ignore'] = gt['ignore'] if 'ignore' in gt else 0 # Ensure that Flag exists
gt['ignore'] |= 'iscrowd' in gt and gt['iscrowd'] # Set to iscrowd or leave as ignored if already so (BUG Fix)
if p.iouType == 'keypoints':
gt['ignore'] = (gt['num_keypoints'] == 0) or gt['ignore']
gt['ignore'] |= (gt['num_keypoints'] == 0)
self._gts = defaultdict(list) # gt for evaluation
self._dts = defaultdict(list) # dt for evaluation
for gt in gts:
Expand Down
20 changes: 2 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,7 @@

# pycocotools

This is a fork of the original [cocoapi](https://github.com/cocodataset/cocoapi), with bug fixes and packaging improvements.

This is also the source of the pypi package `pycocotools`, available for download at [pypi](https://pypi.org/project/pycocotools/).
This is a fork of [pycocotools](https://github.com/ppwwyyxx/cocoapi) which is itself a fork of the original [cocoapi](https://github.com/cocodataset/cocoapi), with bug fixes and packaging improvements.

Changes in this fork include:
* Add CircleCI tests
* Support pip-installation correctly
* Support windows
* Don't import matplotlib unless needed
* Close file handle after openning
* Fix a small bug in rleToBbox
* Fix a segfault in RLE decoding
* Fix deprecated usage of other libraries

For compatibility, we will not make any API changes or non-bug behavior changes to the existing APIs of the official cocoapi.

## Instructions for maintainers: to build a sdist package:
```
python -m build --sdist ./PythonAPI
```
* Fix a bug in the use of the ignore flag