Commit 887e6e5e authored by Suman Ghosh's avatar Suman Ghosh

removed hard codinginput parameters

parent efc864c5
......@@ -271,9 +271,9 @@ protected:
//Size outputGeometry_;//= Size(1,1);
//int channelCount_;
// int inputChannel_ ;//=1;
//const int _inputHeight =32;
//const int _inputWidth =100;
//const int _inputChannel =1;
int _inputHeight;
int _inputWidth ;
int _inputChannel ;
public:
DeepCNNOpenCvDNNImpl(const DeepCNNOpenCvDNNImpl& dn):
minibatchSz_(dn.minibatchSz_),outputSize_(dn.outputSize_){
......@@ -300,8 +300,8 @@ public:
//Implemented to supress Visual Studio warning "assignment operator could not be generated"
}
DeepCNNOpenCvDNNImpl(String modelArchFilename, String modelWeightsFilename,Ptr<ImagePreprocessor> preprocessor, int maxMinibatchSz,int inputWidth =100,int inputHeight = 32)
:minibatchSz_(maxMinibatchSz),_inputWidth(inputWidth),_inputHeight(inputHeight)
DeepCNNOpenCvDNNImpl(String modelArchFilename, String modelWeightsFilename,Ptr<ImagePreprocessor> preprocessor, int maxMinibatchSz,int inputWidth =100,int inputHeight = 32,int inputChannel =1)
:minibatchSz_(maxMinibatchSz),_inputWidth(inputWidth),_inputHeight(inputHeight),_inputChannel(inputChannel)
{
CV_Assert(this->minibatchSz_>0);
......@@ -612,13 +612,13 @@ public:
this->classifier_->classifyBatch(inputImageList,netOutput);
for(int k=0;k<netOutput.rows;k++)
{https://www.google.es/?gfe_rd=cr&dcr=0&ei=4fq7We8Bk9jyB8zPp5AL
{
int classNum;
double confidence;
NetOutput::getClassification((float*)(netOutput.row(k).data),this->classifier_->getOutputSize(),classNum,confidence);
transcriptionVec.push_back(this->labels_[classNum]);
confidenceVec.push_back(confidence);
}https://www.google.es/?gfe_rd=cr&dcr=0&ei=4fq7We8Bk9jyB8zPp5AL
}
}
......
......@@ -252,9 +252,9 @@ protected:
//Size inputGeometry_;
int minibatchSz_;//The existence of the assignment operator mandates this to be nonconst
//int outputSize_;
const int _inputHeight =700;
const int _inputWidth =700;
const int _inputChannel =3;
int inputHeight_;
int inputWidth_;
int inputChannel_;
public:
DeepCNNTextDetectorDNNImpl(const DeepCNNTextDetectorDNNImpl& dn):
minibatchSz_(dn.minibatchSz_){
......@@ -282,8 +282,8 @@ public:
//Implemented to supress Visual Studio warning "assignment operator could not be generated"
}
DeepCNNTextDetectorDNNImpl(String modelArchFilename, String modelWeightsFilename,Ptr<ImagePreprocessor> preprocessor, int maxMinibatchSz)
:minibatchSz_(maxMinibatchSz)
DeepCNNTextDetectorDNNImpl(String modelArchFilename, String modelWeightsFilename,Ptr<ImagePreprocessor> preprocessor, int maxMinibatchSz,int inputHeight=700,int inputWidth =700,int inputChannel =3)
:minibatchSz_(maxMinibatchSz),inputHeight_(inputHeight),inputWidth_(inputWidth),inputChannel_(inputChannel)
{
CV_Assert(this->minibatchSz_>0);
......@@ -304,9 +304,9 @@ public:
exit(-1);
}
this->inputGeometry_.height =_inputHeight;
this->inputGeometry_.width = _inputWidth ;//inputLayer->width();
this->inputChannelCount_ = _inputChannel ;//inputLayer->channels();
this->inputGeometry_.height =inputHeight_;
this->inputGeometry_.width = inputWidth_ ;//inputLayer->width();
this->inputChannelCount_ = inputChannel_ ;//inputLayer->channels();
#else
CV_Error(Error::StsError,"DNN module not available during compilation!");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment