[英]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张可以检测到道路线的交通图像):
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.