Skip to content

Instantly share code, notes, and snippets.

View saghiralfasly's full-sized avatar

Saghir Alfasly saghiralfasly

View GitHub Profile
@saghiralfasly
saghiralfasly / dataset_to_tfrecord.py
Last active April 29, 2022 06:16
Python script to create tfrecords from pascal VOC data set format (one class detection) for Object Detection API Tensorflow, where it divides dataset into (90% train.record and 10% test.record)
import os
import io
import glob
import hashlib
import pandas as pd
import xml.etree.ElementTree as ET
import tensorflow as tf
import random
from PIL import Image