Skip to content

Commit

Permalink
doc: Expand ImageValidator explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
pierluigiferrari committed Mar 31, 2018
1 parent 917b1cb commit d51e153
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion data_generator_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,9 @@
"source": [
"The first two arguments here are the same as for `BoxFilter`. The third argument, `n_boxes_min`, determines the minimum number of bounding boxes that need to meet the criteria in order for the transformed image to be accepted as valid. This particular `ImageValidator` object would accept a transformed image if at least one bounding box would have at least 0.3 of its area overlap with the transformed image.\n",
"\n",
"Note that in the arguments of the `RandomTranslate` constructor, you pass both a `BoxFilter` and an `ImageValidator` object. This means the criteria by which the transformation decides which boxes to keep are not necessarily the same criteria as those by which the transformation decides whether a given transformed image is valid. This provides great flexibility, and in one of the next sections we'll see an example of a very successful object detection model that actually uses different criteria for box filtering and image validation in its data augmentation pipeline."
"Note that in the arguments of the `RandomTranslate` constructor, you pass both a `BoxFilter` and an `ImageValidator` object. This means the criteria by which the transformation decides which boxes to keep are not necessarily the same criteria as those by which the transformation decides whether a given transformed image is valid. This provides great flexibility, and in one of the next sections we'll see an example of a very successful object detection model that actually uses different criteria for box filtering and image validation in its data augmentation pipeline.\n",
"\n",
"Of course `BoxFilter` and `ImageValidator` objects aren't relevant for all image transformations. For example, if you flip an image, the flipped image is guaranteed to fully contain all bounding boxes just as before the flip. Or if you apply photometric transformations to an image, its annotations don't even change at all. These transformations don't take `BoxFilter` or `ImageValidator` objects in their arguments because there is nothing to filter or validate."
]
},
{
Expand Down

0 comments on commit d51e153

Please sign in to comment.