Tài liệu tham khảo khung MLKitObjectDetection
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.
CommonObjectDetectorOptions
class CommonObjectDetectorOptions : NSObject
Các cấu hình chung dùng chung cho tất cả các loại trình phát hiện đối tượng.
-
Cho biết liệu tính năng phân loại đối tượng đã được bật hay chưa. Giá trị mặc định là false
.
Khai báo
Swift
var shouldEnableClassification: Bool { get set }
-
Cho biết liệu trình phát hiện có nên trả về tất cả đối tượng được phát hiện trong hình ảnh hoặc khung hay không.
Nếu bạn đặt thành false
, trình phát hiện chỉ trả về đối tượng nổi bật nhất được phát hiện. Mặc định
có giá trị là false
.
Khai báo
Swift
var shouldEnableMultipleObjects: Bool { get set }
-
Chế độ cho trình phát hiện vật thể. Giá trị mặc định là .stream
.
-
Không dùng được. Sử dụng các phương thức của lớp trong lớp con.
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: 2024-08-29 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2024-08-29 UTC."],[[["`CommonObjectDetectorOptions` provides common configurations for all types of object detectors."],["It allows enabling or disabling object classification and multiple object detection."],["It offers a detector mode setting with a default stream mode."],["The initializer is unavailable; use class methods in subclasses instead."]]],["The `CommonObjectDetectorOptions` class configures object detectors. Key settings include `shouldEnableClassification`, which activates object classification (default: `false`), and `shouldEnableMultipleObjects`, which controls whether multiple objects are returned or just the most prominent one (default: `false`). `detectorMode` sets the detector's operational mode (default: `stream`). Initialization is unavailable, requiring the use of subclass methods. These options allow customization of the object detection process.\n"]]