Skip to content

Instantly share code, notes, and snippets.

View ArunAniyan's full-sized avatar

Arun Aniyan ArunAniyan

View GitHub Profile
@alpercalisir
alpercalisir / xmlAnnotation.py
Created November 24, 2018 13:58
Creates PASCAL VOC formatted XML given a csv file
import pandas as pd
import numpy as np
from lxml import etree
import xmlAnnotation.etree.cElementTree as ET
fields = ['NAME_ID', 'XMIN', 'YMIN', 'W', 'H', 'XMAX', 'YMAX']
df = pd.read_csv('loose_bb_test.csv', usecols=fields)
# Change the name of the file.