Tài liệu tham khảo Khung MLKitObjectDetectionCommon
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.
MLKCommonObjectDetectorOptions
@interface MLKCommonObjectDetectorOptions : 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
Objective-C
@property (nonatomic) BOOL shouldEnableClassification;
-
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 sẽ chỉ trả về đối tượng nổi bật nhất được phát hiện. Giá trị mặc định là false
.
Khai báo
Objective-C
@property (nonatomic) BOOL shouldEnableMultipleObjects;
-
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.
Khai báo
Objective-C
- (nonnull instancetype)init;
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-09-20 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-09-20 UTC."],[[["MLKCommonObjectDetectorOptions provides configuration settings for object detection tasks, impacting classification, multiple object detection, and detector mode."],["By default, object classification is disabled, and the detector returns only the most prominent object, operating in stream mode."],["Developers can enable classification and multiple object detection and choose between different detector modes using properties like shouldEnableClassification, shouldEnableMultipleObjects, and detectorMode."],["Direct initialization using -init is unavailable; instead, utilize class methods provided by subclasses to create instances of MLKCommonObjectDetectorOptions."]]],["`MLKCommonObjectDetectorOptions` configures object detectors, offering properties to customize their behavior. `shouldEnableClassification` (default: `false`) enables object classification. `shouldEnableMultipleObjects` (default: `false`) controls whether all or only the most prominent object is returned. `detectorMode` (default: `.stream`) defines the detector's operational mode. The standard initializer `init` is unavailable; subclasses' class methods should be used instead.\n"]]