Giter Site home page Giter Site logo

yolov1_tensorflow2's Introduction

YOLOv1 Implementation with Tensorflow2

Introduction

  • This repository is implementation code with tensorflow2

Difference from Original Paper

  • Using Xception as Backbone network(to get pre-trained weight)
  • Following train strategy from this code (Batch size, num_epoch, augmentation...)

Requirement

python == 3.8
tensorflow == 2.8.0
opencv-python == 4.5.5
albumentations == 1.2.1

Dataset

  • Using PASCAL VOC 2007, PASCAL VOC 2012
  • For train, using PASCAL VOC 2007 trainval, PASCAL VOC 2012 trainval
  • For validation, using PASCAL VOC 2007 test
  • For test, using PASCAL VOC 2012 test
  • Dataset dir structure
    $root/
    ├── VOC2007
    |   ├── Annotations
    |   ├── ImageSets
    |   └── JPEGImages
    ├── VOC2007_test
    ├── VOC2012
    └── VOC2012_test
    
  • Make Dataset
    python make_dataset.py --dataset_root --save_dir
    
    args
    --dataset_root : VOC dataset files root directory path
    --save_dir : saved tffrecords files directory
    
  • After run
    $save_dir/
    ├── trainval_2007.tfrecord
    ├── trainval_2012.tfrecord
    └── test_2007.tfrecord
    

Train

  • Run
    python train.py --img_size --dataset_dir --s --num_class --num_epoch --batch_size
    
    args
    --img_size : model input size
    --dataset_dir : tfrecord file directory
    --s : output grid number (s X s)
    --num_class : the number of class
    --num_epoch : the number of epoch
    --batch_size : Batch size
    
  • After run
    • model weights saved at ckpt dir
      yolo_final : saved after all epoch
      yolo_valid_best : saved at lowest valid loss
      $ckpt/
      ├── yolo_final.index
      ├── yolo_final.data-00000-of-00001
      ├── yolo_valid_best.index
      └── yolo_valid_best.data-00000-of-00001
      
    • model asset saved at model_asset dir
      $model_asset/
      ├── yolo_final
      └── yolo_valid_best
      

Test

  • Inference
    python test.py --model_asset --images_dir
    
    args
    --model_asset : model asset dir path
    --images_dir : test image dir
    
  • After run
    Inference result saved at infer dir

Result

  • Train Train Result
  • Validation Validation Result
  • Test Test Result

Reference

[1] You Only Look Once: Unified, Real-Time Object Detection. Joseph Redmon, Santosh Divvala, Ross Girshick, Ali Farhadi
[2] devbruce / yolov1-tf2

yolov1_tensorflow2's People

Contributors

kwjinwoo 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.