YoloSharp icon indicating copy to clipboard operation
YoloSharp copied to clipboard

Using Yolov8n, image detection was trained,and the prediction result was 0.

Open lijianxin520 opened this issue 6 months ago • 4 comments

Using Yolov8n, image detection was trained. The training results are as follows:

Then, the training model was used for prediction, and the prediction result was 0. What could be the reason for this? Parameter configuration is as follows: Config config = new Config { DeviceType = DeviceType.CPU, ScalarType = ScalarType.Float16, //RootPath = @"Assets\DataSets\dotav1", RootPath = @"Assets\DataSets\test2", TrainDataPath = "train.txt", ValDataPath = "val.txt", YoloType = YoloType.Yolov8, YoloSize = YoloSize.n, TaskType = TaskType.Detection, ImageProcessType = ImageProcessType.Letterbox, ImageSize = 640, BatchSize = 8, NumberClass = 3, PredictThreshold = 0.5f,
IouThreshold = 0.7f,
Workers = 1, Epochs = 80, LearningRate = 5e-5f, // 0.00005 1e-4f, Patience = 20,

};

lijianxin520 avatar May 11 '26 03:05 lijianxin520

Image

lijianxin520 avatar May 11 '26 03:05 lijianxin520

There is an error in HSV Transform, and I have fixed it in the latest version. Maybe it will work well now.

IntptrMax avatar May 20 '26 15:05 IntptrMax

After obtaining the latest update, the execution result is as follows: Image This time is even worse than the last time!

lijianxin520 avatar May 21 '26 08:05 lijianxin520

Maybe your dateset is too small, and you have use fp16. Sometime it will not work well.

IntptrMax avatar May 22 '26 10:05 IntptrMax