Skip to content

Louaq/CGI2024

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Notice!!!

This user has unauthorizedly misappropriated the code from this repository; this repository is the original source.

Snipaste_2025-06-28_20-33-07

The link is: https://github.com/scuzyq/v8.git

Dataset

Google Driver: https://drive.google.com/file/d/1UJcbH2cKLstZdyEJPGv_Hb3GP06MYJff/view?usp=sharinghu

How to train

Find the train.py file in the root directory, the comments have been written clearly as below:

import warnings
warnings.filterwarnings('ignore')
from ultralytics import YOLO

if __name__ == '__main__':
    model = YOLO('yolov8.yaml')

    model.train(data=r'/path/to/datasets/',
 
                cache=False,
                imgsz=640,
                epochs=500,
                single_cls=False,  
                batch=4,
                close_mosaic=10,
                workers=0,
                device='0',
                optimizer='SGD', 
                amp=True,  
                project='runs/train',
                name='exp',
                )

There's also a script for detecting, Detect.py:

import warnings
warnings.filterwarnings('ignore')
from ultralytics import YOLO

if __name__ == '__main__':
    model = YOLO('best.pt') # select your model.pt path
    model.predict(source='assets',
                  imgsz=640,
                  project='runs/detect',
                  name='exp',
                  save=True,
                )

Similarly, replace best.pt with your own trained model, enter the path of the detected image inside source, run the script to start the detection, and save the results in the runs/detect directory.

About

The Implementation of CGI2024 paper: An Improved YOLOv8-Based Rice Pest and Disease Detection

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages