Code Monkey home page Code Monkey logo

cv's Introduction

CV

This repository contains all of our code for DSAI | K64 | HUST | Computer Vision project.

Dataset

To download the dataset, run this code:

wget http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCtrainval_11-May-2012.tar
tar -xf VOCtrainval_11-May-2012.tar
mkdir PascalVOC12
mv VOCdevkit/VOC2012/* PascalVOC12
cd PascalVOC12
wget http://cs.jhu.edu/~cxliu/data/SegmentationClassAug.zip
wget http://cs.jhu.edu/~cxliu/data/SegmentationClassAug_Visualization.zip
wget http://cs.jhu.edu/~cxliu/data/list.zip
unzip SegmentationClassAug.zip
unzip SegmentationClassAug_Visualization.zip
unzip list.zip
mv list splits

Refactor the dataroot as follow:

data_root/
    --- VOC2012/
        --- Annotations/
        --- ImageSet/
        --- JPEGImages/
        --- SegmentationClassAug/
        --- saliency_map/
    --- ADEChallengeData2016
        --- annotations
            --- training
            --- validation
        --- images
            --- training
            --- validation

Download SegmentationClassAug and saliency_map

Perform Training

Check the demo for a intuitive guideline. In particular, run the command:

python main.py --data_root ${DATA_ROOT} --approach ${APPROACH} --model deeplabv3_resnet101 --gpu_id 0,1 --crop_val --lr ${LR} --batch_size ${BATCH} --train_epoch ${EPOCH} --loss_type ${LOSS} --dataset ${DATASET} --task ${TASK} --overlap --lr_policy poly --pseudo --pseudo_thresh ${THRESH} --freeze --bn_freeze --unknown --w_transfer --amp --mem_size ${MEMORY}

To perform the original version (network frozen version), run this command:

$ python main.py --data_root [your data root] --approach css --model deeplabv3_resnet101 --gpu_id 0,1 --crop_val --lr 0.01 --batch_size 16 --train_epoch 50 --loss_type bce_loss --dataset voc --task 5-5 --overlap --lr_policy poly --pseudo --pseudo_thresh 0.7 --freeze --bn_freeze --unknown --w_transfer --amp --mem_size 100 --val_interval 100

To perform the variant version (network masking using hard attention), run this command:

$ python main.py --data_root [your data root] --approach hat_ss --model deeplabv3_resnet101 --overlap --gpu_id 0,1 --crop_val --lr 0.01 --bb_lr 0.0001 --batch_size 16 --train_epoch 50 --loss_type bce_loss --dataset voc --task 2-1 --lr_policy poly --pseudo --pseudo_thresh 0.7 --freeze --bn_freeze --unknown --w_transfer --amp --mem_size 100 --val_interval 100 --lamb 1

Acknowledgement

Our implementation is based on clovaai/SSUL, k-gyuhak/CLOM.

cv's People

Contributors

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