Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
dòng chảy căng:: ôi:: SampleDistortedBoundingBox:: Attr
#include <image_ops.h>
Bộ cài đặt thuộc tính tùy chọn cho SampleDistortedBoundingBox .
Bản tóm tắt
Chức năng công cộng |
---|
AreaRange (const gtl::ArraySlice< float > & x) | Vùng cắt của hình ảnh phải chứa một phần hình ảnh được cung cấp trong phạm vi này. |
AspectRatioRange (const gtl::ArraySlice< float > & x) | Vùng bị cắt của hình ảnh phải có tỷ lệ khung hình = chiều rộng/chiều cao trong phạm vi này. |
MaxAttempts (int64 x) | Số lần thử tạo vùng bị cắt của hình ảnh với các ràng buộc đã chỉ định. |
MinObjectCovered (float x) | Vùng bị cắt của hình ảnh phải chứa ít nhất phần này của bất kỳ hộp giới hạn nào được cung cấp. |
Seed (int64 x) | Nếu seed hoặc seed2 được đặt thành khác 0, thì bộ tạo số ngẫu nhiên sẽ được gieo seed đã cho. |
Seed2 (int64 x) | Hạt giống thứ hai để tránh va chạm hạt giống. |
UseImageIfNoBoundingBoxes (bool x) | Kiểm soát hành vi nếu không có hộp giới hạn nào được cung cấp. |
Thuộc tính công khai
khu vực_phạm vi_
gtl::ArraySlice< float > tensorflow::ops::SampleDistortedBoundingBox::Attrs::area_range_ = Default_area_range()
khía cạnh_ratio_range_
gtl::ArraySlice< float > tensorflow::ops::SampleDistortedBoundingBox::Attrs::aspect_ratio_range_ = Default_aspect_ratio_range()
max_attempts_
int64 tensorflow::ops::SampleDistortedBoundingBox::Attrs::max_attempts_ = 100
min_object_covered_
float tensorflow::ops::SampleDistortedBoundingBox::Attrs::min_object_covered_ = 0.1f
hạt giống2_
int64 tensorflow::ops::SampleDistortedBoundingBox::Attrs::seed2_ = 0
hạt giống_
int64 tensorflow::ops::SampleDistortedBoundingBox::Attrs::seed_ = 0
use_image_if_no_bounding_boxes_
bool tensorflow::ops::SampleDistortedBoundingBox::Attrs::use_image_if_no_bounding_boxes_ = false
Chức năng công cộng
Phạm vi khu vực
TF_MUST_USE_RESULT Attrs tensorflow::ops::SampleDistortedBoundingBox::Attrs::AreaRange(
const gtl::ArraySlice< float > & x
)
Vùng cắt của hình ảnh phải chứa một phần hình ảnh được cung cấp trong phạm vi này.
Mặc định là [0,05, 1]
Tỷ lệ khung hìnhPhạm vi
TF_MUST_USE_RESULT Attrs tensorflow::ops::SampleDistortedBoundingBox::Attrs::AspectRatioRange(
const gtl::ArraySlice< float > & x
)
Vùng bị cắt của hình ảnh phải có tỷ lệ khung hình = chiều rộng/chiều cao trong phạm vi này.
Mặc định là [0,75, 1,33]
Số lần thử tối đa
TF_MUST_USE_RESULT Attrs tensorflow::ops::SampleDistortedBoundingBox::Attrs::MaxAttempts(
int64 x
)
Số lần thử tạo vùng bị cắt của hình ảnh với các ràng buộc đã chỉ định.
Sau max_attempts
không thành công, hãy trả lại toàn bộ hình ảnh.
Mặc định là 100
đối tượng tối thiểu được che phủ
TF_MUST_USE_RESULT Attrs tensorflow::ops::SampleDistortedBoundingBox::Attrs::MinObjectCovered(
float x
)
Vùng bị cắt của hình ảnh phải chứa ít nhất phần này của bất kỳ hộp giới hạn nào được cung cấp.
Giá trị của tham số này phải không âm. Trong trường hợp 0, vùng bị cắt không cần chồng lên bất kỳ hộp giới hạn nào được cung cấp.
Mặc định là 0,1
Hạt giống
TF_MUST_USE_RESULT Attrs tensorflow::ops::SampleDistortedBoundingBox::Attrs::Seed(
int64 x
)
Nếu seed
hoặc seed2
được đặt thành khác 0, thì bộ tạo số ngẫu nhiên sẽ được gieo seed
đã cho.
Nếu không, nó sẽ được gieo bởi một hạt giống ngẫu nhiên.
Mặc định là 0
Hạt giống2
TF_MUST_USE_RESULT Attrs tensorflow::ops::SampleDistortedBoundingBox::Attrs::Seed2(
int64 x
)
Hạt giống thứ hai để tránh va chạm hạt giống.
Mặc định là 0
UseImageIfNoBoundingBoxes
TF_MUST_USE_RESULT Attrs tensorflow::ops::SampleDistortedBoundingBox::Attrs::UseImageIfNoBoundingBoxes(
bool x
)
Kiểm soát hành vi nếu không có hộp giới hạn nào được cung cấp.
Nếu đúng, giả sử một hộp giới hạn ngầm bao phủ toàn bộ đầu vào. Nếu sai, hãy đưa ra một lỗi.
Mặc định là sai
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[],[],null,["# tensorflow::ops::SampleDistortedBoundingBox::Attrs Struct Reference\n\ntensorflow::ops::SampleDistortedBoundingBox::Attrs\n==================================================\n\n`#include \u003cimage_ops.h\u003e`\n\nOptional attribute setters for [SampleDistortedBoundingBox](/versions/r2.3/api_docs/cc/class/tensorflow/ops/sample-distorted-bounding-box#classtensorflow_1_1ops_1_1_sample_distorted_bounding_box).\n\nSummary\n-------\n\n| ### Public attributes ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|\n| [area_range_](#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs_1a10fa9ed4bcc56bf19d120a96314d459f)` = Default_area_range()` | `gtl::ArraySlice\u003c float \u003e` |\n| [aspect_ratio_range_](#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs_1a5f94da07d6c4a62a9b3cbd0d6dde8e90)` = Default_aspect_ratio_range()` | `gtl::ArraySlice\u003c float \u003e` |\n| [max_attempts_](#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs_1a1837a276fcc1de5e7b55d07d858b5f07)` = 100` | `int64` |\n| [min_object_covered_](#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs_1a77c354b0dea4c72fd36240d38597d6cd)` = 0.1f` | `float` |\n| [seed2_](#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs_1a23a9b203d607b14cb185c5b6673a4d68)` = 0` | `int64` |\n| [seed_](#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs_1acbf4b2d65cb72b4194d1b019b1dd5f55)` = 0` | `int64` |\n| [use_image_if_no_bounding_boxes_](#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs_1a47ec3773a7ebbb2de5f98e480b6ec441)` = false` | `bool` |\n\n| ### Public functions ||\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [AreaRange](#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs_1a257ad0daeac9027e5d07969fbbadaaf9)`(const gtl::ArraySlice\u003c float \u003e & x)` | `TF_MUST_USE_RESULT `[Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs) The cropped area of the image must contain a fraction of the supplied image within this range. |\n| [AspectRatioRange](#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs_1abd0d9435fb51a57125f07b7c1e62e044)`(const gtl::ArraySlice\u003c float \u003e & x)` | `TF_MUST_USE_RESULT `[Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs) The cropped area of the image must have an aspect ratio = width / height within this range. |\n| [MaxAttempts](#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs_1a034b461ec785997b27dfc07d1564cff6)`(int64 x)` | `TF_MUST_USE_RESULT `[Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs) Number of attempts at generating a cropped region of the image of the specified constraints. |\n| [MinObjectCovered](#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs_1afac93755afa1a142f5b274e1865e6383)`(float x)` | `TF_MUST_USE_RESULT `[Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs) The cropped area of the image must contain at least this fraction of any bounding box supplied. |\n| [Seed](#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs_1a8b49b8d1dd2eba77f1e133a8a632aa9e)`(int64 x)` | `TF_MUST_USE_RESULT `[Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs) If either `seed` or `seed2` are set to non-zero, the random number generator is seeded by the given `seed`. |\n| [Seed2](#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs_1aa93767e1d93eddea4f1df2d1936a1a7e)`(int64 x)` | `TF_MUST_USE_RESULT `[Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs) A second seed to avoid seed collision. |\n| [UseImageIfNoBoundingBoxes](#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs_1a8ee810c28bbcf6321174142224218bc9)`(bool x)` | `TF_MUST_USE_RESULT `[Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_sample_distorted_bounding_box_1_1_attrs) Controls behavior if no bounding boxes supplied. |\n\nPublic attributes\n-----------------\n\n### area_range_\n\n```scdoc\ngtl::ArraySlice\u003c float \u003e tensorflow::ops::SampleDistortedBoundingBox::Attrs::area_range_ = Default_area_range()\n``` \n\n### aspect_ratio_range_\n\n```scdoc\ngtl::ArraySlice\u003c float \u003e tensorflow::ops::SampleDistortedBoundingBox::Attrs::aspect_ratio_range_ = Default_aspect_ratio_range()\n``` \n\n### max_attempts_\n\n```scdoc\nint64 tensorflow::ops::SampleDistortedBoundingBox::Attrs::max_attempts_ = 100\n``` \n\n### min_object_covered_\n\n```scdoc\nfloat tensorflow::ops::SampleDistortedBoundingBox::Attrs::min_object_covered_ = 0.1f\n``` \n\n### seed2_\n\n```scdoc\nint64 tensorflow::ops::SampleDistortedBoundingBox::Attrs::seed2_ = 0\n``` \n\n### seed_\n\n```scdoc\nint64 tensorflow::ops::SampleDistortedBoundingBox::Attrs::seed_ = 0\n``` \n\n### use_image_if_no_bounding_boxes_\n\n```scdoc\nbool tensorflow::ops::SampleDistortedBoundingBox::Attrs::use_image_if_no_bounding_boxes_ = false\n``` \n\nPublic functions\n----------------\n\n### AreaRange\n\n```gdscript\nTF_MUST_USE_RESULT Attrs tensorflow::ops::SampleDistortedBoundingBox::Attrs::AreaRange(\n const gtl::ArraySlice\u003c float \u003e & x\n)\n``` \nThe cropped area of the image must contain a fraction of the supplied image within this range.\n\nDefaults to \\[0.05, 1\\] \n\n### AspectRatioRange\n\n```gdscript\nTF_MUST_USE_RESULT Attrs tensorflow::ops::SampleDistortedBoundingBox::Attrs::AspectRatioRange(\n const gtl::ArraySlice\u003c float \u003e & x\n)\n``` \nThe cropped area of the image must have an aspect ratio = width / height within this range.\n\nDefaults to \\[0.75, 1.33\\] \n\n### MaxAttempts\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::SampleDistortedBoundingBox::Attrs::MaxAttempts(\n int64 x\n)\n``` \nNumber of attempts at generating a cropped region of the image of the specified constraints.\n\nAfter `max_attempts` failures, return the entire image.\n\nDefaults to 100 \n\n### MinObjectCovered\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::SampleDistortedBoundingBox::Attrs::MinObjectCovered(\n float x\n)\n``` \nThe cropped area of the image must contain at least this fraction of any bounding box supplied.\n\nThe value of this parameter should be non-negative. In the case of 0, the cropped area does not need to overlap any of the bounding boxes supplied.\n\nDefaults to 0.1 \n\n### Seed\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::SampleDistortedBoundingBox::Attrs::Seed(\n int64 x\n)\n``` \nIf either `seed` or `seed2` are set to non-zero, the random number generator is seeded by the given `seed`.\n\nOtherwise, it is seeded by a random seed.\n\nDefaults to 0 \n\n### Seed2\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::SampleDistortedBoundingBox::Attrs::Seed2(\n int64 x\n)\n``` \nA second seed to avoid seed collision.\n\nDefaults to 0 \n\n### UseImageIfNoBoundingBoxes\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::SampleDistortedBoundingBox::Attrs::UseImageIfNoBoundingBoxes(\n bool x\n)\n``` \nControls behavior if no bounding boxes supplied.\n\nIf true, assume an implicit bounding box covering the whole input. If false, raise an error.\n\nDefaults to false"]]