Open MrXin95 opened 3 years ago
@MrXin95 can you provide test image? for now it works with rgb images, maybe I'll add auto-convertion.
I've tested that any image with a bit depth of 8 doesn't work. Because the images processed in the code are RGB images (24bit) The first is the image I need to test, and the second is the gray image I download freely on the Internet
I use OpenCvSharp4.Windows to solve it.
Mat mat = new Mat(img_root, ImreadModes.Color); //read any images witch RGB mode
using var image = OpenCvSharp.Extensions.BitmapConverter.ToBitmap(mat); //convert mat to bitmap
List<YoloPrediction> predictions = scorer.Predict(image);
However, I found that the prediction speed of the model almost did not change, but the speed of drawing the prediction box was a few seconds slow. At first, I thought that the incoming original image was in image format, and the image I converted was in bitmap format, but after I converted bitmap to image format, the drawing speed did not increase. What other good methods do you have?
@MrXin95 thanks, model trained on 8bit images? (as I know its not supported in yolov5 as well)
Yes, I trained model with 8-bit images, because in my project, the image provided by the camera is like this. The images in the model are indeed three channels, but yolov5 can automatically convert 8-bit images into 24bit before training. You can have a try. We can train the model with 8bit images, and the test is also no problem in python with them.
Yes, I trained model with 8-bit images, because in my project, the image provided by the camera is like this. The images in the model are indeed three channels, but yolov5 can automatically convert 8-bit images into 24bit before training. You can have a try. We can train the model with 8bit images, and the test is also no problem in python with them.
兄弟,你用自己的模型测试图片,一张图大概多长时间?
Yes, I trained model with 8-bit images, because in my project, the image provided by the camera is like this. The images in the model are indeed three channels, but yolov5 can automatically convert 8-bit images into 24bit before training. You can have a try. We can train the model with 8bit images, and the test is also no problem in python with them.
兄弟,你用自己的模型测试图片,一张图大概多长时间?
纯推理二十几毫秒,加上前后处理一百多毫秒
When I tested, I found that the input gray image(8bit) can not work. Is it necessary to add the code that converts the gray image(8bit) into RGB image(24bit)?