在scikit学习(计算机视觉)中如何处理我自己的数据集? [英] How can I work with my own dataset in scikit-learn (for computer vision)?
问题描述
如何在scikit学习中使用自己的数据集?
Scikit教程总是以加载他的数据集(数字数据集,花数据集)为例。
How can I work with my own dataset in scikit-learn? Scikit Tutorial always take as example to load his dataset (digit dataset, flower dataset...)
http://scikit-learn.org/stable/datasets/index.html
ie:从sklearn.datasets import load_iris
http://scikit-learn.org/stable/datasets/index.html ie: from sklearn.datasets import load_iris
我有我的图像,我不知道如何创建新的。
I have my images and I have no idea how create new one.
特别是,为了开始,我使用这个例子我发现(我使用库opencv):
Particularly, for starting, i use this example i found (i use library opencv):
img =cv2.imread('telamone.jpg')
# Convert them to grayscale
imgg =cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
# SURF extraction
surf = cv2.SURF()
kp, descritors = surf.detect(imgg,None,useProvidedKeypoints = False)
# Setting up samples and responses for kNN
samples = np.array(descritors)
responses = np.arange(len(kp),dtype = np.float32)
我想提取一组图像,在一个实现机器的方式有用l赚取算法!
I would like to extract features of a set of images, in a way useful to implement a machine learning algorithm!
推荐答案
您首先需要清楚地定义您要实现的内容:将功能提取到一组图像在实现机器学习算法方面有用!太多含糊了,给你任何指导。
You would first need to clearly define what you are trying to achieve: "extract feature to a set of images, in a way useful to implement a machine learning algorithm!" is much too vague to give you any guidance.
你是否想做:
-
图像整体的图像分类(例如室内场景与室外场景)?
image classification of the picture as a whole (e.g. indoor scene vs outdoor scene)?
对象识别(例如,识别几个相同的对象在不同的图片)在一组图片的子部分内,可能使用各种尺寸的窗口的扫描程序?
object recognition (e.g. recognizing several instances of the same object in different pictures) inside sub-parts of a set of pictures, maybe using a scan procedures with windows of various sizes?
对象检测和类 - 基于分类(例如,在图片中发现所有出现的汽车或行人以及这些类的每一次实例的边界框)?
object detection and class-based categorization (e.g. finding all occurrences of cars or pedestrians in pictures and a bounding box around each occurrence of instances of those classes)?
全图像语义解析每个片段(构建,路,人,树)的像素分割+类分类...
full picture semantic parsing a.k.a. segmentation of the pixels + class categorization of each segment (build, road, people, trees)...
每个这些任务将需要不同的管道(特征提取+机器学习模型组合)。
Each of those tasks will require different pipelines (feature extraction + machine learning models combo).
您应该首先阅读一本关于该主题的书,例如: http://szeliski.org/Book/
You should probably start by reading a book on the subject, for instance: http://szeliski.org/Book/
另外作为附注,stackoverflow可能不是最好的地方提出这样的开放式问题。
Also as a side note, stackoverflow is probably not the best place to ask such open ended questions.
这篇关于在scikit学习(计算机视觉)中如何处理我自己的数据集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!