-
Notifications
You must be signed in to change notification settings - Fork 304
Add return_bb option to CUBDatasets and add a test #399
Conversation
def test_cub_label_dataset(self): | ||
assert_is_classification_dataset( | ||
self.dataset, len(cub_label_names), n_example=10) | ||
|
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.
Is it possible to check the effect of crop_bbox
?
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.
It is totally different thing, but what do you think about changing this dataset to return bbox
instead of returning a cropped image.
This is more flexible because in some cases users want to crop an image by a padded bbox.
This can be done by replacing crop_bbox
option to return_bbox
. This style of interface is similar to VOCDetectionDataset
, which also can return extra data.
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.
Returning bbox
looks good to me. As you said, it will be more flexible. Perhaps, adding transforms.image.crop_with_bbox (or simply crop)
will be helpful. With this function, we can write cropped dataset easily,
TransformDataset(CUBLabelDataset(return_bbox), lambda in_data: crop_with_bbox(in_data[0], in_data[2]), in_data[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.
I think return_bbox
is an inaccurate name because we defined bbox
as a set of bounding boxes.
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.
I was thinking of returning a set of bbox (shape=(1,4)).
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.
Yes, it is redundant.
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.
But, I think it is better to keep data type consistent with other bboxes, so that we can use tools for bboxes.
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.
I think name return_bb
and returns (4,)
is better. User can bbox utils by bb[np.newaxis]/bb[None]
.
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.
OK.
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.
I reflected this change.
I noticed we have both |
You are right. On the other hand, |
From my understanding, As you pointed out, we can use annotation type instead of task type. In this case, we should change class names as follows:
|
In my opinion, there are three options. I slightly prefer 2 or 3.
In this case, I would also suggest the following names:
One advantage with this naming convention is that it only uses notations that have already been used in ChainerCV.
|
This is not true. For example, a detection dataset can be used for object counting task. |
I see. So it seems that option 3 is too arbitrary.
Although it is the name of the task, it is the name of the output. This can be improved. |
How about |
I am not sure if that name is common in the field. |
Personally, I prefer |
On top of the inherent inconsistency problem, the task name is longer (
I took a quick look at COCO and Visual Genome, which are prominent datasets that cover multiple tasks.
I think a user would not get confused about the name of |
What do you mean? |
It is totally fine to name |
Yes, that is not the problem. However, |
I googled the word, and it is used in two ways. |
I see. So, |
Looking back at our internal discussion, However, By the way, taking |
I see.
I thought the functionality of |
Let me summarize.
|
I think it is OK to change |
|
Adding to that, there are following objects:
|
Considering the consistency with
If the |
So there are three conventions:
3 depends on 2 and 2 depends on 1.
Since
Yes. This is for convenience. |
@Hakuyume |
I mean both.
|
I would prefer Other than that, it looks ok. |
Sorry, it's my mistake.
|
I agree with you. |
Sorry. I forgot to point out, but I prefer the dataset name for I will start implementing these changes. |
Sorry, I fixed it. And I added two columns 'visualizer' and 'related tasks'. |
…into cub-label-test
Please merge this after #405. |
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 don't you support mask
in CUBLabelDataset
?
Good idea. |
@Hakuyume |
Is it a value of probability? If so, can we scale it to
Yes. it is better. |
Yes. Please review this first. |
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 except mask
No description provided.