You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error occurs when ‘yolo.RunObjectDetection’ is executed.
Code:
private void startToolStripMenuItem_Click(object sender, EventArgs e)
{
try
{
//////////
// VIDEO
//////////
// Instantiate a new Yolo object
using var yolo = new Yolo(new YoloOptions
{
OnnxModel = @"yolov8s.onnx", // Your Yolov8 or Yolov10 model in onnx format
ModelType = ModelType.ObjectDetection, // Set your model type
Cuda = false, // Use CPU or CUDA for GPU accelerated inference. Default = true
GpuId = 0, // Select Gpu by id. Default = 0
PrimeGpu = false, // Pre-allocate GPU before first. Default = false
});
// Set video options
var options = new VideoOptions
{
VideoFile = @"C:\Users\DSluzki\Desktop\video.mp4",
OutputDir = @"C:\Users\DSluzki\Desktop\YoloOutput",
//GenerateVideo = false,
//DrawLabels = true,
//FPS = 30,
//Width = 640, // Resize video...
//Height = -2, // -2 automatically calculate dimensions to keep proportions
//Quality = 28,
//DrawConfidence = true,
//KeepAudio = true,
//KeepFrames = false,
//DrawSegment = DrawSegment.Default,
//PoseOptions = MyPoseMarkerConfiguration // Your own pose marker configuration...
};
// Run inference on video
var results = yolo.RunObjectDetection(options, 0.25, 0.7);
// Do further processing with 'results'...
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
The text was updated successfully, but these errors were encountered:
Error occurs when ‘yolo.RunObjectDetection’ is executed.
Code:
The text was updated successfully, but these errors were encountered: