-
Notifications
You must be signed in to change notification settings - Fork 303
Conversation
How about |
OK |
chainercv/utils/__init__.py
Outdated
@@ -5,6 +5,7 @@ | |||
from chainercv.utils.download import extractall # NOQA | |||
from chainercv.utils.image import read_image # NOQA | |||
from chainercv.utils.image import write_image # NOQA | |||
from chainercv.utils.image.tile_images import tile_images # NOQA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from chainercv.utils.image import tile_images
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tile_images
comes before write_image
in alphabetical order.
chainercv/utils/image/tile_images.py
Outdated
for x in range(n_col): | ||
if k >= B: | ||
break | ||
start_y = y * (H + pad) + pad // 2 + 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you add 1
? In the case that pad == 0
, the top-left corner of the first image will be (1, 1)
although it should be (0, 0)
.
|
||
Returns: | ||
~numpy.ndarray: | ||
An image array in CHW format. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about adding a note about the output size?
The size of this image is :math:((H + pad) * \lceil B / n_col \rceil, (W + pad) * n_col)
chainercv/utils/image/tile_images.py
Outdated
|
||
Args: | ||
imgs (numpy.ndarray): A batch of images whose shape is BCHW. | ||
n_col (int): Number of columns in a tile. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The number
? (I found both Number of
and The number of
in our code)
|
||
@testing.parameterize(*testing.product({ | ||
'fill': [128, (104, 117, 123), np.random.uniform(255, size=(3, 1, 1))], | ||
'pad': [1, 2, 3] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about testing the case pad = 0
? With this test, this bug can be found.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Merge after #421
Output (with pad=3)

Output (with pad=50)
