Skip to content

Commit

Permalink
move Annotation out from GetAnnFromXml
Browse files Browse the repository at this point in the history
  • Loading branch information
brian220 committed Aug 15, 2018
1 parent 940a3f2 commit 52991bc
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 17 deletions.
20 changes: 20 additions & 0 deletions Annotation.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"""
Define the basic data structure of the annotation
"""
class Annotation(object):
def __init__(self):
self.name = " "
self.type = " "
self.index = 0
self.partOfGroup = " "
self.coordinateX = []
self.coordinateY = []
self.xMin = 0
self.xMax = 0
self.yMin = 0
self.yMax = 0

# Use for record which patch is in the annotation
self.patchInAnn = {}
# patch size
self.patchSize = 50
20 changes: 3 additions & 17 deletions GetAnnFromXml.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,12 @@
"""
This program is used for read an annotation xml File and store in class Annotation
"""
import sys
sys.path.append("../Annotation")
from Annotation import Annotation
import xml.etree.cElementTree as ET
import os.path
import math
class Annotation(object):
def __init__(self):
self.name = " "
self.type = " "
self.index = 0
self.partOfGroup = " "
self.coordinateX = []
self.coordinateY = []
self.xMin = 0
self.xMax = 0
self.yMin = 0
self.yMax = 0

# Use for record which patch is in the annotation
self.patchInAnn = {}
# patch size
self.patchSize = 50

class GetAnnFromXml(object):
def __init__(self, fileName):
Expand Down

0 comments on commit 52991bc

Please sign in to comment.