I am building a C# project to detect all objects in the image , I don't want it to detect what is these objects , I just want it to detect the position of the objects in the image .
I have tried many ways to do it like this (using imageai python library then I used this script in c#) and this (using Alturos.Yolo library) tutorials, but these tutorials detect the known objects only but did not detect the position of an object if it do not know what is this object .
What I need is to detect the position of the object whether it recognize what is this object or not .
For example in this image

it detects the only the objects it recognize their type but I want it to detect all the objects in the image.
python code :
detector = ObjectDetection()
detector.setModelTypeAsRetinaNet()
detector.setModelPath( os.path.join(execution_path , "resnet50_coco_best_v2.0.1.h5"))
detector.loadModel()
detections =
detector.detectObjectsFromImage(input_image=os.path.join(execution_path , rel_path ,file_name), output_image_path=os.path.join(execution_path ,new_file_name))
for eachObject in detections:
print(eachObject["name"] , " : " , eachObject["percentage_probability"] ," : " ,eachObject["box_points"] )
using Alturos.Yolo library code :
var configurationDetector = new ConfigurationDetector();
var config = configurationDetector.Detect();
using (var yoloWrapper = new YoloWrapper(config))
{
using (MemoryStream ms = new MemoryStream())
{
pictureBox1.Image.Save(ms, ImageFormat.Png);
var items = yoloWrapper.Detect(ms.ToArray());
yoloItemBindingSource.DataSource = items;
arr = items.ToArray();
}
}
can anyone help or recommend another way please ?
Here is a similar question with some answers that may help you. Here are a few options I have found:
AForge.Net
Some Methods:
* ColorFiltering
* ChannelFiltering
* HSLFiltering
* YCbCrFiltering
* EuclideanColorFiltering
OpenCV
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With