Skip to content

Conversation

@jveitchmichaelis
Copy link

@jveitchmichaelis jveitchmichaelis commented Oct 12, 2022

Fixes deprecation warning as per #103.

Linted/blacked + tests pass locally, although I don't believe there is a test case that covers this anyway (the existing transform works, but it will print a warning every time).

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 12, 2022
@PeterMitrano
Copy link

I ran into an error because of this (not a warning) given the following library versions.

shapely==2.0.0
fvcore==0.1.5.post20220512
detectron2 @ git+https://github.com/facebookresearch/detectron2.git@58e472e076a5d861fdcf773d9254a3664e045bf8

This PR fixes the problem for me!

@PeterMitrano
Copy link

@ppwwyyxx
@nikhilaravi
Can someone take a look at this? It's been up for months and solves an error for me.

The error was getting for reference:

Traceback (most recent call last):
...
  File "/usr/lib/python3/dist-packages/detectron2/data/detection_utils.py", line 310, in transform_instance_annotations
    p.reshape(-1) for p in transforms.apply_polygons(polygons)
  File "/usr/lib/python3/dist-packages/fvcore/transforms/transform.py", line 297, in <lambda>
    return lambda x: self._apply(x, name)
  File "/usr/lib/python3/dist-packages/fvcore/transforms/transform.py", line 291, in _apply
    x = getattr(t, meth)(x)
  File "/usr/lib/python3/dist-packages/fvcore/transforms/transform.py", line 724, in apply_polygons
    for poly in cropped:
TypeError: 'MultiPolygon' object is not iterable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants