The autoreload extension is already loaded. To reload it, use:
%reload_ext autoreload
The autoreload extension is already loaded. To reload it, use:
%reload_ext autoreload
aiking_cfg ()
Config
object for fastai’s config.ini
aiking_path (folder)
Path to folder
in aiking_cfg
URLs ()
Global constants for dataset and model URLs.
This is going to be a helper class for downloading Kaggle dataset in required structure
KAGGLEs ()
Initialize self. See help(type(self)) for accurate signature.
download_kaggle2 (url, dest, overwrite=False)
Download url
to dest
unless it exists and not overwrite
download_kaggle (url, dest, overwrite=False)
Download url
to dest
unless it exists and not overwrite
unzip_file (dest, arch_path)
untar_data (url, archive=None, data=None, c_key='data', force_download=False)
Download url
to fname
if dest
doesn’t exist, and extract to folder dest
Type | Default | Details | |
---|---|---|---|
url | |||
archive | NoneType | None | |
data | NoneType | None | |
c_key | str | data | |
force_download | bool | False | , extract_func=file_extract, timeout=4): |
list_checked_data ()
Remote api configured by me for
search_images_middleman (key, max_n=150)
# bad_images = verify_images(get_image_files(dest))
# # bad_images = result_L.attrgot('image').map(lambda url: Path(url).name)
# result_L.filter(lambda a: Path(a['image']).name not in bad_images)
# result_L.attrgot('image').map(lambda url: Path(url).name)
# print(bad_images)
# pd.DataFrame(result_L)
search_images_ddg (key, max_n=150)
search_images_bing (key, term, min_sz=128, max_images=150)
add_search_term (row, srch_term)
get_clsdict (clstypes, prefixes=None, sep=' ')
get_search_terms (o, prefixes=None, sep=' ')
drop_duplicates_L (results, subset=['image'])
construct_image_dataset (clsdots, dest, key=None, loc=None, count=150, engine='middleman', image_fname='image.csv', prefixes=None, sep=' ')
Type | Default | Details | |
---|---|---|---|
clsdots | dict or list | ||
dest | |||
key | NoneType | None | |
loc | NoneType | None | |
count | int | 150 | |
engine | str | middleman | |
image_fname | str | image.csv | |
prefixes | NoneType | None | |
sep | str |
data_frm_datasette (dsname, datasette_base_url, data_dir='~/.aiking/data', table='image', url_col='image', index_col=0, get_fname=<function get_fname>, label_col='label')
get_label (url, df)
get_fname (url, df)
list_ds (loc=None)
get_ds (name, loc=None)
push_ds (url, dsname, name=None, subfolder='.')
Download url
to dsname
dataset as name
. Creates dsname
if doesnot exists