增加精准模式 POSITION 获取(未测试)

pull/1/head
lidapeng 5 years ago
parent 58a5048163
commit 6b6fd14ee1

@ -120,21 +120,27 @@ public class Operation {//进行计算
for (FrameBody frameBody : frameBodies) {
//Speed 模式下的最后卷积结果
Matrix matrix1 = convolution.getFeatures(frameBody.getMatrix(), maxNub, templeConfig, -1);
//卷积层输出即边框回归的输入的特征向量
frameBody.setEndMatrix(matrix1);
List<Double> list = sub(matrix1);
imageBack.setFrameBody(frameBody);
//进入神经网络判断
intoNerve(eventId, list, templeConfig.getSensoryNerves(), false, null, imageBack);
}
return toPositon(frameBodies, frame.getWidth(), frame.getHeight());
return toPosition(frameBodies, frame.getWidth(), frame.getHeight());
} else if (templeConfig.getStudyPattern() == StudyPattern.Accuracy_Pattern) {
for (FrameBody frameBody : frameBodies) {
intoNerve2(eventId, frameBody.getMatrix(), templeConfig.getConvolutionNerveManager().getSensoryNerves(),
false, null, matrixBack);
Matrix myMatrix = matrixBack.getMatrix();
//卷积层输出即边框回归的输入的特征向量
frameBody.setEndMatrix(myMatrix);
List<Double> list = sub(myMatrix);
imageBack.setFrameBody(frameBody);
//进入神经网络判断
intoNerve(eventId, list, templeConfig.getSensoryNerves(), false, null, imageBack);
}
return null;
return toPosition(frameBodies, frame.getWidth(), frame.getHeight());
} else {
throw new Exception("wrong model");
}
@ -143,7 +149,7 @@ public class Operation {//进行计算
}
}
private Map<Integer, List<FrameBody>> toPositon(List<FrameBody> frameBodies, int width, int height) throws Exception {//把分类都拿出来
private Map<Integer, List<FrameBody>> toPosition(List<FrameBody> frameBodies, int width, int height) throws Exception {//把分类都拿出来
for (FrameBody frameBody : frameBodies) {
if (frameBody.getPoint() > templeConfig.getTh()) {//存在一个识别分类
getBox(frameBody, width, height);

@ -64,7 +64,6 @@ public class OutNerve extends Nerve {
matrixF = new Matrix(myMatrix.getX(), myMatrix.getY());
}
if (isKernelStudy) {//回传
// System.out.println(myMatrix.getString());
for (Map.Entry<Integer, Double> entry : E.entrySet()) {
double g;
if (entry.getValue() > 0.5) {//正模板

Loading…
Cancel
Save