This repository has been archived on 2026-02-22. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
tkDNN/include/tkDNN/BoundingBox.h
T
Micaela Verucchi ef78d7f176 Add BoundingBox class
Signed-off-by: Micaela Verucchi <micaelaverucchi@gmail.com>
2020-04-08 13:52:29 +02:00

32 lines
732 B
C++

#ifndef BOUNDINGBOX_H
#define BOUNDINGBOX_H
#include <iostream>
#include "tkdnn.h"
namespace tk { namespace dnn {
class BoundingBox : public tk::dnn::box
{
float overlap(const float p1, const float l1, const float p2, const float l22);
float boxesIntersection(const BoundingBox &b);
float boxesUnion(const BoundingBox &b);
public:
int uniqueTruthIndex = -1;
int truthFlag = 0;
float maxIoU = 0;
float IoU(const BoundingBox &b);
void clear();
friend std::ostream& operator<<(std::ostream& os, const BoundingBox& bb);
};
std::ostream& operator<<(std::ostream& os, const BoundingBox& bb);
bool boxComparison (const BoundingBox& a,const BoundingBox& b) ;
}}
#endif /*BOUNDINGBOX_H*/