πCV-08μ‘°π MakeZenerator ν κΉνμ, κΉνμ§, μ νΈμ€, μ±μ£Όν¬, μμν, μ μμ€
${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
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)
-
Initialize and update the server
su - source .bashrc
-
Create and Activate a virtual environment in the project directory
conda create -n env python=3.8 conda activate env
-
To deactivate and exit the virtual environment, simply run:
deactivate
To Insall the necessary packages liksted in requirements.txt
, run the following command while your virtual environment is activated:
pip install -r requirements.txt
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
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 (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