我目前正在使用Haar分类器来检测物体.在我的路上,我不明白什么是minNeighbors参数,它代表什么?实际上我不明白检测候选矩形的邻居是什么.任何人都可以定义相邻的想法吗?
我必须使用OpenCV编码一个物体探测器(在这种情况下,一个球).问题是,google上的每一次搜索都会返回一些带有FACE DETECTION的内容.所以我需要帮助从哪里开始,使用什么等.
一些信息:
此外,我想使用轮廓在Canny'ed图像上找到圆圈,只需要找到一种方法将轮廓转换为一行数据来教授KNN.
所以...建议?
提前致谢.;)
在花了几天试图完成这项任务之后,我想分享一下我如何回答这个问题的经验:
如何使用TS对象检测来训练使用我自己的数据集?
在本教程中关于对象检测,提到了快速R-CNN.还提到了ROI(感兴趣区域)层.
在数学上,当根据最终卷积层激活函数(在每个单元格中)调整区域提议的大小时,会发生什么?
object-detection computer-vision deep-learning conv-neural-network
我正在按照本教程tensorflow serving使用我的对象检测模型.我正在使用tensorflow对象检测来生成模型.我创建了使用冷冻模型这个出口(生成的冷冻模型作品使用python脚本).
冻结的图形目录具有以下内容(目录上没有任何内容variables)
变量/
saved_model.pb
现在,当我尝试使用以下命令提供服务时,
tensorflow_model_server --port=9000 --model_name=ssd --model_base_path=/serving/ssd_frozen/
Run Code Online (Sandbox Code Playgroud)
它总是告诉我
...
tensorflow_serving/model_servers/server_core.cc:421](重新)添加模型:ssd 2017-08-07 10:22:43.892834:W tensorflow_serving/sources/storage_path/file_system_storage_path_source.cc:262]在基础下找不到任何版本的servable ssd path/serving/ssd_frozen/2017-08-07 10:22:44.892901:W tensorflow_serving/sources/storage_path/file_system_storage_path_source.cc:262]在基本路径/ serving/ssd_frozen /下找不到servable ssd的版本
...
object-detection deep-learning tensorflow tensorflow-serving
我在 Google Colab 中预训练了目标检测模型(Google Colab + TensorFlow),每周对我拥有的新图像运行两三次,从去年到本周一切都很好。现在,当我尝试运行模型时,我收到以下消息:
\nGraph execution error:\n\n2 root error(s) found.\n (0) UNIMPLEMENTED: DNN library is not found.\n [[{{node functional_1/conv1_conv/Conv2D}}]]\n [[StatefulPartitionedCall/SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/MultiClassNonMaxSuppression/Reshape_5/_126]]\n (1) UNIMPLEMENTED: DNN library is not found.\n [[{{node functional_1/conv1_conv/Conv2D}}]]\n0 successful operations.\n0 derived errors ignored. [Op:__inference_restored_function_body_27380] ***\nRun Code Online (Sandbox Code Playgroud)\n以前从未发生过。
\n在运行模型之前,我必须使用以下命令安装 Tensor Flow 对象检测 API:
\nGraph execution error:\n\n2 root error(s) found.\n (0) UNIMPLEMENTED: DNN library is not found.\n [[{{node functional_1/conv1_conv/Conv2D}}]]\n [[StatefulPartitionedCall/SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/MultiClassNonMaxSuppression/Reshape_5/_126]]\n (1) UNIMPLEMENTED: DNN library is not found.\n [[{{node functional_1/conv1_conv/Conv2D}}]]\n0 successful operations.\n0 derived errors ignored. [Op:__inference_restored_function_body_27380] …Run Code Online (Sandbox Code Playgroud) 我有一个关于与OpenCV匹配的对象的问题.我正在使用opencv 2.3中实现的SURF算法来首先检测每个图像上的特征,然后提取这些特征的描述符.使用Brute Force Matcher进行匹配的问题,我不知道如何判断两个图像是否匹配,就像我使用两个不同的图像一样,两个图像中的描述符之间存在线条!
我的代码的这些输出,无论是两个图像 - 我与它们进行比较 - 都相似或不同,结果图像表明两个图像是匹配的.
问题是:我如何区分这两个图像?
真实匹配:

假匹配!! :

我的代码:
Mat image1, outImg1, image2, outImg2;
// vector of keypoints
vector<KeyPoint> keypoints1, keypoints2;
// Read input images
image1 = imread("C://Google-Logo.jpg",0);
image2 = imread("C://Alex_Eng.jpg",0);
SurfFeatureDetector surf(2500);
surf.detect(image1, keypoints1);
surf.detect(image2, keypoints2);
drawKeypoints(image1, keypoints1, outImg1, Scalar(255,255,255), DrawMatchesFlags::DRAW_RICH_KEYPOINTS);
drawKeypoints(image2, keypoints2, outImg2, Scalar(255,255,255), DrawMatchesFlags::DRAW_RICH_KEYPOINTS);
namedWindow("SURF detector img1");
imshow("SURF detector img1", outImg1);
namedWindow("SURF detector img2");
imshow("SURF detector img2", outImg2);
SurfDescriptorExtractor surfDesc;
Mat descriptors1, descriptors2;
surfDesc.compute(image1, keypoints1, descriptors1);
surfDesc.compute(image2, keypoints2, descriptors2);
BruteForceMatcher<L2<float>> matcher;
vector<DMatch> …Run Code Online (Sandbox Code Playgroud) 我们目前正在尝试使用OpenCV,C++版本中提供的方法检测医疗器械图像中的对象区域.示例图像如下所示:

以下是我们遵循的步骤:
这种方法适用于图像1,结果如下:


到目前为止,一切都很好,但另一个图像样本使我们的工作复杂化如下所示.

在物体下面放一条浅绿色毛巾会产生这样的图像:

像我们之前那样过滤了区域后,我们得到了这个:

显然,这不是我们需要的......我们除了这样的东西:

我正在考虑聚集最近发现的连接组件(不知何故!!),这样我们可以最大限度地减少毛巾存在的影响,但是不知道它是否可行,或者之前有人试过这样的东西?此外,有没有人有更好的想法来克服这种问题?
提前致谢.
opencv cluster-analysis object-detection connected-components
我正在使用TensorFlow的全新Object Detection API,并决定在其他一些公开的数据集上进行训练.
我偶然偶然发现这个杂货数据集,其中包括超市货架上各种品牌香烟盒的图像,以及一个文本文件,其中列出了每个图像中每个香烟盒的边界框.数据集中已标注10个主要品牌,所有其他品牌均属于第11个"杂项"类别.
我按照他们的教程设法在这个数据集上训练模型.由于处理能力的限制,我只使用了数据集的三分之一,并进行了70:30分割,用于训练和测试数据.我使用了faster_rcnn_resnet101模型.配置文件中的所有参数与TF提供的默认参数相同.
在16491个全局步骤之后,我在一些图像上测试了模型,但我对结果不太满意 -
我遇到的另一个问题是模型从未检测到除标签1之外的任何其他标签
未从训练数据中检测到产品的裁剪实例
即使在负像中,它也可以99%的置信度检测香烟盒!
有人可以帮我解决问题吗?我该怎么做才能提高准确度?为什么它会检测到属于第1类的所有产品,尽管我已经提到总共有11个类?
编辑添加了我的标签贴图:
item {
id: 1
name: '1'
}
item {
id: 2
name: '2'
}
item {
id: 3
name: '3'
}
item {
id: 4
name: '4'
}
item {
id: 5
name: '5'
}
item {
id: 6
name: '6'
}
item {
id: 7
name: '7'
}
item {
id: 8
name: '8'
}
item {
id: …Run Code Online (Sandbox Code Playgroud) python classification machine-learning object-detection tensorflow
我正在使用Keras和Python进行分类然后对象检测.我已经对猫/狗进行了80%以上的准确度分类,我现在的结果还不错.我的问题是如何从输入图像中检测猫或狗?我完全糊涂了.我想使用自己的高度,而不是来自互联网的预训练.
这是我目前的代码:
from keras.preprocessing.image import ImageDataGenerator
from keras.models import Sequential
from keras.layers import Convolution2D, MaxPooling2D
from keras.layers import Activation, Dropout, Flatten, Dense
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
from keras.preprocessing.image import ImageDataGenerator, array_to_img, img_to_array, load_img
#########################################################################################################
#VALUES
# dimensions of our images.
img_width, img_height = 150, 150
train_data_dir = 'data/train'
validation_data_dir = 'data/validation'
nb_train_samples = 2000 #1000 cats/dogs
nb_validation_samples = 800 #400cats/dogs
nb_epoch = 50
#########################################################################################################
#MODEL
model = Sequential()
model.add(Convolution2D(32, 3, 3, input_shape=(3, img_width, img_height))) …Run Code Online (Sandbox Code Playgroud)