=实验时间=
校历第六~第七周(10月23日-11月05日)11月26日)
=学生安排=
#佩戴安全帽照片(每位同学三张:正面,侧面和后面),也可以邀请同学贡献一下。图片格式:"学号-x.png" or "学号.jpg", x为1,2,3 代表正面、侧面和后面。
#每位同学标注数据,由助教负责汇总,形成训练数据集:60 x 3 =180张照片。180张照片。标注格式见 说明。
#分组选择模型、训练模型、提交模型。
#助教测试评估模型,给出结果。
==支撑技术==
[https://opencv.org/ OpenCV ] [http://www.tensorflow.org TensorFlow] https://tensorflow.google.cn/ Python+TensorFlow [[Python_TensorFlow_Basics]]
[https://github.com/tensorflow/models/tree/master/research/object_detection TensorFlow_Object_Detection]
=OpenCV图像获取=
以下为Windows 10平台为例。
==安装opencv==
安装Anaconda
在https://mirrors.tuna.tsinghua.edu.cn
下载安装 opencv
conda install -c conda-forge opencv
==python opencv==
使用摄像头捕获视频并显示
import cv2
import numpy
import matplotlib.pyplot as plot
imcap = cv2.VideoCapture(0)
while(1):
# get a frame
ret, frame = imcap.read()
# show a frame
cv2.imshow("capture", frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
imcap.release()
cv2.destroyAllWindows()
==硬件平台==
* PC平台
* PYNQ
* Android平板
* 英伟达TX1
=训练数据集=
参考文档
==训练==训练的步骤参考:[https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/running_locally.md Running Locally] 其中,使用自己的数据集需要生成labelmap和tfrecord:[https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/using_your_own_dataset.md label_mapOwn Dataset] pipeline的配置文件参考:[https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/configuring_jobs.md Pipeline]样例包括:[https://github.com/tensorflow/models/tree/master/research/object_detection/samples/configs config_samples] 可用的pretrain模型参考:[https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md Model Zoo] 建议使用速度为fast的模型。
=参考=