|
@@ -7,12 +7,12 @@ from .annotation import BBoxPart
|
|
|
|
|
|
class Parts(BasePartCollection):
|
|
|
|
|
|
- def __init__(self, image, part_annotations, rescale_size):
|
|
|
+ def __init__(self, image, part_annotations, *args, **kwargs):
|
|
|
super(Parts, self).__init__()
|
|
|
if part_annotations is None:
|
|
|
self._parts = []
|
|
|
else:
|
|
|
- self._parts = [BasePart.new(image, a, rescale_size) for a in part_annotations]
|
|
|
+ self._parts = [BasePart.new(image, a, *args, **kwargs) for a in part_annotations]
|
|
|
|
|
|
|
|
|
class UniformParts(BasePartCollection):
|
|
@@ -37,4 +37,4 @@ class UniformParts(BasePartCollection):
|
|
|
row, col = np.unravel_index(i, (n, m))
|
|
|
x, y = col * part_w, row * part_h
|
|
|
|
|
|
- yield BBoxPart(im, [i, x, y, part_w, part_h])
|
|
|
+ yield BBoxPart(im, [i, x, y, part_w, part_h], center_cropped=False)
|