def create_cls(img_path,ae_path,out_path):
    img_frame=images.read_image_frame(img_path)
    n_cats=data.get_n_cats(img_frame)
    print(n_cats)
    cls=comp.create_extractor(n_cats,ae_path)
    #cls=nn.built_nn_cls(n_cats)
    cls=deep.learning_iter(img_frame,cls,n_epochs=1000)
    utils.save_object(cls.get_model(),out_path)
    return cls
Exemplo n.º 2
0
def create_cls(in_path,ae_path,out_path):
    imgs=data.read_image_frame(in_path)
    X=imgs['Images'].tolist()
    y=imgs['Category'].tolist()
    n_cats=max(y)+1
    cls=comp.create_extractor(n_cats,ae_path)
    deep.learning_iter_super(cls,X,y,n_epochs=1000)
    utils.save_object(cls.get_model(),out_path) 
    return cls