'how to run create coco tf record from code object detection API TF
It's a silly question but I've been struggling with it for way too long now..
I'm using the object detection API
from tensorflow
.
when I run my script as below I only get outputs names -00000-of-00001
and none as .records
.
train_tf_records = _create_tf_record_from_coco_annotations(train_annotations_file, train_image_dir, train_output_path, include_masks=True, num_shards=1)
test_tf_records = _create_tf_record_from_coco_annotations(test_annotations_file, test_image_dir, testdev_output_path, include_masks=True, num_shards=1)
val_tf_records = _create_tf_record_from_coco_annotations(val_annotations_file, val_image_dir, val_output_path, include_masks=True, num_shards=1)
different to when I use the terminal to run it as:
!python /content/models/research/object_detection/dataset_tools/create_coco_tf_record.py \
--logtostderr \
--train_image_dir="/content/train/images/" \
--val_image_dir="/content/valid/images/" \
--test_image_dir="/content/test/images/" \
--train_annotations_file="/content/train/annotations/train.json/" \
--val_annotations_file="/content/valid/annotations/valid.json/" \
--testdev_annotations_file="/content/test/annotations/test.json/" \
--output_dir="/content/./"
then I get my outputs as .record
Someone can explain it to me? Thanks a lot!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|