Giter Club home page Giter Club logo

fire-frd-cnn's Introduction

A tensorflow implementation of fire-FRD-CNN network.

To training the model, the prerequisites are:

  1. python 2.7
  2. easydict
  3. joblib
  4. numpy
  5. opencv-python
  6. Pillow
  7. tensorflow-gpu

Please follow the belowing steps to training the model.

  • Download KITTI object detection dataset. Put them under $fire-FRD-CNN_ROOT/data/KITTI/. Unzip them, then you will get two directories: $fire-FRD-CNN_ROOT/data/KITTI/training/ and $fire-FRD-CNN_ROOT/data/KITTI/testing/.

  • Now we need to split the training data into a training set and a vlidation set.

    cd $fire-FRD-CNN_ROOT/data/KITTI/
    mkdir ImageSets
    cd ./ImageSets
    ls ../training/image_2/ | grep ".png" | sed s/.png// > trainval.txt

    trainval.txt contains indices to all the images in the training data. In our experiments, we randomly split half of indices in trainval.txt into train.txt to form a training set and rest of them into val.txt to form a validation set. For your convenience, we provide a script to split the train-val set automatically. Simply run

    cd $fire-FRD-CNN_ROOT/data/
    python random_split_train_val.py

    then you should get the train.txt and val.txt under $fire-FRD-CNN_ROOT/data/KITTI/ImageSets.

    When above two steps are finished, the structure of $fire-FRD-CNN_ROOT/data/KITTI/ should at least contain:

    $SQDT_ROOT/data/KITTI/
                      |->training/
                      |     |-> image_2/00****.png
                      |     L-> label_2/00****.txt
                      |->testing/
                      |     L-> image_2/00****.png
                      L->ImageSets/
                            |-> trainval.txt
                            |-> train.txt
                            L-> val.txt
  • Next, download the CNN model pretrained for ImageNet classification:

    cd $fire-FRD-CNN_ROOT/data/
    # SqueezeNet
    wget https://www.dropbox.com/s/fzvtkc42hu3xw47/SqueezeNet.tgz
    tar -xzvf SqueezeNet.tgz
    
  • Now we can start training. Training script can be found in $fire-FRD-CNN_ROOT/scripts/train.sh, which contains commands to train the model: fire-FRD-CNN

    cd $fire-FRD-CNN_ROOT/
    ./scripts/train.sh -net fire-FRD-CNN -train_dir /home/scott/logs/fire-FRD-CNN -gpu 0

    Training logs are saved to the directory specified by -train_dir. GPU id is specified by -gpu. Network to train is specificed by -net

  • Before evaluation, you need to first compile the official evaluation script of KITTI dataset

    cd $fire-FRD-CNN/src/dataset/kitti-eval
    make
  • Then, you can launch the evaluation script (in parallel with training) by

    cd $fire-FRD-CNN/
    ./scripts/eval.sh -net fire-FRD-CNN -eval_dir /home/scott/logs/fire-FRD-CNN -image_set (train|val) -gpu 1

fire-frd-cnn's People

Contributors

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