[英]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.
我有以下问题。
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.