Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Neural Network calling classifier

Hi, I trained one classifier for OCR testing using RPROP method but when i am trying to load the trained parameter file it is exiting the code without any error.

cv::String file_name = "C:\\Users\\param.xml";
ANN_MLP *nnetwork;

nnetwork->load<ANN_MLP>(file_name);

Is the call for the network correct ? Please help me out here. Thank you.

click to hide/show revision 2
retagged

updated 2015-02-26 01:31:30 -0600

berak gravatar image

Neural Network calling classifier

Hi, I trained one classifier for OCR testing using RPROP method but when i am trying to load the trained parameter file it is exiting the code without any error.

cv::String file_name = "C:\\Users\\param.xml";
ANN_MLP *nnetwork;

nnetwork->load<ANN_MLP>(file_name);

Is the call for the network correct ? Please help me out here. Thank you.

Neural Network calling classifier

Hi, I trained one classifier for OCR testing using RPROP method but when i am trying to load the trained parameter file it is exiting the code without any error.

cv::String file_name = "C:\\Users\\param.xml";
ANN_MLP *nnetwork;

nnetwork->load<ANN_MLP>(file_name);

Is the call for the network correct ? Please help me out here. Thank you.

EDIT 1:

The function is exiting while checking for mapping in this code

 if( !CV_NODE_IS_MAP(map_node->tag) )
 {
      if( (!CV_NODE_IS_SEQ(map_node->tag) || map_node->data.seq->total != 0) &&
           CV_NODE_TYPE(map_node->tag) != CV_NODE_NONE )
           CV_Error( CV_StsError, "The node is neither a map nor an empty collection" );
       return 0;
 }

I checked the name of the node and its the same but it is still unable to map it correctly.

Neural Network calling classifier

Hi, I trained one classifier for OCR testing using RPROP method but when i am trying to load the trained parameter file it is exiting the code without any error.

cv::String file_name = "C:\\Users\\param.xml";
ANN_MLP *nnetwork;

nnetwork->load<ANN_MLP>(file_name);

Is the call for the network correct ? Please help me out here. Thank you.

EDIT 1:

The function is exiting while checking for mapping in this code

 if( !CV_NODE_IS_MAP(map_node->tag) )
 {
      if( (!CV_NODE_IS_SEQ(map_node->tag) || map_node->data.seq->total != 0) &&
           CV_NODE_TYPE(map_node->tag) != CV_NODE_NONE )
           CV_Error( CV_StsError, "The node is neither a map nor an empty collection" );
       return 0;
 }

I checked the name of the node and its the same but it is still unable to map it correctly.

I used the following method to save the parameter file pelase see

FileStorage fs("C:\\Users\\param.xml", FileStorage::WRITE);
classifier->write(fs);
fs.release();