简体   繁体   English

TFLite model maker 自定义 object 检测器训练使用 tfrecord

[英]TFLite model maker custom object detector training using tfrecord

I am trying to train a custom object detector using tflite model maker ( https://www.tensorflow.org/lite/tutorials/model_maker_object_detection ). I am trying to train a custom object detector using tflite model maker ( https://www.tensorflow.org/lite/tutorials/model_maker_object_detection ). I want to deploy trained tflite model to coral edgeTPU.我想将训练有素的 tflite model 部署到珊瑚 edgeTPU。 I want to use tensorflow tfrecord (multiple) as input for training a model like object detection API.我想使用 tensorflow tfrecord(多个)作为训练 model 的输入,例如 object 检测 ZDB974278714CA8ACE3634。 I tried with tflite_model_maker.object_detector.DataLoader( tfrecord_file_patten, size, label_map, annotations_json_file=None ) but I am not able to work around it.我尝试使用tflite_model_maker.object_detector.DataLoader( tfrecord_file_patten, size, label_map, annotations_json_file=None )但我无法解决它。 I have following questions.我有以下问题。

  • Is it possible to tfrecord for training like mentioned above?是否可以像上面提到的那样对培训进行 tfrecord 记录?
  • Is it also possible to pass multiple CSV files for training?是否也可以通过多个 CSV 文件进行训练?

For multiple CSV files, you could probably just append one file to the other.对于多个 CSV 文件,您可能只是 append 一个文件到另一个文件。 Then you'd just have to pass one csv file.然后你只需要传递一个 csv 文件。

As for passing a tfrecord instead, this should be possible.至于传递一个 tfrecord ,这应该是可能的。 I'm also attempting to do this, so if I get it working I'll update my post.我也在尝试这样做,所以如果我能正常工作,我会更新我的帖子。 Looking at the source , it seems from_cache is the function internally used.源码,看来from_cache是内部使用的function。 Following that structure, should be able to create a DataLoader object similarly:按照该结构,应该能够类似地创建 DataLoader object:

DataLoader(tfrecord_file_patten, meta_data['size'],
                      meta_data['label_map'], ann_json_file)

Just taking a quick look at from_csv , I noticed that it returns a list called data , which seems to append potentially multiple DataLoader objects.快速浏览一下from_csv ,我注意到它返回了一个名为data的列表,在 append 看来,这可能是多个DataLoader对象。 So if creating the DataLoader didn't work, perhaps try just wrapping it in a list, like tfrecord_dl = [DataLoader(tfrecord_file_patten, meta_data['size'], meta_data['label_map'], ann_json_file)] .因此,如果创建DataLoader不起作用,也许尝试将其包装在一个列表中,例如tfrecord_dl = [DataLoader(tfrecord_file_patten, meta_data['size'], meta_data['label_map'], ann_json_file)]

I haven't tried it yet though so these are just my initial thoughts.虽然我还没有尝试过,所以这些只是我最初的想法。 If you share what you tried we can take a closer look at what actually went wrong.如果您分享您尝试过的内容,我们可以仔细查看实际出了什么问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 tflite model maker 上使用 mnist 数据集 - Using mnist dataset on tflite model maker 使用 TensorFlow 进行目标检测器训练 - Object Detector Training using TensorFlow Tensorflow 自定义 Object 检测器:model_main_tf2 未开始训练 - Tensorflow custom Object Detector: model_main_tf2 doesn't start training mac 上安装 tflite-model-maker 失败 - Installation of tflite-model-maker on mac fails 无法使用 tflite object 检测 model 推断结果 - Unable to infer results using tflite object detection model 使用Tensorflow的对象检测API用我自己的数据集训练对象检测器时出错 - Error while training an object detector with my own dataset using Tensorflow's Object Detection API 如何使用 object_detector.EfficientDetLite4Spec tensorflow lite 继续使用检查点进行训练 - How to continue training with checkpoints using object_detector.EfficientDetLite4Spec tensorflow lite Tensorflow可以混洗多个分片的TFrecord二进制文件以进行对象检测训练吗? - Can Tensorflow shuffle multiple sharded TFrecord binaries for object detection training? tflite-model-maker 自定义数据集 (pascal voc) 问题 - ValueError: The size of the train_data (0) could not be less than the batch_size (1) - tflite-model-maker custom dataset (pascal voc) problem - ValueError: The size of the train_data (0) couldn't be smaller than the batch_size (1) 使用 Tensorflow Lite Model Maker 训练图像分类 Model 时出现问题 - Issue with training an Image Classification Model with Tensorflow Lite Model Maker
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM