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.
 
 
 
 
 
 

40 lines
1.3 KiB

#ifndef __CORTEX_DETECTION_LAYER_HEADER__
#define __CORTEX_DETECTION_LAYER_HEADER__
#include "../base/basicLayer.h"
class detectionLayer: public cortexLayer{
private:
//uint32_t m_nClasses;
//uint32_t m_nCoords;
//uint32_t m_nRescore;
//uint32_t m_nSide;
//float m_fCost;
//float m_fNoObjectScale;
//float m_fObjectScale;
//float m_fClassScale;
//float m_fCoordScale;
//bool m_bSoftMax;
//bool m_bSQRT;
//bool m_bForced;
//bool m_bRandom;
//bool m_bRescore;
public:
explicit detectionLayer(bool useGPU = true);
virtual ~detectionLayer();
bool create(uint32_t batch, uint32_t inputs, uint32_t n, uint32_t side, uint32_t classes, uint32_t coords, uint32_t rescore);
virtual void forward(cortexSTATE state);
virtual void backward(cortexSTATE state);
//virtual void update(int batch, float learning_rate, float momentum, float decay);
//virtual void resize(uint32_t w, uint32_t h);
void getDetectionBoxes(uint32_t w, uint32_t h, float thresh, float **probs, cortexBOXLABEL *boxes, bool only_objectness);
uint32_t getBoxesCount(void);
uint32_t getClassesCount(void);
friend class gpuCUDA;
friend class cpuHOST;
friend class cortexLayersFactory;
};
#endif