Open kurikabocya opened 3 years ago
@kurikabocya I ran into the same issue. Apart from the C# code I'm just using python to load the frozen graph and test. Any update is you solved this.
Thanks !
I was wrong, If you resize the image, for exampe, 150 x 200 to 160(32 X 5) x 224(32 X 7), then the frozen model file also show the good result.
@kurikabocya That's interesting. Any reason you had to do resize to that specific dimensions (160x224) ?
240 is not multiple of 32
Is this true for the pre-trained model from the authors as well or just the model you trained ?
Hello
[1] I trained from scratch some images using multigpu_train.py. Using the checkpoint files, the eval.py performs very good accuracy.
[2] So, I converted checkpoint files to frozen file or .pb file by adding the following code to eval.py, def main(argv=None): import os os.environ['CUDA_VISIBLE_DEVICES'] = FLAGS.gpu_list
[3] And, I loaded the pb file by C# using the following code. And the accuracy was very poor,,,, how to solve this.
The C# code is thanks to https://gist.github.com/ludwo/c091ed6261d26654c8b71949d89f8142
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using OpenCvSharp.Dnn; using System.IO; using OpenCvSharp; using System.Drawing;
namespace ConsoleApplication1 { class Program { static string EastModelFile = @"D:\EAST\frozenModelFile\frozen_model.pb"; static int InputWidth = 320; static int InputHeight = 320; static float ConfThreshold = (float)0.6; //static float NmsThreshold = (float)0.4; static float NmsThreshold = (float)0.4;
}