Module vipy.data.objectnet
Expand source code Browse git
import os
import vipy
URL = 'https://objectnet.dev/downloads/objectnet-1.0.zip'
class Objectnet(vipy.dataset.Dataset):
"""Project: https://objectnet.dev, password set on website, must be bytes encoded (e.g. passwd=b'thepassword')"""
def __init__(self, datadir, passwd=None, url=URL, name='objectnet'):
self._datadir = vipy.util.remkdir(datadir)
if not os.path.exists(os.path.join(self._datadir, vipy.util.filetail(url))):
vipy.downloader.download_and_unpack(url, self._datadir, md5=None, passwd=passwd)
imlist = [vipy.image.ImageCategory(filename=f, category=vipy.util.filebase(vipy.util.filepath(f))) for f in vipy.util.findimages(os.path.join(datadir, vipy.util.filebase(url)))]
super().__init__(imlist, id=name)
Classes
class Objectnet (datadir, passwd=None, url='https://objectnet.dev/downloads/objectnet-1.0.zip', name='objectnet')
-
Project: https://objectnet.dev, password set on website, must be bytes encoded (e.g. passwd=b'thepassword')
Expand source code Browse git
class Objectnet(vipy.dataset.Dataset): """Project: https://objectnet.dev, password set on website, must be bytes encoded (e.g. passwd=b'thepassword')""" def __init__(self, datadir, passwd=None, url=URL, name='objectnet'): self._datadir = vipy.util.remkdir(datadir) if not os.path.exists(os.path.join(self._datadir, vipy.util.filetail(url))): vipy.downloader.download_and_unpack(url, self._datadir, md5=None, passwd=passwd) imlist = [vipy.image.ImageCategory(filename=f, category=vipy.util.filebase(vipy.util.filepath(f))) for f in vipy.util.findimages(os.path.join(datadir, vipy.util.filebase(url)))] super().__init__(imlist, id=name)
Ancestors
Inherited members
Dataset
:archive
categories
chunk
class_to_index
classes
classlist
clone
count
countby
density
duration_in_seconds
filter
flatten
id
index_to_class
inverse_frequency_weight
istype
jsondir
label_to_index
list
load
map
merge
minibatch
multilabel_inverse_frequency_weight
num_categories
num_classes
num_labels
percentage
replace
save
set
shuffle
shuffler
sort
split
split_by_videoid
synonym
take
take_per_category
takefilter
takelist
takeone
to_torch
to_torch_tensordir
tohtml
tojsondir
tolist
video_duration_in_seconds
video_montage
zip