简体   繁体   English

如何在路线检测中使用Python进行深度学习(Keras / Tensorflow)创建自己的数据集

[英]How to create your own dataset with Python for Deep Learning (Keras / Tensorflow) in Road Line detection

I am given the task to find road lines on an image for a class project. 我的任务是在班级项目的图像上查找路线。

I want to start writing Convolutional Neural Network to do the task, but I am not sure how to create a dataset. 我想开始编写卷积神经网络来执行此任务,但是我不确定如何创建数据集。

Let's say I have to find lines on this image (originally I have been given arround 1000 images of traffic where road lines could be detected): 假设我必须在此图像上找到线(起初,我获得了大约1000张可以检测到道路线的交通图像):

roadlines

To be able to do that I have to create a dataset. 为此,我必须创建一个数据集。 What to do? 该怎么办? Should I take some random images and cut regions where I can see the road lines? 我是否应该拍摄一些随机图像并剪切可以看到道路线的区域? What size should the training images be? 训练图像应为多大? How would I label the line to stand out from the background? 我如何标记线条以使其与背景脱颖而出?

Also, I presume cutting lines from an image is an okay way when the line is segmented, but I cannot do that for a full line, can I? 另外,我认为在分割线段时可以从图像中剪断线,但是我不能对整条线进行分割,可以吗?

It depends a lot on the assignment details. 这很大程度上取决于作业细节。 What does "find road lines on an image" mean? “在图像上找到道路线”是什么意思?

Depending on the answer to the above question, you could divide the image in a 4x4 or 5x5 grid and try to find the cells on that grid that contain road lines. 根据上述问题的答案,您可以将图像划分为4x4或5x5网格,并尝试在该网格上查找包含道路线的像元。

To accomplish that you could manually label some of the cells (you might want to create a small GUI to facilitate this part) and train your CNN with the labeled data. 为此,您可以手动标记一些单元格(您可能希望创建一个小的GUI来简化此部分),并使用标记的数据来训练CNN。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何解决 KeyError: 'val_mean_absolute_error' Keras 2.3.1 and TensorFlow 2.0 from Chollet Deep Learning with Python - How to resolve KeyError: 'val_mean_absolute_error' Keras 2.3.1 and TensorFlow 2.0 From Chollet Deep Learning with Python 如何使用keras测试深度学习模型? - how to test a deep learning model with keras? 如何在 Keras 中使用 Tensorflow 2 数据集 API? - How to use Tensorflow 2 Dataset API with Keras? 使用我自己的数据集在 Keras 中创建自定义数据生成器 - Create custom datagenerator in Keras using my own dataset Tensorflow对象检测API,训练自己的模型,错误:模块'sys'没有属性'maxint' - Tensorflow Object detection API, train your own model, Error : module 'sys' has no attribute 'maxint' 使用深度学习的小物体检测 - Small object detection using deep learning 在张量流目标检测中训练自己的数据集(BDD100K)时数据转换错误 - data converting error when training own dataset(BDD100K) in tensorflow object detection 具有keras和可变输入大小的深度学习(lstm) - deep learning (lstm) with keras and variable size of inputs Keras中具有不同数据类型的深度学习模型 - Deep Learning model with Different data types in Keras 我们自己对象的tensorflow对象检测 - tensorflow object detection for our own objects
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM