如何结合两个冻结模型(Tensorflow)进行物体检测?

How to combine two frozen models (Tensorflow) for object detection?

我正在尝试结合两个冻结模型(protobuffs)进行对象检测。问题是其中一个模型是我自己的数据集,另一个是 coco 数据集的预建模型(只包含更多 类 到数据集本身)。 这可能吗?还是有更好的方法来执行此操作?由于从头开始训练所有 类 可能需要数周时间。 提前感谢您的帮助。

The issue is one of the models is my own dataset and the other is the prebuilt model for coco dataset (just include more classes to the dataset itself). Is this possible?

当然有可能。但是你需要再次训练模型。当您像这样使用数据训练模型时,

python object_detection/train.py \
    --logtostderr \
    --pipeline_config_path=${PATH_TO_YOUR_PIPELINE_CONFIG} \
    --train_dir=${PATH_TO_TRAIN_DIR}

这里的${PATH_TO_YOUR_PIPELINE_CONFIG}是你的配置文件,你需要指定pre-trained model path如下,

fine_tune_checkpoint: "PATH_TO_BE_CONFIGURED/model.ckpt"

这样做将有助于您的训练更快地收敛,因为现在您的网络将从 coco 数据集的训练权重开始,而不是从头开始。

您需要从 here 下载您要使用的 coco 模型。然后在上面演示的配置文件上指定模型文件路径。