GithubHelp home page GithubHelp logo

vaipe-2022-solutions's Introduction

vaipe-2022-solutions

Pipeline

Install

Tạo docker image từ dockerfile và run docker container

docker build -t vaipe .
docker run -d -it --name [your name] -v [path to data root]:/app/data vaipe:latest
docker exec -it [container name] bash

Prepare data

Chuẩn bị dữ liệu train cho các task phát hiện và nhận dạng tên thuốc trong đơn, phát hiện và nhận dạng thuốc trong ảnh viên thuốc Cấu trúc cây thư mục như sau:

---data/
    |---public_train/
    |---public_val/
    |---public_test/
    |---private_test/

Sau đó vào trong docker container, chạy lệnh sau để tạo ra dữ liệu đầu vào cho các phần training sau

bash scripts/install.sh
bash scripts/prepare.sh

Cấu trúc thư mục sau khi chạy như sau:

---data/
    |---public_train/
    |---public_test/
    |---private_test/
    |---crop/ # data dung de train va inference final model
        |---crop_train/
        |---crop_val/
        |---train_crop.csv
        |---val_crop.csv
---checkpoints/
    |---best.pt # weight yolov7 detect vien thuoc
    |---convnext_large_384_in22ft1k_224.ckpt
    |---convnext_xlarge_384_in22ft1k_224.ckpt
    |---drug_private.npy  # dict mapping ten thuoc

Training

Đối với task phát hiện tên thuốc trong đơn, training model yolov5s theo repo yolov5 với data ở folder pres_yolo thu được weight pres.pt

Đối với task nhận dạng tên thuốc: Training theo repo vietocr của anh pbcquoc với folder tên ocr đã tạo từ bước trước, thu được weight transformerocr.pth

Đối với task phát hiện vị trí viên thuốc trong ảnh, training model yolov5m theo repo yolov5 thu được weight pill_2.pt

Đối với model trích rút đặc trưng ảnh viên thuốc:

bash scripts/train.sh

Phần này mình chưa check được code kỹ, nếu không chạy được vui lòng đặt issue để mình update

Inference

bash scripts/inference.sh

Kết quả thu được là 1 file results.csv dùng để submit kết quả lên web của cuộc thi

vaipe-2022-solutions's People

Contributors

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