Module Expr Str ImportFrom alias Import alias ImportFrom alias Import alias Import alias Import alias identifier Import alias Assign NameStore Num Assign NameStore Num FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore NameLoad If CompareIs NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore ListLoad TupleLoad Str Num Num NameLoad TupleLoad Str Num Num NameLoad TupleLoad Str Num Num NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr TupleLoad Str Num Num BinOpDiv NameLoad Num For TupleStore NameStore NameStore NameStore NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Num Num NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign NameStore ListLoad Num Num Num Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore Call NameLoad NameLoad TupleLoad Num Num Num NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpAdd Call NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore ListComp Call AttributeLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad NameLoad attr Str comprehension NameStore Call NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr TupleLoad Num NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword NameLoad keyword Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Print BinOpMod Str SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call NameLoad SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str Print BinOpMod Str TupleLoad BinOpSub Call AttributeLoad NameLoad attr NameLoad
N/A N/A 
Functions for creating temporary datasets
Used in test_views
 __future__ absolute_import N/A argparse collections defaultdict N/A os N/A time N/A numpy np N/A PIL.Image N/A IMAGE_SIZE 10 N/A IMAGE_COUNT 10 create_classification_imageset N/A N/A folder image_size image_count add_unbalanced_category N/A None None False N/A N/A 
    Creates a folder of folders of images for classification

    If requested to add an unbalanced category then a category is added with
    half the number of samples of other categories
     N/A N/A image_size None N/A N/A image_size IMAGE_SIZE N/A N/A image_count None N/A N/A image_count IMAGE_COUNT N/A paths N/A defaultdict list N/A config N/A N/A red-to-right 0 0 image_count N/A green-to-top 1 90 image_count N/A blue-to-left 2 180 image_count N/A add_unbalanced_category N/A N/A N/A N/A config append N/A blue-to-bottom 2 270 N/A image_count 2 N/A N/A class_name pixel_index rotation image_count config N/A N/A N/A N/A os makedirs N/A N/A N/A os path join folder class_name N/A colors N/A N/A np linspace 200 255 image_count N/A N/A i color N/A enumerate colors N/A N/A pixel N/A 0 0 0 N/A N/A pixel N/A pixel_index color N/A pil_img N/A _create_gradient_image image_size N/A 0 0 0 pixel rotation N/A img_path N/A N/A N/A os path join class_name N/A N/A str i .png N/A N/A N/A pil_img save N/A N/A N/A os path join folder img_path N/A N/A N/A N/A paths N/A class_name append img_path N/A paths N/A _create_gradient_image N/A N/A size color_from color_to rotation N/A N/A N/A 
    Make an image with a color gradient with a specific rotation
     N/A rgb_arrays N/A N/A N/A N/A N/A np linspace N/A color_from N/A x N/A color_to N/A x size astype uint8 N/A x N/A range 3 N/A gradient N/A N/A np concatenate rgb_arrays N/A picture N/A N/A np repeat gradient size N/A N/A picture shape N/A 3 size size N/A image N/A N/A N/A PIL Image fromarray N/A picture T N/A image N/A N/A image rotate rotation N/A image N/A N/A N/A __name__ __main__ N/A N/A parser N/A N/A argparse ArgumentParser description Create-Imageset tool - DIGITS N/A N/A N/A parser add_argument folder help Where to save the images N/A N/A N/A parser add_argument -s --image_size type int help Size of the images N/A N/A N/A parser add_argument -c --image_count type int help How many images N/A args N/A vars N/A N/A parser parse_args N/A N/A Creating images at "%s" ... N/A args N/A folder N/A start_time N/A N/A time time N/A N/A create_classification_imageset N/A args N/A folder image_size N/A args N/A image_size image_count N/A args N/A image_count N/A N/A Done after %s seconds N/A N/A N/A N/A time time start_time