Skip to content

Latest commit

 

History

History
34 lines (27 loc) · 552 Bytes

README.md

File metadata and controls

34 lines (27 loc) · 552 Bytes

Image classifier

Image classifier based on pytorch.

Prerequisites

Folder structure

Expected folder structure of the images:

  • image-folder/
    • test/
      • cat1/
      • cat2/
      • cat3/
    • valid/
      • cat1/
      • cat2/
      • cat3/

Category .json

{"cat1": "Foo Bar", "cat2": "John Doe"}

Train

python train.py ./image-folder

Predict

python train.py ./path-to-image/image.jpg ./path-to-trainer-checkpoint/model.pth ./path-to-category-json/cat.json