You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
658 B
30 lines
658 B
9 months ago
|
/*
|
||
|
* Prior boxes for RetinaNet
|
||
|
* Tomas Goldmann,2023
|
||
|
*/
|
||
|
|
||
|
|
||
|
#include <iostream>
|
||
|
#include <vector>
|
||
|
#include <cmath>
|
||
|
|
||
|
class PriorBox {
|
||
|
|
||
|
|
||
|
private:
|
||
|
std::vector<std::vector<int>> feature_maps;
|
||
|
std::vector<std::vector<float>> min_sizes;
|
||
|
std::vector<int> steps;
|
||
|
bool clip;
|
||
|
std::vector<int> image_size;
|
||
|
std::string name;
|
||
|
|
||
|
|
||
|
public:
|
||
|
PriorBox(std::vector<int> image_size = std::vector<int>(), std::string phase = "train");
|
||
|
std::vector<std::vector<float>> forward();
|
||
|
|
||
|
};
|
||
|
|
||
|
std::vector<std::vector<float>> decode(const std::vector<std::vector<float>>& loc, const std::vector<std::vector<float>>& priors, const std::vector<float>& variances);
|