Giter VIP home page Giter VIP logo

vrdl-homework1's Introduction

VRDL-Homework1

Requirements

The following packages are used in this homework

numpy==1.19.3
torch==1.9.0+cu111
torchvision==0.10.0+cu111

Folder structure

.
├──dataset
   ├──Testing
      ├──XXXX.jpg
   ├──Training
      ├──XXXX.jpg
   ├──classes.txt           # contain 200 bird species and it's number (e.g. 001.Black_footed_Albatross)
   ├──training_labels.txt   # filename and label mapping (e.g. 4283.jpg 115.Brewer_Sparrow)
   ├──testing.txt           # test filename (e.g. 4282.jpg)
   ├──fold{i}.txt           # we split training data into 5 fold (i=1,2,3,4,5)
├──functions                # functions inside
├──saved_model              # trained model weights
├──split_folds.py           # split training dataset into 5 folds (fold{i}.txt)
├──train.py
├──inference.py
└──README.md

Training code

If you want to change the hyper-parameter, modify a few lines (line 18 to 29) of content in train.py
Note: FoldID = i indicates that the training dataset in fold{i}.txt will be the validation dataset
To run this code, use the following command

python train.py

Pre-trained model

After running train.py, the model weight with the highest accuracy in that FoldID will be saved in saved_model
The format of the file name is fold=X_ep=YY_acc=0.ZZZZ.pth

Inference code

inference.py will catch the model weight in saved_model automatically. To reproduce the testing result, run

python inference.py

vrdl-homework1's People

Contributors

k-t-ng avatar

Stargazers

Yi-Cheng Hung avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.