Commit 1a66f013 authored by novelailab's avatar novelailab

more properties

parent 4577aa6f
......@@ -121,6 +121,24 @@ class ImageDatasetBuilder():
def is_close(self):
self.dataset is None or self.index is None
@property
def biggest_id(self):
if self.index is None:
return -1
else:
return np.max(self.index[:, 2])
@property
def biggest_item(self):
if self.index is None:
return -1
else:
return np.max(self.index[:, 1])
@property
def np_index(self):
return np.array(self.index)
def build(self):
#be careful with not nuking the files if they exist
if self.is_open:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment