#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import os import numpy as np import matplotlib.pyplot as plt import utils.tfrecord_voc_utils as voc_utils # os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' os.environ['CUDA_VISIBLE_DEVICES'] = '0' output_path='D:/install/RetinaNet/RetinaNet-tensorflow/data/' Annotations='E:/image/libin_dataset/RetinaNet/VOC/Annotations/' JPEGImages='E:/image/libin_dataset/RetinaNet/VOC/JPEGImages/' if os.path.exists(Annotations)==False: os.makedirs() if os.path.exists(Annotations)==False: os.makedirs(JPEGImages) tfrecord = voc_utils.dataset2tfrecord(Annotations, JPEGImages, output_path, 'test',2) print(tfrecord)
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import os import numpy as np import matplotlib.pyplot as plt import utils.tfrecord_voc_utils as voc_utils # os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' # os.environ['CUDA_VISIBLE_DEVICES'] = '0' # annotations path, image path, save path, tfrecord prefix, shard xml_address = 'D:/Object-Detection-API-Tensorflow-master/VOC2007/AnnotationsSSD/' image_address = 'D:/Object-Detection-API-Tensorflow-master/VOC2007/JPEGImages/' save_address = 'D:/Object-Detection-API-Tensorflow-master/VOC2007/ImageSets/' tfrecord = voc_utils.dataset2tfrecord(xml_address, image_address, save_address, 'train', 40) print(tfrecord)
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import os import numpy as np import matplotlib.pyplot as plt import utils.tfrecord_voc_utils as voc_utils os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' os.environ['CUDA_VISIBLE_DEVICES'] = '0' tfrecord = voc_utils.dataset2tfrecord('../VOC/Annotations', '../VOC/JPEGImages', '../data/', 'test', 10) print(tfrecord)
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import utils.tfrecord_voc_utils as voc_utils # annotations path, image path, save path, tfrecord prefix, shard annotations_path = os.path.join(os.getcwd(), '..', 'voc2007', 'Annotation') JpegImages_path = os.path.join(os.getcwd(), '..', 'voc2007', 'JPEGImage') tfrecord = voc_utils.dataset2tfrecord(annotations_path, JpegImages_path, '../data1/', 'train', 1) print(tfrecord)
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import os import numpy as np import matplotlib.pyplot as plt import utils.tfrecord_voc_utils as voc_utils os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' os.environ['CUDA_VISIBLE_DEVICES'] = '0' tfrecord = voc_utils.dataset2tfrecord('VOC/VOCdevkit/VOC2007/Annotations', 'VOC/VOCdevkit/VOC2007/JPEGImages', 'data/', 'test', 10) print(tfrecord)