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_vehicleclassification.jpg");
auto network = vitis::ai::VehicleClassification::create
(
"vehicle_type_resnet18_pt");
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::VehicleClassification
class:
Type | Member | Arguments |
---|---|---|
std::unique_ptr<
VehicleClassification
> |
create |
|
vitis::ai::VehicleClassificationResult
|
run |
|
std::vector<
vitis::ai::VehicleClassificationResult
> |
run |
|