Giter Site home page Giter Site logo

level2-cv-datacentric-cv-08's Introduction

Level2-ObjectDetection Competetion

🌟CV-08쑰🌟 MakeZenerator νŒ€ κΉ€νƒœμ–‘, κΉ€ν˜œμ§€, μ‹ ν˜Έμ€€, 성주희, μž„μ„œν˜„, μ •μ†Œμœ€

Project Structure

${PROJECT}
 ┃  
 ┣ Data_EDA
 ┃ β”— visualizer.ipynb  
 ┃ β”— visualizer_save.py 
 ┃
 ┣ dataset.py
 ┣ east_dataset.py
 ┣ file_rename.py
 ┣ json_convert.py
 ┣ detect.py
 ┣ loss.py
 ┣ model.py
 ┣ deteval.py
 ┣ train.py
 ┣ inference.py
 ┃
 ┣ .github
 ┣ .gitignore  
 ┣ .gitmessage.txt  
 ┣ .pre-commit-config.yaml  
 β”— README.md  
  • Data_EDA : This folder contains..
  • FOR dataset : dataset.py, east_dataset.py, file_rename.py, json_convert.py, detect.py
  • FOR Models : loss.py, model.py, deteval.py
  • FOR Tools : train.py, inference.py
  • README.md
  • requirements.txt : contains the necessary packages to be installed

Code Structure Description

Data EDA

  • Use MaskSplitByProfileDataset
  • Downsampling
  • Stratified Kfold

Model

  • Ensemble Soft Voting
  • Learn additional Fine Tuning based on the public pretrained model EfficientNet + ConvNext + ConvNext(Stratified Kfold)

Getting Started

Setting up Vitual Enviornment

  1. Initialize and update the server

    su -
    source .bashrc
    
  2. Create and Activate a virtual environment in the project directory

    conda create -n env python=3.8
    conda activate env
    
  3. To deactivate and exit the virtual environment, simply run:

    deactivate
    

??? Install Requirements

To Insall the necessary packages liksted in requirements.txt, run the following command while your virtual environment is activated:

pip install -r requirements.txt

Usage

Description of all arguments

Training

To train the model with your custom dataset, set the appropriate directories for the training images and model saving, then run the training script.

  • single model
python train.py --data_dir /path/to/images --model_dir /path/to/model --model MODEL_NAME
  • single multiple model
python train_single_multiple.py --data_dir /path/to/images --model_dir /path/to/model --model MODEL_NAME

Inference

For generating predictions with a trained model, provide directories for evaluation data, the trained model, and output, then run the inference script.

  • single model
python inference.py --data_dir /path/to/images --model_dir /path/to/model --output_dir /path/to/model --model MODEL_NAME
  • single multiple model
python inference.py --data_dir /path/to/images --model_dir /path/to/model --output_dir /path/to/model --model_mode single_multiple --model MODEL_NAME

Ensemble

  • ensemble (hard voting)
python hard_voting.py --file_dir ./csv --csv1 file1.csv --csv2 file2.csv --csv3 file3.csv
  • ensemble (soft voting)
python soft_voting.py --models MODEL_NAME1 MODEL_NAME2 MODEL_NAME3 --model_dir ./checkpoint --model_files file1.pth file2.pth file3.pth --data_dir ./data/eval

Model

Dataloader

level2-cv-datacentric-cv-08's People

Contributors

soyoonjeong avatar dlatjgus0612 avatar github-classroom[bot] avatar carboxaminoo avatar internationalwe avatar jouhy avatar

level2-cv-datacentric-cv-08's Issues

[FEAT] Auto annotation을 μœ„ν•œ labelling κΈ°λŠ₯ ꡬ좕

⭐ Description

  • labelling μž‘μ—… μ‹œ λ°μ΄ν„°μ˜ νŠΉμ§•μ— μ˜ν•΄ λ§Žμ€ μž‘μ—… μ‹œκ°„μ΄ ν•„μš”λ‘œ 함.
  • 이에 따라 ν•™μŠ΅ν•œ λͺ¨λΈλ‘œ 초기 bboxλ₯Ό labelling ν•˜μ—¬ μž‘μ—… μ‹œκ°„μ„ μ€„μ΄λŠ” 것을 λͺ©μ μœΌλ‘œ 함.

πŸ“· Screenshots

πŸ“ Files

  • make_annotation.py

πŸ“ˆ To Reproduce

βœ”οΈ Tasks

  • ν•™μŠ΅ μ™„λ£Œ 된 λͺ¨λΈμ„ 톡해 μƒˆλ‘œμš΄ 데이터에 λŒ€ν•œ bbox μ˜ˆμΈ‘ν•˜λŠ” κΈ°λŠ₯ κ΅¬ν˜„
  • 예츑된 bboxλ₯Ό visualization ν•˜μ—¬ λ³΄μ—¬μ£Όκ±°λ‚˜ μ €μž₯ν•˜λŠ” κΈ°λŠ₯ μ—°κ²°
  • 예츑된 bbox 정보λ₯Ό COCO formatμ΄λ‚˜ λ‹€λ₯Έ format으둜 μ €μž₯ν•˜λŠ” κΈ°λŠ₯ κ΅¬ν˜„

[FIX] Modify Visualizer_save

⭐ Description

  • csv νŒŒμΌμ„ ν†΅ν•œ bbox 생성 ν•¨μˆ˜ μΆ”κ°€
  • Test case ν•¨μˆ˜ν™”

πŸ“· Screenshots

πŸ“ Files

  • Data_EDA/visualizer_save.py

πŸ“ˆ To Reproduce

βœ”οΈ Tasks

  • csv 파일 ν™œμš© ν•¨μˆ˜ 생성
  • test case ν•¨μˆ˜ν™”

[Feat] Baseline

⭐ Description

  • baseline μ½”λ“œ μž‘μ„±

πŸ“· Screenshots

πŸ“ Files

  • config/train.yaml
  • dataset.py
  • detect.py
  • deteval.py
  • east_dataset.py
  • inference.py
  • inference.py
  • loss.py
  • model.py
  • pths/vgg16_bn-6c64b313.pth
  • train.py
  • utils.py

πŸ“ˆ To Reproduce

βœ”οΈ Tasks

  • Valid dataset 및 Dataloader μ½”λ“œ λ§Œλ“€κΈ°
  • config ν˜•μ‹μœΌλ‘œ λ³€κ²½
  • log ν˜•μ‹ λ³€κ²½
  • Random Seed κ³ μ • μ½”λ“œ
  • Wandb 연동

[FEAT] EDA

⭐ Description

  • Image에 λŒ€ν•œ width, height, ratio, tag, Imageλ‹Ή Word 수 μ‹œκ°ν™”
  • Word에 λŒ€ν•œ tag, Orientation, Language, Aspect Ratio, Bbox size μ‹œκ°ν™”

πŸ“· Screenshots

πŸ“ Files

πŸ“ˆ To Reproduce

βœ”οΈ Tasks

  • Image width, height, ratio, tag, image λ‹Ή word 수 μ‹œκ°ν™”
  • Word에 λŒ€ν•œ tag, Orientation, Language, Aspect Ratio, Bbox size μ‹œκ°ν™”

[FEAT] Image visualizer

⭐ Description

  • Matplotlib을 ν™œμš©ν•œ Train dataset bbox κ°€μ‹œν™” κ΅¬ν˜„
  • Opencvλ₯Ό ν™œμš©ν•œ Train dataset bbox κ°€μ‹œν™” 이미지 μ €μž₯ κ΅¬ν˜„

πŸ“· Screenshots

πŸ“ Files

  • Data_EDA/visualizer.ipynb
  • Data_EDA/visualizer_save.py

πŸ“ˆ To Reproduce

βœ”οΈ Tasks

  • κ°€μ‹œν™” μ½”λ“œ κ΅¬ν˜„_Matplotlib
  • μ €μž₯ μ½”λ“œ κ΅¬ν˜„_Opencv

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.