“安全帽检测系统”版本间的差异

实验时间
支撑技术
 
(2位用户的5个中间修订版本未显示)
第15行: 第15行:
 
=实验时间=
 
=实验时间=
  
校历第六~第七周(10月23日-11月12日)
+
校历第六~第七周(10月23日-11月26日)
  
 
=学生安排=
 
=学生安排=
第37行: 第37行:
  
 
==支撑技术==
 
==支撑技术==
TensorFlow [[Python_TensorFlow_Basics]]
 
  
[https://github.com/tensorflow/models/tree/master/research/object_detection TensorFlow_Object_Detection]
+
[https://opencv.org/ OpenCV ]  
  
==硬件平台==
+
[http://www.tensorflow.org TensorFlow]  https://tensorflow.google.cn/
  
* PC平台
+
Python+TensorFlow [[Python_TensorFlow_Basics]]
  
* PYNQ
+
[https://github.com/tensorflow/models/tree/master/research/object_detection TensorFlow_Object_Detection]
  
* Android平板
+
=OpenCV图像获取=
 
+
* 英伟达TX1
+
 
+
=训练数据集=
+
 
+
==数据采集==
+
 
+
安全帽图片集
+
 
+
==标注图片==
+
 
+
参考文档
+
 
+
[https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/using_your_own_dataset.md label_map]
+
 
+
=图像获取=
+
  
 
以下为Windows 10平台为例。
 
以下为Windows 10平台为例。
第97行: 第80行:
 
  imcap.release()
 
  imcap.release()
 
  cv2.destroyAllWindows()
 
  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 Own 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的模型。
  
 
=参考=
 
=参考=

2018年11月2日 (五) 05:00的最后版本

教学团队

教师:陈震,马晓东,章屹松,王蓓蓓,高英

助教:郑文勋,冯杰,宋丹丹,常嘉辉,闫泽禹,陆昕

实验内容

场景:在一个建设场地,为了保障人员的人身安全,需要检测工程人员是否配戴了安全帽。

目标:完成一个安全帽佩戴检测系统。学习使用TensorFlow实现计算机视觉的对象检测技术(Object Detection, OD)。

性质:属于计算机视觉,属于实验单元。

实验时间

校历第六~第七周(10月23日-11月26日)

学生安排

  • 组织:
  1. 每4人一组:
  2. 每个助教指导一组;
  3. 现场拍照:章老师等
  • 要求:
  1. 每组同学建立课程wiki;
  2. 每组同学建立Gitlab_repo;

实验技术

实验步骤分为:

  1. 佩戴安全帽照片(每位同学三张:正面,侧面和后面),也可以邀请同学贡献一下。图片格式:"学号-x.png" or "学号.jpg", x为1,2,3 代表正面、侧面和后面。
  2. 每位同学标注数据,由助教负责汇总,形成训练数据集:60 x 3 =180张照片。标注格式见 说明。
  3. 分组选择模型、训练模型、提交模型。
  4. 助教测试评估模型,给出结果。

支撑技术

OpenCV

TensorFlow https://tensorflow.google.cn/

Python+TensorFlow Python_TensorFlow_Basics

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

训练数据集

数据采集

安全帽图片集

标注图片

参考文档

训练

训练的步骤参考: Running Locally

其中,使用自己的数据集需要生成labelmap和tfrecord: Own Dataset

pipeline的配置文件参考: Pipeline 样例包括: config_samples

可用的pretrain模型参考: Model Zoo

建议使用速度为fast的模型。

参考

  1. TensorFlow
  2. W. Liu et al., SSD: Single shot multibox detector. ECCV 2016.
  3. Huang J et al., "Speed/accuracy trade-offs for modern convolutional object detectors." CVPR 2017
最后修改于2018年11月2日 (星期五) 05:00