Commit 9b7ffbce authored by Anna Petrovicheva's avatar Anna Petrovicheva

Removed unused includes, fixed warnings

parent 4adbd2d6
......@@ -44,7 +44,6 @@
#include "detection_output_layer.hpp"
#include <float.h>
#include <string>
#include <iostream>
namespace cv
{
......@@ -167,8 +166,8 @@ void DetectionOutputLayer::allocate(const std::vector<Blob*> &inputs,
_num = inputs[0]->num();
_numPriors = inputs[2]->rows() / 4;
CV_Assert(_numPriors * _numLocClasses * 4 == inputs[0]->channels());
CV_Assert(_numPriors * _numClasses == inputs[1]->channels());
CV_Assert((_numPriors * _numLocClasses * 4) == inputs[0]->channels());
CV_Assert(int(_numPriors * _numClasses) == inputs[1]->channels());
// num() and channels() are 1.
// Since the number of bboxes to be kept is unknown before nms, we manually
......@@ -217,7 +216,7 @@ void DetectionOutputLayer::forward(std::vector<Blob*> &inputs,
allConfidenceScores[i];
std::map<int, std::vector<int> > indices;
int numDetections = 0;
for (int c = 0; c < _numClasses; ++c)
for (int c = 0; c < (int)_numClasses; ++c)
{
if (c == _backgroundLabelId)
{
......@@ -291,7 +290,7 @@ void DetectionOutputLayer::forward(std::vector<Blob*> &inputs,
if (numKept == 0)
{
std::cout << "Couldn't find any detections" << std::endl;
CV_ErrorNoReturn(Error::StsError, "Couldn't find any detections");
return;
}
std::vector<int> outputsShape(2, 1);
......
......@@ -42,7 +42,6 @@
#ifndef __OPENCV_DNN_LAYERS_IM2COL_HPP__
#define __OPENCV_DNN_LAYERS_IM2COL_HPP__
#include <opencv2/core.hpp>
#include <iostream>
namespace cv
{
......
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