Mrlittlepig ImageProcessing Save Abandoned

tf mnist demo

Project README

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

Open Source Agenda is not affiliated with "Mrlittlepig ImageProcessing" Project. README Source: junehui/ImageProcessing
Stars
125
Open Issues
0
Last Commit
3 years ago

Open Source Agenda Badge

Open Source Agenda Rating