Commit cc75828e LN

更改算法识别dll:修改占用内存问题

1 个父辈 56dbe99c
......@@ -190,6 +190,12 @@
相机数量
</summary>
</member>
<member name="M:Asa.Camera.VisionLib.SaveAsConfig(System.String)">
<summary>
另存为配置文件
</summary>
<param name="path"></param>
</member>
<member name="M:Asa.Camera.VisionLib.GetCameraName">
<summary>
获取相机名称
......@@ -356,7 +362,27 @@
特征比较图
</summary>
<param name="bmp"></param>
<param name="name"></param>
<param name="cameraName"></param>
<param name="planName"></param>
<param name="exist"></param>
<returns></returns>
</member>
<member name="M:Asa.Camera.VisionLib.FeatureSingleCompare(System.String,System.String,System.Collections.Generic.Dictionary{System.String,System.Boolean}@,System.Drawing.Bitmap@)">
<summary>
特征单张比较图,没有原图
</summary>
<param name="cameraName"></param>
<param name="planName"></param>
<param name="exist"></param>
<param name="image"></param>
<returns></returns>
</member>
<member name="M:Asa.Camera.VisionLib.FeatureSingleCompare(System.Drawing.Bitmap,System.String,System.String,System.Collections.Generic.Dictionary{System.String,System.Boolean}@)">
<summary>
特征单张比较图,没有原图
</summary>
<param name="bmp"></param>
<param name="cameraName"></param>
<param name="planName"></param>
<param name="exist"></param>
<returns></returns>
......@@ -704,6 +730,14 @@
<param name="dspImage"></param>
<returns></returns>
</member>
<member name="M:Asa.Region.Feature.CompareSingleImage(System.Drawing.Bitmap,System.Collections.Generic.Dictionary{System.String,System.Boolean}@)">
<summary>
比较单张图像,没有原图
</summary>
<param name="image"></param>
<param name="exist"></param>
<returns></returns>
</member>
<member name="T:CameraVisionLib.Model.BarcodeInfo">
<summary>
条码信息,1DBarcode、2DBarcode
......
[net]
# Testing
batch=1
subdivisions=1
# Training
# batch=64
# subdivisions=64
width=960
height=960
channels=3
momentum=0.9
decay=0.0005
angle=180
saturation = 1.5
exposure = 1.5
hue=.1
learning_rate=0.001
burn_in=1000
max_batches = 4000
policy=steps
steps=3200,3600
scales=.1,.1
[convolutional]
batch_normalize=1
filters=16
size=3
stride=1
pad=1
activation=leaky
[maxpool]
size=2
stride=2
[convolutional]
batch_normalize=1
filters=32
size=3
stride=1
pad=1
activation=leaky
[maxpool]
size=2
stride=2
[convolutional]
batch_normalize=1
filters=64
size=3
stride=1
pad=1
activation=leaky
[maxpool]
size=2
stride=2
[convolutional]
batch_normalize=1
filters=128
size=3
stride=1
pad=1
activation=leaky
[maxpool]
size=2
stride=2
[convolutional]
batch_normalize=1
filters=256
size=3
stride=1
pad=1
activation=leaky
[maxpool]
size=2
stride=2
[convolutional]
batch_normalize=1
filters=512
size=3
stride=1
pad=1
activation=leaky
[maxpool]
size=2
stride=1
[convolutional]
batch_normalize=1
filters=1024
size=3
stride=1
pad=1
activation=leaky
###########
[convolutional]
batch_normalize=1
filters=256
size=1
stride=1
pad=1
activation=leaky
[convolutional]
batch_normalize=1
filters=512
size=3
stride=1
pad=1
activation=leaky
[convolutional]
size=1
stride=1
pad=1
filters=18
activation=linear
[yolo]
mask = 3,4,5
anchors = 10,14, 23,27, 37,58, 81,82, 135,169, 344,319
classes=1
num=6
jitter=.3
ignore_thresh = .7
truth_thresh = 1
random=1
[route]
layers = -4
[convolutional]
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky
[upsample]
stride=2
[route]
layers = -1, 8
[convolutional]
batch_normalize=1
filters=256
size=3
stride=1
pad=1
activation=leaky
[convolutional]
size=1
stride=1
pad=1
filters=18
activation=linear
[yolo]
mask = 0,1,2
anchors = 10,14, 23,27, 37,58, 81,82, 135,169, 344,319
classes=1
num=6
jitter=.3
ignore_thresh = .7
truth_thresh = 1
random=1
此文件太大,无法显示。
此文件太大,无法显示。
......@@ -5,6 +5,7 @@ using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Runtime.ExceptionServices;
using System.Text;
......@@ -88,7 +89,7 @@ namespace OnlineStore.DeviceLibrary
public void FeatureOriginal(string planName)
{
try
/* try
{
//判断是否记录比较原图
if (MoveInfo.MoveType.Equals(StoreMoveType.ReturnHome) && StoreManager.Store.vision != null && (!String.IsNullOrEmpty(Config.Camera_Name)))
......@@ -104,7 +105,7 @@ namespace OnlineStore.DeviceLibrary
catch (Exception ex)
{
LogUtil.error(Name + "FeatureOriginal 出错:" + ex.ToString());
}
}*/
}
private DateTime lastLogTime = DateTime.Now;
......@@ -161,7 +162,7 @@ namespace OnlineStore.DeviceLibrary
if (StoreManager.Store. vision != null)
{
vcount++;
bool result= StoreManager.Store.vision.FeatureCompare(Config.Camera_Name,planName, out exist);
bool result= StoreManager.Store.vision.FeatureSingleCompare(Config.Camera_Name,planName, out exist,out Bitmap bitmap);
if (!result)
{
LogUtil.error(Name + " VisionComp ["+ Config.Camera_Name + "] =" + result);
......
......@@ -37,9 +37,9 @@
this.groupcom = new System.Windows.Forms.GroupBox();
this.cmbPlanName = new System.Windows.Forms.ComboBox();
this.btnFcomp = new System.Windows.Forms.Button();
this.btnImgSave = new System.Windows.Forms.Button();
this.btnForig = new System.Windows.Forms.Button();
this.chbStop = new System.Windows.Forms.CheckBox();
this.btnImgSave = new System.Windows.Forms.Button();
this.lblLSend = new System.Windows.Forms.Label();
this.lblSend = new System.Windows.Forms.Label();
this.lblMoveStr = new System.Windows.Forms.Label();
......@@ -330,18 +330,6 @@
this.btnFcomp.UseVisualStyleBackColor = true;
this.btnFcomp.Click += new System.EventHandler(this.btnFcomp_Click);
//
// btnImgSave
//
this.btnImgSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnImgSave.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnImgSave.Location = new System.Drawing.Point(425, 544);
this.btnImgSave.Name = "btnImgSave";
this.btnImgSave.Size = new System.Drawing.Size(105, 38);
this.btnImgSave.TabIndex = 284;
this.btnImgSave.Text = "库位图片保存";
this.btnImgSave.UseVisualStyleBackColor = true;
this.btnImgSave.Click += new System.EventHandler(this.btnImgSave_Click);
//
// btnForig
//
this.btnForig.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
......@@ -352,6 +340,7 @@
this.btnForig.TabIndex = 282;
this.btnForig.Text = "获取原始图";
this.btnForig.UseVisualStyleBackColor = true;
this.btnForig.Visible = false;
this.btnForig.Click += new System.EventHandler(this.btnForig_Click);
//
// chbStop
......@@ -366,13 +355,25 @@
this.chbStop.UseVisualStyleBackColor = true;
this.chbStop.CheckedChanged += new System.EventHandler(this.chbStop_CheckedChanged);
//
// btnImgSave
//
this.btnImgSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnImgSave.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnImgSave.Location = new System.Drawing.Point(425, 544);
this.btnImgSave.Name = "btnImgSave";
this.btnImgSave.Size = new System.Drawing.Size(105, 38);
this.btnImgSave.TabIndex = 284;
this.btnImgSave.Text = "库位图片保存";
this.btnImgSave.UseVisualStyleBackColor = true;
this.btnImgSave.Click += new System.EventHandler(this.btnImgSave_Click);
//
// lblLSend
//
this.lblLSend.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lblLSend.AutoSize = true;
this.lblLSend.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblLSend.ForeColor = System.Drawing.Color.Green;
this.lblLSend.Location = new System.Drawing.Point(13, 505);
this.lblLSend.Location = new System.Drawing.Point(13, 509);
this.lblLSend.Name = "lblLSend";
this.lblLSend.Size = new System.Drawing.Size(0, 17);
this.lblLSend.TabIndex = 280;
......@@ -383,7 +384,7 @@
this.lblSend.AutoSize = true;
this.lblSend.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblSend.ForeColor = System.Drawing.Color.Green;
this.lblSend.Location = new System.Drawing.Point(13, 529);
this.lblSend.Location = new System.Drawing.Point(13, 533);
this.lblSend.Name = "lblSend";
this.lblSend.Size = new System.Drawing.Size(0, 17);
this.lblSend.TabIndex = 278;
......@@ -423,7 +424,7 @@
this.groupBox1.Controls.Add(this.label43);
this.groupBox1.Controls.Add(this.label42);
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox1.Location = new System.Drawing.Point(505, 352);
this.groupBox1.Location = new System.Drawing.Point(505, 356);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(476, 136);
this.groupBox1.TabIndex = 217;
......@@ -603,7 +604,7 @@
this.groupBox2.Controls.Add(this.button6);
this.groupBox2.Controls.Add(this.button3);
this.groupBox2.Controls.Add(this.button5);
this.groupBox2.Location = new System.Drawing.Point(11, 393);
this.groupBox2.Location = new System.Drawing.Point(11, 397);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(476, 78);
this.groupBox2.TabIndex = 276;
......
......@@ -47,7 +47,7 @@ namespace OnlineStore.ACSingleStore
cmbPlanName.SelectedIndex = 0;
bool isShow = (!String.IsNullOrEmpty(boxBean.Config.Camera_Name));
btnFcomp.Visible = isShow;
btnForig.Visible = isShow;
//btnForig.Visible = isShow;
groupcom.Visible = isShow;
btnImgSave.Visible = (!String.IsNullOrEmpty(boxBean.Config.PhotoCamera_Name));
LoadOk = true;
......@@ -1145,7 +1145,7 @@ namespace OnlineStore.ACSingleStore
private void btnForig_Click(object sender, EventArgs e)
{
string planName = StoreManager.PlanName_CloseDoor;
/* string planName = StoreManager.PlanName_CloseDoor;
if (cmbPlanName.SelectedIndex.Equals(1))
{
planName = StoreManager.PlanName_OpenDoor;
......@@ -1155,7 +1155,7 @@ namespace OnlineStore.ACSingleStore
string date = boxBean.Name+DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss") + "-Original-"+planName;
StoreManager.Store.vision.SaveImage(boxBean.Config.Camera_Name, Application.StartupPath + @"\image\" , date, ImageFormat.Png);
StoreManager.Store.vision.FeatureOriginal(boxBean.Config.Camera_Name,planName);
}
}*/
}
private void btnFcomp_Click(object sender, EventArgs e)
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!