AlturosDestinations / Alturos.Yolo

C# Yolo Darknet Wrapper (real-time object detection)
MIT License
427 stars 132 forks source link

How to create multiple instance of YoloWrapper #127

Open ELERKSOSY opened 4 years ago

ELERKSOSY commented 4 years ago

Hello,

I would like to create two instance of YoloWrapper each instance load different weight and config file but I found any new instance replicate the parameters of the previous instance

This my code:

YoloWrapper yoloWrapper = new YoloWrapper(Application.StartupPath + @"\Model\yolov2-tiny-voc.cfg", Application.StartupPath + @"\Model\yolov2-tiny-voc.weights", Application.StartupPath + @"\Model\voc.names");

YoloWrapper yoloWrapper2 = new YoloWrapper(Application.StartupPath + @"\Model\test\yolov2-tiny.cfg", Application.StartupPath + @"\Model\test\yolov2-tiny_34800.weights", Application.StartupPath + @"\Model\test\classes.txt");

At the end I found yoloWrapper became equal to yoloWrapper2, how can I over come this problem? please advise. Thank you in advance

sobelito commented 4 years ago

I had the same desire and issue. I ended up creating two .net core workers.

actopozipc commented 4 years ago

Is there a difference between the yolov2-tiny-voc and the yolov2-tiny datasets? I cant find the first on this github page.

wunyee commented 4 years ago

I had the same issue. I think the problem is here: https://github.com/AlexeyAB/darknet/blob/master/src/yolo_v2_class.cpp#L28

I use the most stupid way to solve this problem Add a new detector in yolo_v2_class.cpp

k0kao commented 3 years ago

Hello,

I would like to create two instance of YoloWrapper each instance load different weight and config file but I found any new instance replicate the parameters of the previous instance

This my code:

YoloWrapper yoloWrapper = new YoloWrapper(Application.StartupPath + @"\Model\yolov2-tiny-voc.cfg", Application.StartupPath + @"\Model\yolov2-tiny-voc.weights", Application.StartupPath + @"\Model\voc.names");

YoloWrapper yoloWrapper2 = new YoloWrapper(Application.StartupPath + @"\Model\test\yolov2-tiny.cfg", Application.StartupPath + @"\Model\test\yolov2-tiny_34800.weights", Application.StartupPath + @"\Model\test\classes.txt");

At the end I found yoloWrapper became equal to yoloWrapper2, how can I over come this problem? please advise. Thank you in advance

did you solved it?