rotated_train_imgs.py: Dataset image rotation
defect_synthesis.py: Defect Synthesis
preprocessing.py: Dataset preprocessing
train_annous_rotated.json: rotated dataset, can also be replaced with original dataset
Install dependencies using requirements.txt
pip install -r requirements.txt
Run preprocessing.py in the terminal, fill in the paths of Base Image, Defect Image, Output File and Original Dataset json, and then run defect_synthesis.py in the terminal.