Coder Social home page Coder Social logo

zac-2022's Introduction

Zalo AI Challenge 2022 - Liveness Detection - 1st place solution

1. INSTALLATION

1.1 Phần cứng

  • 2 x NVIDIA TESLA A100 40G GPU
  • Ubuntu 18.04.5 LTS
  • CUDA 11.4
  • Python 3.6.9

1.2 Cài đặt môi trường:

conda env create -f environment.yml
conda activate zac2022

2. DATASET

2.1 Chuẩn bị dữ liệu huấn luyện

mkdir raw
mkdir train_video&&cd train_video
wget https://dl-challenge.zalo.ai/liveness-detection/train.zip
unzip train.zip
rm -rf train.zip
mv ./train/videos/*.mp4 .
mv ./train/label.csv ../raw
rm -rf train

2.2 Chuẩn bị dữ liệu test

cd ..
mkdir data&&cd data
wget https://dl-challenge.zalo.ai/liveness-detection/private_test.zip
unzip private_test.zip
rm -rf private_test.zip
mv ./private_test/videos/*.mp4 .
rm -rf private_test

2.3 Extract frames từ dữ liệu huấn luyện

cd ..
bash prepare_data.sh

2.4 Tạo sample test

python create_sample_sub.py

3. SOLUTION SUMMARY

image

4. TRAINING

4.1 Tải pretrained ConvNeXt

wget https://dl.fbaipublicfiles.com/convnext/convnext_xlarge_22k_1k_224_ema.pth -P weights
wget https://dl.fbaipublicfiles.com/convnext/convnext_large_22k_1k_224.pth -P weights

4.2 Huấn luyện

bash scripts/train_convnext_xlarge_fold0.sh
bash scripts/train_convnext_xlarge_fold1.sh
bash scripts/train_convnext_xlarge_fold2.sh
bash scripts/train_convnext_xlarge_fold3.sh
bash scripts/train_convnext_xlarge_fold4.sh


bash scripts/train_convnext_large_fold0.sh
bash scripts/train_convnext_large_fold1.sh
bash scripts/train_convnext_large_fold2.sh

5. INFERENCE

bash predict.sh

Có thể sử dụng checkpoints nhóm mình đã train bằng cách download từ google drive:

bash download_weights.sh
bash predict.sh

Output là file submission.csv sẽ được lưu vào folder result. Sử dụng file này để nộp kết quả lên hệ thống.

6. RESULTS

6.1 Comparision of ConvNeXt with different models

image image

6.2 Ablation study

image image

6.3 Final result

image

7. REFERENCES

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.