我能够在具有 4x 1080Ti 的本地机器上进行训练,正如其他人指出的那样,TF 会占用我机器上的所有可用内存。经过一番探索后,大多数搜索都让我找到了基本 TF 的解决方案,而不是对象检测 API,例如:
如何在对象检测 API 中访问这些类型的选项?如何在 OD API 中对训练进行类似 TF 风格的控制?在 OD API / slim API 中是否有正确的方法?
我尝试向该 Training.proto 添加 GPUOptions 消息,但这似乎没有什么区别。
我正在尝试阅读这一行中Tensorflow非极大值抑制方法的源代码。它是从gen_image_ops文件导入的,但我在张量流源代码中找不到该文件。
有什么来源可以让我获得这个方法的代码吗?
object-detection non-maximum-suppression tensorflow object-detection-api
我在训练中使用Tensorflow 的对象检测 API。
在哪个文件中,冻结层被定义为在训练中对模型进行微调。我需要在微调中尝试更改冻结层。
例如,如果我使用Resnet50 配置,我可以在哪里更改冻结层?
deep-learning conv-neural-network tensorflow object-detection-api
我正在自定义数据集(即车牌数据集)上训练张量流对象检测 API 模型。我的目标是使用 Tensorflow lite 将此模型部署到边缘设备,这样我就无法使用任何 RCNN 系列模型。因为,我无法将任何 RCNN 系列对象检测模型转换为 TensorFlow lite 模型(这是 TensorFlow 对象检测 API 的限制)。我正在使用ssd_mobilenet_v2_coco模型来训练自定义数据集。以下是我的配置文件的代码片段:
model {
ssd {
num_classes: 1
box_coder {
faster_rcnn_box_coder {
y_scale: 10.0
x_scale: 10.0
height_scale: 5.0
width_scale: 5.0
}
}
matcher {
argmax_matcher {
matched_threshold: 0.5
unmatched_threshold: 0.5
ignore_thresholds: false
negatives_lower_than_unmatched: true
force_match_for_each_row: true
}
}
similarity_calculator {
iou_similarity {
}
}
anchor_generator {
ssd_anchor_generator {
num_layers: 6
min_scale: 0.2
max_scale: 0.95
aspect_ratios: 1.0
aspect_ratios: 2.0
aspect_ratios: 0.5
aspect_ratios: …Run Code Online (Sandbox Code Playgroud) object-detection deep-learning tensorflow tensorboard object-detection-api
我无法从链接下载模型文件 下载 API 响应为 206。我不确定是否只有我面临这个问题还是每个人都面临这个问题?
还有其他替代方法来下载该文件吗?
如何使用Google的Object Detection API的推理脚本获取生成的边界框的坐标?我知道打印框[0] [i]返回图像中第i个检测的预测但这些返回数字的含义究竟是什么?有没有办法可以得到xmin,ymin,xmax,ymax?提前致谢.
我正在尝试检测不同形状的图像(不是正方形)中的物体。我使用了faster_rcnn_inception_v2模型,并且可以使用图像缩放器来保持图像的纵横比,并且输出令人满意。
image_resizer {
keep_aspect_ratio_resizer {
min_dimension: 100
max_dimension: 600
}
}
Run Code Online (Sandbox Code Playgroud)
现在,为了提高性能,我想使用ssd_inception_v2或ssd_inception_v2模型进行训练。的示例配置的用途固定形状调整大小如下,
image_resizer {
fixed_shape_resizer {
height: 300
width: 300
}
}
Run Code Online (Sandbox Code Playgroud)
但是问题是由于固定的调整大小,我得到的检测结果很差。我尝试将它更改为keep_aspect_ratio_resizer,如先前在fast_rcnn_inception_v2中所述。我收到以下错误,
InvalidArgumentError(请参见上面的回溯):ConcatOp:输入的尺寸应匹配:shape [0] = [1,100,500,3] vs. shape 1 = [1,100,439,3]
如何在SSD模型中进行配置,以调整图像大小并保持宽高比?
我想同时在我自己的数据集上训练/评估ssd_mobile_v1_coco Object Detection API.
但是,当我只是尝试这样做时,我面临的GPU内存几乎已满,因此评估脚本无法启动.以下是我用于训练和评估的命令:
在一个终端窗格中调用训练脚本,如下所示:
python3 train.py \
--logtostderr \
--train_dir=training_ssd_mobile_caltech \
--pipeline_config_path=ssd_mobilenet_v1_coco_2017_11_17/ssd_mobilenet_v1_focal_loss_coco.config
Run Code Online (Sandbox Code Playgroud)
运行正常,培训工作......然后我尝试在第二个终端窗格中运行评估脚本:
python3 eval.py \
--logtostderr \
--checkpoint_dir=training_ssd_mobile_caltech \
--eval_dir=eval_caltech \
--pipeline_config_path=ssd_mobilenet_v1_coco_2017_11_17/ssd_mobilenet_v1_focal_loss_coco.config
Run Code Online (Sandbox Code Playgroud)
它失败并出现以下错误:
python3 eval.py \
--logtostderr \
--checkpoint_dir=training_ssd_mobile_caltech \
--eval_dir=eval_caltech \
--pipeline_config_path=ssd_mobilenet_v1_coco_2017_11_17/ssd_mobilenet_v1_focal_loss_coco.config
INFO:tensorflow:depth of additional conv before box predictor: 0
INFO:tensorflow:depth of additional conv before box predictor: 0
INFO:tensorflow:depth of additional conv before box predictor: 0
INFO:tensorflow:depth of additional conv before box predictor: 0
INFO:tensorflow:depth of additional conv before box predictor: 0
INFO:tensorflow:depth of additional …Run Code Online (Sandbox Code Playgroud) machine-learning object-detection deep-learning tensorflow object-detection-api
我试图训练一个模型来检查图像,识别指定的对象并告诉我其模型(我什至不需要看到对象周围的正方形)。
为此,我使用Tensorflow的对象检测,而我所做的大部分事情都是在看本教程:
如何在Windows 10上使用TensorFlow(GPU)训练多个对象的对象检测分类器
但是某些事情发生了变化,可能是由于更新,然后我不得不自己做一些事情。我实际上可以训练模型(我想),但是我不理解评估结果。我过去经常看到损耗和电流阶跃,但是这个输出对我来说并不常见。另外,我认为培训没有保存下来。
model_main.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_coco.config
Run Code Online (Sandbox Code Playgroud)
model {
faster_rcnn {
num_classes: 9
image_resizer {
keep_aspect_ratio_resizer {
min_dimension: 600
max_dimension: 1024
}
}
feature_extractor {
type: 'faster_rcnn_inception_v2'
first_stage_features_stride: 16
}
first_stage_anchor_generator {
grid_anchor_generator {
scales: [0.25, 0.5, 1.0, 2.0]
aspect_ratios: [0.5, 1.0, 2.0]
height_stride: 16
width_stride: 16
}
}
first_stage_box_predictor_conv_hyperparams {
op: CONV
regularizer {
l2_regularizer {
weight: 0.0
}
}
initializer {
truncated_normal_initializer {
stddev: 0.01
}
}
}
first_stage_nms_score_threshold: 0.0
first_stage_nms_iou_threshold: 0.7
first_stage_max_proposals: 300 …Run Code Online (Sandbox Code Playgroud) 我用 Tensorflow 对象检测 API 训练了一个 Faster R-CNN 模型,但遇到了一个奇怪的问题。尽管图像中有更多的对象,但模型的输出最多有 100 个预测。这是我测试过的每个图像的情况。
我在 10 个 GitHub 上发现了类似的问题,但据我所知,他们在这些方面做得并不多。 https://github.com/tensorflow/tensorflow/issues/30464
也许您过去遇到过类似的问题?知道如何解决这个问题吗?