UNPKG

image-classifier-ts

Version:

Command line tool to auto-classify images, renaming them with appropriate labels. Uses Node and Google Vision API.

28 lines (27 loc) 882 B
import { ImageProperties } from "./model/ImageProperties"; import { Args } from "./utils/args/Args"; import { IOutputter } from "./utils/output/IOutputter"; declare type ImagePropertiesAndResultsByPhase = { imageProperties: ImageProperties[]; resultsByPhase: ResultsByPhase; }; export declare namespace DirectoryProcessor { type ProcessResult = ImagePropertiesAndResultsByPhase & { isOk: boolean; }; function processDirectory(args: Args, outputter: IOutputter): Promise<ProcessResult>; } declare enum Phase { GeoCode = 0, ClassifyAndMove = 1 } export declare type ResultsByPhase = Map<Phase, ProcessResultForPhase>; declare type ProcessResultForPhase = { imageProperties: ImageProperties[]; imagesProcessedOk: number; }; export declare type ClassifyImageResult = { wasMoved: boolean; imageProperty: ImageProperties; }; export {};