Google Object detection

前言:

本文记录了使用Google发布的Object detection(July 1st, 2019)接口,完成了对标注目标的检测。参考了很多博文,在此记录配置过程,方便之后的再次调用。

首先贴出完整的代码地址:https://github.com/tensorflow/models

Tensorflow Object Detection API:https://github.com/tensorflow/models/tree/master/research/object_detection

一、环境配置

参考网址:https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/installation.md

所有的环境都搭建在Anaconda创建的环境下

在windows10和Ubuntu下我都进行了配置,下方的配置会注明操作系统的区别

依赖包安装

在上面参考网址上,已经明确给出了所需要的环境,直接用pip命令下载即可。

Protobuf 安装

下载地址:https://github.com/google/protobuf/releases

win:

  • win10系统下载了protoc-3.9.1-win64.zip,解压后将其中的protoc.exe放置C:\Windows位置;

  • 通过命令窗口,定位到models/research/目录下,运行如下指令:

    1. # From /models/research/
    2. protoc object_detection/protos/*.proto --python_out=.

    此处我出现了No such file or directory的错误

    采用一个个文件名单独输入的方式即可,例如:

    1. # C:\Users\Zhucc\Desktop\ObjDec\models\research>protoc
    2. object_detection/protos/anchor_generator.proto --python_out=.

Linux:

  • 通过pip安装pip install protobuf,我的版本为3.9.1

  • 定位到models/research/目录下,运行如下指令:

    1. # From /models/research/
    2. protoc object_detection/protos/*.proto --python_out=.

    一行命令搞定,很舒服

Python环境配置:

win

  • 转到添加环境变量

  • 可在系统变量/用户变量选项框中新建环境变量

  • 变量名:PYTHONPATH

  • 变量值:

    • C:\Users\Zhucc\Desktop\ObjDec\models\research

    • C:\Users\Zhucc\Desktop\ObjDec\models\research\slim

Linux

  • 转到./models/research目录下,运行如下命令:

    1. # From /models/research/
    2. export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim

COCO API 安装

win:

COCO对于Windows是不支持的,因此需要通过其他的方式安装

  • 跳转至:https://github.com/philferriere/cocoapi 将代码下载好

  • win+r+cmd运行终端,进入*/cocoapi-master/PythonAPI

  • 运行如下命令:

    1. python setup.py build_ext install

    运行完成后,会发现_mask.c此文件被更新

    我电脑本身就存在Visual Studio2015,未出现任何错误

  • 然后将PythonAPI中的pycocotools放到*/models/research目录下即可

参考网址:https://blog.csdn.net/benzhujie1245com/article/details/82686973

Linux:

只需按照官方的要求配置即可:

  1. git clone https://github.com/cocodataset/cocoapi.git
  2. cd cocoapi/PythonAPI
  3. make
  4. cp -r pycocotools <path_to_tensorflow>/models/research/

验证安装环境:

win:

  • 进入*/models/research/object_detection

  • Jupiter Notebook打开object_detection_tutorial.ipynb

代码解析:略,后续补充

  • 运行即可,若出现被框出来的狗/人/风筝呀就说明你已经基本成功的在win10环境下配置了运行环境了

注意:其实官方的代码是不会显示图片的,具体原因见如下网址:

https://blog.csdn.net/benzhujie1245com/article/details/82686973

但是!我改了后显示图片的FIgure会出现未响应的情况

因为只是验证环境,将后两句显示的代码改为:

  1. img = Image.fromarray(image_np, 'RGB')
    img.show()

虽然有点傻,但是至少可以显示出图片来

Linux:

官方方法:
  1. python object_detection/builders/model_builder_test.py
  2. # 结果:
  3. # ................
  4. # ----------------------------------------------------------------------
  5. # Ran 16 tests in 0.285s
  6. # OK
采用Jupiter Notebook

未试过,待补充

二、准备数据

在配置完成ObjectDetection后,在训练模型前,需要对你要识别的物体数据进行处理。

首先说明文件夹目录

  1. ├─Data
    ├─test
    | | ├─images
    ├─labels
    ├─test.csv
    | | └─test.tfrecord
    └─train
    |   ├─images
        ├─labels
        ├─train.csv
    |   └─train.tfrecord
    | ├─xml2csv.py
    | ├─csv2tfrecords.py

数据准备

根据你需要识别的物体,对该物体进行数据的收集。

例如:此次我对人脸进行识别,随意的找了80张图片,作为我此次的训练集(60)和验证集(20)。

为了方便起见,图采集的图像进行重命名,以下为参考代码:

  1. # coding:utf-8
  2. import os
  3. import random
  4. from PIL import Image


  5. def deleteImages(file_path, file_list):
  6. """
  7. 删除图片
  8. """
  9. for fileName in file_list:
  10. command = "del " + file_path + "\\" + fileName
  11. os.system(command)


  12. def change_image_name(file_path, file_list):
  13. """
  14. 修改图片名字
  15. """
  16. for index, fileName in enumerate(file_list):
  17. if fileName.find('.jpg') == -1:
  18. continue
  19. print(index, fileName)
  20. newFileName = str('%03d' % index) + ".jpg"
  21. print(newFileName)
  22. im = Image.open(file_path + '/' + fileName)
  23. im.save(file_path + '/' + newFileName)


  24. def main():
  25. # file_path = '.\\train\\images'
  26. file_path = '.\\test\\images'
  27. file_list = os.listdir(file_path)
  28. random.shuffle(file_list)

  29. change_image_name(file_path, file_list)
  30. deleteImages(file_path, file_list)


  31. if __name__ == '__main__':
  32. main()

数据标注

在寻找完数据后,需要对数据进行标注,标注采用的工具如下:https://github.com/tzutalin/labelImg,根据你自身的环境,按照工具的说明进行操作即可。

我的环境为Anaconda+Windows,因此操作流程为:

  1. # 1.Open the Anaconda Prompt and go to the labelImg directory
  2. # 2.
  3. conda install pyqt=5 # conda已经带有了,略过
  4. pyrcc5 -o libs/resources.py resources.qrc
  5. python labelImg.py
  6. python labelImg.py [IMAGE_PATH] [PRE-DEFINED CLASS FILE]

labelImage的安装与使用参考链接:https://blog.csdn.net/jesse_mx/article/details/53606897

将标注后生成的xml文件放到相应的train\labelstest\labels文件夹下

不过此过程及其枯燥且耗时

数据转换

数据转换的步骤为:xml->csv->tfrecords

为什么不直接从xml转换为tfrecords文件:-)

  • xml->csv代码:

  1. import glob
  2. import pandas as pd
  3. import xml.etree.ElementTree as ET

  4. # 需要修改地方:选择训练集train还是测试集test
  5. datasets = 'train'
  6. csv_path = '.\\' + datasets + '\\'
  7. xml_path = '.\\' + datasets + '\\labels\\'


  8. def xml_to_csv(path):
  9. """将xml转换成csv格式的数据"""
  10. xml_list = []
  11. for xml_file in glob.glob(path + '*.xml'):
  12. tree = ET.parse(xml_file)
  13. root = tree.getroot()
  14. for member in root.findall('object'):
  15. value = (root.find('filename').text,
  16. int(root.find('size')[0].text),
  17. int(root.find('size')[1].text),
  18. member[0].text,
  19. int(member[4][0].text),
  20. int(member[4][1].text),
  21. int(member[4][2].text),
  22. int(member[4][3].text)
  23. )
  24. xml_list.append(value)
  25. column_name = ['filename', 'width', 'height', 'class', 'xmin', 'ymin', 'xmax', 'ymax']
  26. xml_df = pd.DataFrame(xml_list, columns=column_name)
  27. return xml_df


  28. def main():
  29. xml_df = xml_to_csv(xml_path)
  30. xml_df.to_csv(csv_path + datasets + '.csv', index=None)
  31. print('Successfully converted %s\'s xml to csv.' % datasets)


  32. if __name__ == '__main__':
  33. main()

转换完成后格式如下:

filename,width,height,class,xmin,ymin,xmax,ymax 000,500,333,mouth,265,256,370,315 000,500,333,eye,201,119,276,160 000,500,333,eye,363,114,447,158 000,500,333,face,151,7,498,326

  • csv->tfrecords代码

  1. import os
  2. import io
  3. import pandas as pd
  4. import tensorflow as tf

  5. from PIL import Image
  6. from object_detection.utils import dataset_util
  7. from collections import namedtuple

  8. # 此时是训练集还是测试集
  9. datasets = 'train'
  10. flags = tf.app.flags
  11. flags.DEFINE_string('csv_input', './%s/%s.csv' % (datasets, datasets), 'Path to the CSV input')
  12. flags.DEFINE_string('output_path', './%s/%s.tfrecord' % (datasets, datasets), 'Path to output TFRecord')
  13. flags.DEFINE_string('train_or_test', '%s' % datasets, 'train/test datasets')
  14. FLAGS = flags.FLAGS


  15. # 这里将label修改成自己的类别
  16. def class_text_to_int(row_label):
  17. if row_label == 'face':
  18. return 1
  19. if row_label == 'eye':
  20. return 2
  21. if row_label == 'mouth':
  22. return 3
  23. else:
  24. None


  25. def split(df, group):
  26. data = namedtuple('data', ['filename', 'object'])
  27. gb = df.groupby(group)
  28. return [data(filename, gb.get_group(x)) for filename, x in zip(gb.groups.keys(), gb.groups)]


  29. def create_tf_example(group, path):
  30. # 根据之前修改图像名字时给图像的命令来修改
  31. with tf.gfile.GFile(os.path.join(path, '%03d.jpg' % group.filename), 'rb') as fid:
  32. encoded_jpg = fid.read()
  33. encoded_jpg_io = io.BytesIO(encoded_jpg)
  34. image = Image.open(encoded_jpg_io)
  35. width, height = image.size

  36. # 根据之前修改图像名字时给图像的命令来修改
  37. filename = ('%03d.jpg' % group.filename).encode('utf8')
  38. image_format = b'jpg'
  39. xmins = []
  40. xmaxs = []
  41. ymins = []
  42. ymaxs = []
  43. classes_text = []
  44. classes = []

  45. for index, row in group.object.iterrows():
  46. xmins.append(row['xmin'] / width)
  47. xmaxs.append(row['xmax'] / width)
  48. ymins.append(row['ymin'] / height)
  49. ymaxs.append(row['ymax'] / height)
  50. classes_text.append(row['class'].encode('utf8'))
  51. classes.append(class_text_to_int(row['class']))

  52. # 转换为tfrecords需要的格式
  53. tf_example = tf.train.Example(features=tf.train.Features(feature={
  54. 'image/height': dataset_util.int64_feature(height),
  55. 'image/width': dataset_util.int64_feature(width),
  56. 'image/filename': dataset_util.bytes_feature(filename),
  57. 'image/source_id': dataset_util.bytes_feature(filename),
  58. 'image/encoded': dataset_util.bytes_feature(encoded_jpg),
  59. 'image/format': dataset_util.bytes_feature(image_format),
  60. 'image/object/bbox/xmin': dataset_util.float_list_feature(xmins),
  61. 'image/object/bbox/xmax': dataset_util.float_list_feature(xmaxs),
  62. 'image/object/bbox/ymin': dataset_util.float_list_feature(ymins),
  63. 'image/object/bbox/ymax': dataset_util.float_list_feature(ymaxs),
  64. 'image/object/class/text': dataset_util.bytes_list_feature(classes_text),
  65. 'image/object/class/label': dataset_util.int64_list_feature(classes),
  66. }))
  67. return tf_example


  68. def main(_):
  69. writer = tf.python_io.TFRecordWriter(FLAGS.output_path)
  70. path = os.path.join(os.getcwd() + '\\' + FLAGS.train_or_test, 'images')
  71. examples = pd.read_csv(FLAGS.csv_input)
  72. grouped = split(examples, 'filename')
  73. for group in grouped:
  74. tf_example = create_tf_example(group, path)
  75. writer.write(tf_example.SerializeToString())

  76. writer.close()
  77. print('Successfully created the TFRecords: {}'.format(FLAGS.output_path))


  78. if __name__ == '__main__':
  79. tf.app.run()

三、训练模型

在完成上述两部后,你可以开始真正的训练你想要的模型了。

由于这种训练太消耗电脑资源,因此将此过程放置服务器上进行

出于方便,我在object_detection目录下新建了training文件夹,将所有自己添加的文件全部都放置改文件夹下,其目录结构为:

  1. ├─data
    ├─model
    └─ssd_mobilenet_v1_coco_2018_01_28
        └─saved_model
            └─variables
    ├─output_model
    └─saved_model
        └─variables
    └─test_image

模型下载

模型动物园:https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md

在此处提供了各种各样的可用于目标检测的模型供你下载,先选个最简单的ssd_mobilenet_v1_coco下载试试看效果;

解压后的目录结构如下:

  1. |─ssd_mobilenet_v1_coco_2018_01_28
      checkpoint
      frozen_inference_graph.pb
      model.ckpt.data-00000-of-00001
      model.ckpt.index
      model.ckpt.meta
      pipeline.config
     
      └─saved_model
          saved_model.pb
         
          └─variables

模型配置文件修改

  • data目录下添加文件face_detection.pbtxt,其中的内容为:

    1. item {
    2. name: "face"
    3. id: 1
    4. }
    5. item {
    6. name: "eye"
    7. id: 2
    8. }
    9. item {
    10. name: "mouth"
    11. id: 3
    12. }

    这里面的id号和之前在csv中给定的id号需保持一致

  • 将模型解压文件夹中的pipeline.config,复制到training目录下

  • 进行如下修改:

    • 将文件中的所有PATH_TO_BE_CONFIGURED修改成为自己的对应的文件夹路径

    1. # 我修改如下:
    2. fine_tune_checkpoint: "training/model/ssd_mobilenet_v1_coco_2018_01_28/model.ckpt"
    3. label_map_path: "training/data/face_detection.pbtxt"
    4. input_path: "training/data/train.tfrecord"
    5. label_map_path: "training/data/face_detection.pbtxt"
    6. input_path: "training/data/test.tfrecord"

    出于引用配置文件的model_main.pyobject_detection目录下,因此要加上training/

  • num_classes,改为你要识别的类别数,此处为3

  • eval_config下的num_examples修改成你测试集的图片量,此处为20

至此,配置文件已经修改完成。

模型的训练

之前所有的铺垫都是为了此次模型的训练,也终于要开始对模型进行训练了。

  • 通过命令nvidia-smi查看可利用的空闲的GPU资源;

  • 通过命令conda activate tensorflow1.12激活之前配置的环境;

  • 进入models/research/object_detection文件夹中,为了方便起见,新建train_cmd.sh

  • 用vim编辑train_cmd.sh,输入:

    1. # train
    2. #! /bin/bash
    3. CUDA_VISIBLE_DEVICES=1 \ # 指定gpu资源
    4. python model_main.py \ # 需要运行的文件
    5. --model_dir=training/model \ # 训练中生成的模型保存的地方
    6. --pipeline_config_path=training/pipeline.config \ # 配置文件地址
    7. --num_train_steps=50000 # 训练的步数
  • 控制终端中输入bash train_cmd.sh,即开始进行训练

    • 若出现无法找到object_detection模块的问题,则回到research目录下,运行如下语句:

    1. export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim

查看训练情况

改文件训练时,并不会输出loss与accuracy的情况,因此需要通过tensorboard进行查看。

在服务器使用tensorboard的方法:https://blog.csdn.net/sinat_35512245/article/details/82960937

进行上述配置后,进入object_detection文件中,输入命令:

  1. tensorboard --logdir=./training/model --port=6006

之后在本地的浏览器中输入:localhost:12345即可查看远程的tensorboard

tensorboard查看情况

  • IMAGES:在这里你可以查看你之前转换的数据是否正确,例如此时我的数据如下:

  • GRAPHS:图结构就定义在此处,有毅力有兴趣者可以仔细看看数据时如何处理的,模型是如何架构的,方便后期的调参;

  • SCALARS:此处为训练时的各种参数,例如loss值,learning_rate等参数,以下是经过50000次训练后的结果图:

模型的导出

在完成训练后,我们需要将训练生成的模型进行导出操作,将模型导出成为.pd的格式,操作流程如下:

  • object_detection目录下新建create_pd.sh;

  • 将其中内容修改为:

  1. # use export_inference_graph.py to create .pd file
  2. #! /bin/bash
  3. CUDA_VISIBLE_DEVICES=1 \
  4. python export_inference_graph.py \
  5. --input_type=image_tensor \
  6. --pipeline_config_path=./training/pipeline.config \
  7. --trained_checkpoint_prefix=training/model/model.ckpt-50000 \
  8. --output_directory=./training/output_model

测试效果在win环境下进行,因此将生成的模型文件再导入到windows下

四、训练结果测试

测试环境为本人的win10系统,在object_detection目录下新建了model_test.py文件,代码内容如下:

  1. import os
  2. import cv2
  3. import sys
  4. import numpy as np
  5. from PIL import Image
  6. import tensorflow as tf

  7. # This is needed since the notebook is stored in the object_detection folder.
  8. sys.path.append("..")
  9. from object_detection.utils import ops as utils_ops
  10. from object_detection.utils import label_map_util
  11. from object_detection.utils import visualization_utils as vis_util


  12. # -----------------------------摄像头类定义----------------------------- #
  13. class Camera(object):
  14. def __init__(self, channel):
  15. self.capture = cv2.VideoCapture(channel)

  16. self.fps = int(self.capture.get(cv2.CAP_PROP_FPS))
  17. self.video_height = int(self.capture.get(cv2.CAP_PROP_FRAME_HEIGHT))
  18. self.video_width = int(self.capture.get(cv2.CAP_PROP_FRAME_WIDTH))

  19. self.capture.set(cv2.CAP_PROP_FRAME_WIDTH, self.video_width)
  20. self.capture.set(cv2.CAP_PROP_FRAME_HEIGHT, self.video_height)
  21. self.capture.set(cv2.CAP_PROP_FPS, self.fps)

  22. def get_image(self):
  23. """
  24. 获取图像
  25. """
  26. if self.capture.isOpened():
  27. ret, frame = self.capture.read()
  28. if ret is True:
  29. print('get picture success')
  30. return frame
  31. else:
  32. print('get picture failed')
  33. return None

  34. def release_camera(self):
  35. """
  36. 释放摄像机资源
  37. """
  38. self.capture.release()
  39. cv2.destroyAllWindows()

  40. # ------------------------------识别类定义----------------------------- #
  41. class SSD_Model(object):
  42. def __init__(self, PATH_TO_FROZEN_GRAPH, PATH_TO_LABELS):
  43. self.PATH_TO_FROZEN_GRAPH = PATH_TO_FROZEN_GRAPH
  44. # 添加需要识别的标签
  45. PATH_TO_LABELS = PATH_TO_LABELS
  46. self.category_index = label_map_util.create_category_index_from_labelmap(PATH_TO_LABELS, use_display_name=True)
  47. self.detection_graph = self.load_model()

  48. def load_model(self):
  49. # 载入模型文件
  50. detection_graph = tf.Graph()
  51. with detection_graph.as_default():
  52. od_graph_def = tf.GraphDef()
  53. with tf.gfile.GFile(self.PATH_TO_FROZEN_GRAPH, 'rb') as fid:
  54. serialized_graph = fid.read()
  55. od_graph_def.ParseFromString(serialized_graph)
  56. tf.import_graph_def(od_graph_def, name='')
  57. return detection_graph

  58. def run_inference_for_single_image(self, image):
  59. '''
  60. 对单幅图像进行推断
  61. '''
  62. graph = self.detection_graph
  63. with graph.as_default():
  64. with tf.Session() as sess:
  65. # Get handles to input and output tensors
  66. ops = tf.get_default_graph().get_operations()
  67. all_tensor_names = {output.name for op in ops for output in op.outputs}
  68. tensor_dict = {}
  69. for key in [
  70. 'num_detections', 'detection_boxes', 'detection_scores',
  71. 'detection_classes', 'detection_masks']:
  72. tensor_name = key + ':0'
  73. if tensor_name in all_tensor_names:
  74. tensor_dict[key] = tf.get_default_graph().get_tensor_by_name(
  75. tensor_name)
  76. if 'detection_masks' in tensor_dict:
  77. # The following processing is only for single image
  78. detection_boxes = tf.squeeze(tensor_dict['detection_boxes'], [0])
  79. detection_masks = tf.squeeze(tensor_dict['detection_masks'], [0])
  80. # Reframe is required to translate mask from box coordinates to image coordinates and fit the image size.
  81. real_num_detection = tf.cast(tensor_dict['num_detections'][0], tf.int32)
  82. detection_boxes = tf.slice(detection_boxes, [0, 0], [real_num_detection, -1])
  83. detection_masks = tf.slice(detection_masks, [0, 0, 0], [real_num_detection, -1, -1])
  84. detection_masks_reframed = utils_ops.reframe_box_masks_to_image_masks(
  85. detection_masks, detection_boxes, image.shape[1], image.shape[2])
  86. detection_masks_reframed = tf.cast(
  87. tf.greater(detection_masks_reframed, 0.5), tf.uint8)
  88. # Follow the convention by adding back the batch dimension
  89. tensor_dict['detection_masks'] = tf.expand_dims(
  90. detection_masks_reframed, 0)
  91. image_tensor = tf.get_default_graph().get_tensor_by_name('image_tensor:0')

  92. # Run inference
  93. output_dict = sess.run(tensor_dict,
  94. feed_dict={image_tensor: image})

  95. # all outputs are float32 numpy arrays, so convert types as appropriate
  96. output_dict['num_detections'] = int(output_dict['num_detections'][0])
  97. output_dict['detection_classes'] = output_dict[
  98. 'detection_classes'][0].astype(np.int64)
  99. output_dict['detection_boxes'] = output_dict['detection_boxes'][0]
  100. output_dict['detection_scores'] = output_dict['detection_scores'][0]
  101. if 'detection_masks' in output_dict:
  102. output_dict['detection_masks'] = output_dict['detection_masks'][0]
  103. return output_dict


  104. def main():
  105. # 开启摄像头
  106. camera = Camera(0)
  107. # 输入模型
  108. recognize = SSD_Model('./training/output_model/frozen_inference_graph.pb',
  109. './training/data/face_detection.pbtxt')

  110. while camera.capture.isOpened():
  111. # if True:
  112. image = camera.get_image()
  113. # image = cv2.imread('./training/test_image/007.jpg')
  114. # the array based representation of the image will be used later in order to prepare the
  115. # result image with boxes and labels on it.
  116. image_np = np.array(image)
  117. # Expand dimensions since the model expects images to have shape: [1, None, None, 3]
  118. image_np_expanded = np.expand_dims(image_np, axis=0)
  119. # Actual detection.
  120. output_dict = recognize.run_inference_for_single_image(image_np_expanded)
  121. # Visualization of the results of a detection.
  122. vis_util.visualize_boxes_and_labels_on_image_array(
  123. image_np,
  124. output_dict['detection_boxes'],
  125. output_dict['detection_classes'],
  126. output_dict['detection_scores'],
  127. recognize.category_index,
  128. instance_masks=output_dict.get('detection_masks'),
  129. use_normalized_coordinates=True,
  130. line_thickness=2)

  131. cv2.imshow('image', image_np)
  132. cv2.waitKey(20)


  133. if __name__ == "__main__":
  134. main()

测试结果效果如下,上一张本人的帅照:-)

可见,训练出来的结果是有效果的:-)

五、总结

  • 首先感谢Google,封装了那么健全的库,能大大缩减开发的时间,提高开发的效率;

  • 本次训练采用了应该是最为基础的模型,后续会尝试更多的模型,比较不同模型之间的效果;

  • 对于训练的参数为做修改,例如学习率、优化方式等,后续会继续努力理解代码,进行修改来达到更好的效果;

参考:

https://blog.csdn.net/dy_guox/article/details/79111949

https://blog.csdn.net/Orienfish/article/details/81199911

https://blog.csdn.net/exploer_try/article/details/81434985

还有些配置之类的参考链接在文中已经指出了,因此并未在此列出

Google Object detection配置与使用的更多相关文章

  1. 使用TensorFlow Object Detection API+Google ML Engine训练自己的手掌识别器

    上次使用Google ML Engine跑了一下TensorFlow Object Detection API中的Quick Start(http://www.cnblogs.com/take-fet ...

  2. TensorFlow object detection API应用--配置

    目标检测在图形识别的基础上有了更进一步的应用,但是代码也更加繁琐,TensorFlow专门为此开设了一个object detection API,接下来看看怎么使用它. object detectio ...

  3. tensorfolw配置过程中遇到的一些问题及其解决过程的记录(配置SqueezeDet: Unified, Small, Low Power Fully Convolutional Neural Networks for Real-Time Object Detection for Autonomous Driving)

    今天看到一篇关于检测的论文<SqueezeDet: Unified, Small, Low Power Fully Convolutional Neural Networks for Real- ...

  4. 目标检测比赛---Google AI Open Images - Object Detection Track

    https://www.kaggle.com/c/google-ai-open-images-object-detection-track#Evaluation Submissions are eva ...

  5. TensorFlow object detection API

    cloud执行:https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/running_pet ...

  6. Tensorflow object detection API ——环境搭建与测试

    1.开发环境搭建 ①.安装Anaconda 建议选择 Anaconda3-5.0.1 版本,已经集成大多数库,并将其作为默认python版本(3.6.3),配置好环境变量(Anaconda安装则已经配 ...

  7. 第三十二节,使用谷歌Object Detection API进行目标检测、训练新的模型(使用VOC 2012数据集)

    前面已经介绍了几种经典的目标检测算法,光学习理论不实践的效果并不大,这里我们使用谷歌的开源框架来实现目标检测.至于为什么不去自己实现呢?主要是因为自己实现比较麻烦,而且调参比较麻烦,我们直接利用别人的 ...

  8. Tensorflow object detection API 搭建物体识别模型(一)

    一.开发环境 1)python3.5 2)tensorflow1.12.0 3)Tensorflow object detection API :https://github.com/tensorfl ...

  9. TensorFlow object detection API应用

    前一篇讲述了TensorFlow object detection API的安装与配置,现在我们尝试用这个API搭建自己的目标检测模型. 一.准备数据集 本篇旨在人脸识别,在百度图片上下载了120张张 ...

随机推荐

  1. 离线安装Windows Terminal

    Windows Terminal颜值高.适配好.速度快,是Windows 10下命令行工具的不二选择. 最近在公司电脑上安装Windows Terminal时遇到一个问题,由于公司电脑不能直接连接外网 ...

  2. python实现遥感图像阈值分割

    1.阈值分割 import os import cv2 import numpy as np import matplotlib.pyplot as plt from osgeo import gda ...

  3. Servlet生命周期和方法

    一.五个生命周期方法,有三个很重要,初始化方法.提供服务方法和销毁方法 1.三个主要方法 2.另外两个重写的成员方法只做了解 二.生命周期详解 其中,每次刷新页面都是一次对servlet访问: 页面访 ...

  4. .Net性能调优-MemoryPool

    简单用法 //获取MemoryPool实例,实际返回了一个ArrayMemoryPool<T> MemoryPool<char> Pool = MemoryPool<ch ...

  5. J2EE分布式微服务云开发架构 Spring Cloud+Mybatis+ElementUI 前后端分离J2EE分布式微服务云开发架构 Spring Cloud+Mybatis+ElementUI 前后端分离

    ​ 鸿鹄云架构[系统管理平台]是一个大型企业.分布式.微服务.云架构的JavaEE体系快速研发平台,基于模块化.微服务化.原子化.热部署的设计思想,使用成熟领先的无商业限制的主流开源技术(Spring ...

  6. NOIP初赛:完善程序做题技巧

    最近写的文章好像还很多的.那么今天我们来讨论NOIP初赛的题型--完善程序.完善程序相对是比较难的题目了.全卷100分,完善程序占了大概26分,占比非常大.如果和英语考试试卷做比较,相当于首字母填空( ...

  7. [NOIP2015 普及组] 扫雷游戏

    [NOIP2015 普及组] 扫雷游戏 难度:入门 题目描述 扫雷游戏是一款十分经典的单机小游戏.在nn行mm列的雷区中有一些格子含有地雷(称之为地雷格),其他格子不含地雷(称之为非地雷格).玩家翻开 ...

  8. Mysql backup and Recovery Data Type.

    数据库备份方法: 备份类型:物理备份和逻辑备份: 物理备份是指直接复制存储数据库内容的目录和文件,这种类型的备份适用于出现问题时需要快速恢复的大型重要数据库.逻辑备份保存以逻辑数据库结构(create ...

  9. C# lambda 实现 Ascii 排序

    var dir = new Dictionary<string, string>();            dir.Add("channelId", "1& ...

  10. 怎么通俗的理解Netty呢?

    目录 Netty(3.X) 简单体验 Netty的事件驱动机制 Netty的源码阅读 Netty(3.X) 有了Netty,你可以实现自己的HTTP服务器,FTP服务器,UDP服务器,RPC服务器,W ...