Skip to content

ymli1997/ImageProcessing

 
 

Repository files navigation

ImageProcessing

Image processing using tensorflow, useful script stored in utils.

About data util

Unpack MNIST_data/mnist_data.zip to MNIST_data directory
Labels:
genFileList.py
Labels to dict:
labelFile2Map.py
Gen training datasets:
imnist.py
Using TFRecord data:
tfrecord.py

Training

  1. Using images data.
    classification.py
  2. Using TFRecord data type.
    classifier.py

Prediction

Prediction and export_inference_graph in evaluation.py.
evaluation.py
If you need inference graph for OpenCV dnn using, you can see example of export_inference_graph at this code.
Predict single image example as

def predict(image_path):
	...
	return result

Also for predict batch images as

def predict_batch(images_dir):
	...
	return results

Notice that predict_batch returns a matrix, you can see it's shape by

print(np.asarray(results).shape)

Net

Lenet:
lenet.py
Training Lenet by classifier.py

$ cd ImageProcessing  
$ python classifier.py  

Chinese blog

About

Image processing using tensorflow

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%