how to change the bounding box color in the video output in yolov3 darknet - google-colaboratory

I have trained YOLOv3 darknet model on my custom dataset. First I have cloned the https://github.com/kriyeng/darknet/ repository in google colab and then run the whole code in google colab. But I want to change the color of the bounding boxes in the output video. Please suggest how to do it. Thanks in advance.

Here is a solution in C++ but you can apply it to python as well. Just change the values in Scalar. In the example below it is set to the color red.
//Draw a rectangle displaying the bounding box
rectangle(frame, Point(left, top), Point(right, bottom), Scalar(0, 0, 255));

Related

Does Tensorflow resize bounding boxes when training an object detection model?

I'm wondering about image resizing and then the intuitive bounding box resizing that would follow that.
For instance, when I use a 640x640 image in my dataset, and the model has a fixed_shape_resizer of 320x320, will the original bounding box be scaled down to match the smaller 320x320 size?
Yes, Tensorflow will automatically resize the bounding box to match the smaller input size.
Here is a Link to the code that changes the bounding box sizes.

Is it possible to process semantic segmentation with a masked image in Tensorflow Lite?

I'm working on an AndroidApp with TensorFlow Lite to process semantic segmentation.
https://www.tensorflow.org/lite/api_docs/java/org/tensorflow/lite/InterpreterApi
Also I'm using U2net model and processing images which are already masked like below.
enter image description here
Problem is masked area could be circle or elliptical shape, so it can't be done with normal process.
Throwing this image into interpreter results in getting just same image in which circle area is white color.
So I have to cut out the circle and throw it, but only the circle area is included.
Throwing cut-out image does't work, because it's out of shape.
The arrays must be square just like normal images.
I counld't find any lead to solve this problem.
Any advice would be appriciated.
Thank you.

How to change label colour on bounding boxes in YOLOV3

I have trained yolov3 on a custom dataset following the implementation from (https://github.com/AlexeyAB/darknet) repo. I'm getting bounding boxes for this test image but not getting labels for that. Can you please help me fix this issue?

Normal or not that no bounding boxes are shown on tensorboard Images tab when training object detection model?

I'm training an object detection model with Tensorflow (fine tuning from ssd_mobilenet_v2_320x320_coco17_tpu-8) and monitor the training task with tensorboard. I was expecting in the Images tab of tensorboard that images that are displayed would show a bounding box. What I see though is only images with an orange line drawn above the picture (the same orange that I expect for the bounding box). Am I missing something? Am I right when I say that a bounding box should appear or not? Picture of what I see is joined. Any help greatly appreciated.

If I resize images using Tensorflow Object Detection API, are the bboxes automatically resized too?

Tensorflow's Object Detection API has an option in the .config file to add an keep_aspect_ratio_resizer. If I resize my training data using this, will the corresponding bounding boxes be resized as well? If they don't match up then the network is seeing incorrect examples.
Yes, the boxes will be resized to be compatible with the images as well!