-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
checkpoint has good accuracy, however frozen one is not very poor. #364
Comments
@kurikabocya I ran into the same issue. Apart from the C# code I'm just using python to load the frozen graph and test. 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;
}
The text was updated successfully, but these errors were encountered: