-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRoiDataLayer.h
56 lines (42 loc) · 1.32 KB
/
RoiDataLayer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#pragma once
#include "common.h"
#include "readxml.h"
struct roi{
vector<vector<float>> gt_overlaps;
vector<XMLInfo> xmlInfo;
vector<BBox> boxes;
vector<int> max_overlaps;
vector<int> max_classes;
Mat bbox_targets;
};
class RoIDataLayer : public BaseLayer {
public:
SETUP_LAYERFUNC(RoIDataLayer);
void prepareData();
void loadBatch(Blob** top, int numTop);
//setup()
virtual void setup(const char* name, const char* type, const char* param_str, int phase, Blob** bottom, int numBottom, Blob** top, int numTop);
//loadBatch()
virtual void forward(Blob** bottom, int numBottom, Blob** top, int numTop);
virtual void backward(Blob** bottom, int numBottom, Blob** top, int numTop, const bool* propagate_down);
virtual void reshape(Blob** bottom, int numBottom, Blob** top, int numTop);
private:
private:
vector<string> _vecImageName;
readxml _readXmlClass;
//map<string, vector<XMLInfo>> _mapData;
map<string, vector<vector<float>>> _map_gt_overlaps;
map<string, roi> _map_data;
int _num_classes;
int _cursor = 0;
const char* classname;
//= {
// "__background__",
// "aeroplane", "bicycle", "bird", "boat",
// "bottle", "bus", "car", "cat", "chair",
// "cow", "diningtable", "dog", "horse",
// "motorbike", "person", "pottedplant",
// "sheep", "sofa", "train", "tvmonitor"
//};
vector<string> _vecClassName;
};