个人介绍
熟练使用Python语言。
熟练使用tensorflow框架。
熟练使用opencv等图像处理库。
传统的图像处理中,可以熟练使用opencv进行图像的平滑处理、形态学操作、边缘检测、模板匹配、图像分割、视频处理等操作。
深度学习图像处理中,可以基于TensorFlow框架实现图像分类、图像分割、目标识别等操作。
工作经历
2017-07-01 -2018-08-01成都先进功率半导体股份有限公司前段工艺工程师
我的主要工作内容: 1. 负责优化已有产品WB的工艺参数,从而提高成品率和降低坏品率。通过查阅相关资料和请教高工获得优化参数,再经过试验验证调整参数。提高了三个已有产品的成品率,最高提高了3%。 2. 负责新产品的WB工艺参数试验。通过查阅相关资料和进行大量的焊线测试,获得相关数据。参与五个新产品的WB工艺参数试验,并成功通过相关测验获得客户认可。 3. 参与制订工艺参数标准,并完成产品工艺标准制订。并参加相应的评审。
教育经历
2013-09-01 - 2017-06-30兰州交通大学电子科学与技术本科
学院:电子与信息工程信息 主修课程:集成电路设计、半导体物理、数字集成电路等
技能
""" cv2.Canny(image, # 输入原图(必须为单通道图) threshold1, threshold2, # 较大的阈值2用于检测图像中明显的边缘 [, edges[, apertureSize[, # apertureSize:Sobel算子的大小 L2gradient ]]]) # 参数(布尔值): true: 使用更精确的L2范数进行计算(即两个方向的倒数的平方和再开放), false:使用L1范数(直接将两个方向导数的绝对值相加)。 """ import cv2 import numpy as np original_img = cv2.imread("qingwen.png", 0) # canny(): 边缘检测 img1 = cv2.GaussianBlur(original_img,(3,3),0) canny = cv2.Canny(img1, 50, 150) # 形态学:边缘检测 _,Thr_img = cv2.threshold(original_img,210,255,cv2.THRESH_BINARY)#设定红色通道阈值210(阈值影响梯度运算效果) kernel = cv2.getStructuringElement(cv2.MORPH_RECT,(5,5)) #定义矩形结构元素 gradient = cv2.morphologyEx(Thr_img, cv2.MORPH_GRADIENT, kernel) #梯度 cv2.imshow("original_img", original_img) cv2.imshow("gradient", gradient) cv2.imshow('Canny', canny) cv2.waitKey(0) cv2.destroyAllWindows()
# -*- coding: utf-8 -*- import cv2 #两个回调函数 def GaussianBlurSize(GaussianBlur_size): global KSIZE KSIZE = GaussianBlur_size * 2 +3 print(KSIZE, SIGMA) dst = cv2.GaussianBlur(scr, (KSIZE,KSIZE), SIGMA, KSIZE) cv2.imshow(window_name,dst) def GaussianBlurSigma(GaussianBlur_sigma): global SIGMA SIGMA = GaussianBlur_sigma/10.0 print(KSIZE, SIGMA) dst = cv2.GaussianBlur(scr, (KSIZE,KSIZE), SIGMA, KSIZE) cv2.imshow(window_name,dst) #全局变量 GaussianBlur_size = 1 GaussianBlur_sigma = 15 KSIZE = 1 SIGMA = 15 max_value = 300 max_type = 6 window_name = "GaussianBlurS Demo" trackbar_size = "Size*2+3" trackbar_sigema = "Sigma/10" #读入图片,模式为灰度图,创建窗口 scr = cv2.imread(r"E:\liuxiaozhong\opencv_python\Image smoothing\datas\UFCW.jpg",0) cv2.namedWindow(window_name) #创建滑动条 cv2.createTrackbar( trackbar_size, window_name, \ GaussianBlur_size, max_type, GaussianBlurSize ) cv2.createTrackbar( trackbar_sigema, window_name, \ GaussianBlur_sigma, max_value, GaussianBlurSigma ) #初始化 GaussianBlurSize(1) GaussianBlurSigma(15) if cv2.waitKey(0) == 27: cv2.destroyAllWindows() cv2.imwrite(r"E:\liuxiaozhong\opencv_python\Image smoothing\datas\UFCW1.jpg")
训练集网络: import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data import mnist_forward import os INPUT_NODE=784 # 输入节点 OUTPUT_NODE=10 # 输出节点 LAYER1_NODE=500 # 隐藏节点 batch_size=200 learning_rate_base=0.1 # 初始学习率 learning_rate_decay=0.99 # 学习率衰减率 regularizer=0.0001 # 正则化系数 steps=50000 # 训练轮数 moving_average_decay=0.99 model_save_path="./model/" # 模型保存路径 model_name="mnist_model" def get_weight(shape,regularizer): w=tf.Variable(tf.truncated_normal(shape,stddev=0.1)) if regularizer !=None: tf.add_to_collection('losses',tf.contrib.layers.l2_regularizer(regularizer)(w)) return w def get_bias(shape): b=tf.Variable(tf.zeros(shape)) return b def forward(x,regularizer): w1=get_weight([INPUT_NODE,LAYER1_NODE],regularizer) b1=get_bias(LAYER1_NODE) y1=tf.nn.relu(tf.matmul(x,w1)+b1) w2=get_weight([LAYER1_NODE,OUTPUT_NODE],regularizer) b2=get_bias([OUTPUT_NODE]) y=tf.matmul(y1,w2)+b2 return y def backward(mnist): x=tf.placeholder(tf.float32,[None,mnist_forward.INPUT_NODE]) y_=tf.placeholder(tf.float32,[None,mnist_forward.OUTPUT_NODE]) y=mnist_forward.forward(x,regularizer) # 调用forward()函数,设置正则化,计算y global_step=tf.Variable(0,trainable=False) # 当前轮数计数器设定为不可训练类型 # 调用包含所有参数正则化损失的损失函数loss ce=tf.nn.sparse_softmax_cross_entropy_with_logits(logits=y,labels=tf.argmax(y_,1)) cem=tf.reduce_mean(ce) loss=cem+tf.add_n(tf.get_collection('losses')) # 设定指数衰减学习率learning_rate learning_rate=tf.train.exponential_decay( learning_rate_base, global_step, mnist.train.num_examples/batch_size, learning_rate_decay, staircase=True ) # 梯度衰减对模型优化,降低损失函数 train_step=tf.train.GradientDescentOptimizer(learning_rate).minimize(loss,global_step=global_step) # 定义参数的滑动平均 ema=tf.train.ExponentialMovingAverage(moving_average_decay,global_step) ema_op=ema.apply(tf.trainable_variables()) with tf.control_dependencies([train_step,ema_op]): train_op=tf.no_op(name='train') saver=tf.train.Saver() with tf.Session() as sess: init_op=tf.global_variables_initializer() # 所有参数初始化 sess.run(init_op) ckpt = tf.train.get_checkpoint_state(model_save_path) # 加载指定路径下的滑动平均 if ckpt and ckpt.model_checkpoint_path: saver.restore(sess, ckpt.model_checkpoint_path) for i in range(steps): # 循环迭代steps轮 xs,ys=mnist.train.next_batch(batch_size) _,loss_value,step=sess.run([train_op,loss,global_step],feed_dict={x:xs,y_:ys}) if i %1000==0: print("After %d training step(s),loss on training batch is %g."%(step,loss_value)) saver.save(sess,os.path.join(model_save_path,model_name),global_step=global_step) # 当前会话加载到指定路径 if __name__=='__main__': mnist = input_data.read_data_sets("./data/", one_hot=True) backward(mnist) 测试网络: # coding:utf-8 import time import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data import mnist_forward import mnist_backward test_interval_secs=5 # 程序循环间隔时间5秒 def test(mnist): with tf.Graph().as_default() as g: # 复现计算图 x = tf.placeholder(tf.float32, [None, mnist_forward.INPUT_NODE]) y_ = tf.placeholder(tf.float32, [None, mnist_forward.OUTPUT_NODE]) y = mnist_forward.forward(x, None) # 实例化滑动平均的saver对象 ema = tf.train.ExponentialMovingAverage(mnist_backward.moving_average_decay) ema_restore = ema.variables_to_restore() saver = tf.train.Saver(ema_restore) # 计算准确率 correct_prediction=tf.equal(tf.argmax(y,1),tf.argmax(y_,1)) accuracy=tf.reduce_mean(tf.cast(correct_prediction,tf.float32)) while True: with tf.Session() as sess: ckpt=tf.train.get_checkpoint_state(mnist_backward.model_save_path) # 加载指定路径下的滑动平均 if ckpt and ckpt.model_checkpoint_path: saver.restore(sess,ckpt.model_checkpoint_path) global_step=ckpt.model_checkpoint_path.split('/')[-1].split('-')[-1] accuracy_score=sess.run(accuracy,feed_dict={x:mnist.test.images,y_:mnist.test.labels}) print("After %s training step(s),test accuracy= %g."%(global_step,accuracy_score)) else: print('No checkpoint file found') return time.sleep(test_interval_secs) if __name__=='__main__': mnist = input_data.read_data_sets("./data/", one_hot=True) test(mnist)