Base class for detecting objects in the input image (cv::Mat).
Input is an image (cv::Mat).
Output is index and score of objects in the input image.
Sample code:
auto image = cv::imread("sample_classification.jpg");
auto network = vitis::ai::Classification::create
(
"resnet50");
auto result = network->run(image);
for (const auto &r : result.scores) {
auto score = r.score;
auto index = result.lookup(r.index);
}
Quick Function Reference
The following table lists all the functions defined in the vitis::ai::Classification
class:
Type | Name | Arguments |
---|---|---|
std::unique_ptr< Classification > |
create |
|
vitis::ai::ClassificationResult
|
run |
|
std::vector< vitis::ai::ClassificationResult > |
run |
|
std::vector< vitis::ai::ClassificationResult > |
run |
|