models icon indicating copy to clipboard operation
models copied to clipboard

Feature Request: Output bounding boxes at 45 degree angle using Tensorflow object detection API

Open ajinkya933 opened this issue 7 years ago • 21 comments

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow):no
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04):windows 10
  • TensorFlow installed from (source or binary):source
  • TensorFlow version (use command below):1.4.0

Describe the problem

The current version of Tensorflow object detection API is good for drawing bounding boxes at 0,90,180,360 degree respectively, namely, the output boxes we get are either vertical or horizontal. However, when there are 3 or more parallel objects: with the first object at 45 degrees to the horizontal axis and remaining two parallel to this object, the API completely ignores it. Please add a feature where the bounding box at output can tilt in accordance with the angle of image.

ajinkya933 avatar Feb 16 '18 16:02 ajinkya933

Please provide more details for your problem description. Maybe a figure?

bignamehyp avatar Feb 23 '18 07:02 bignamehyp

Ok, sure. I have trained Tensorflow object-detection API to detect confinements I am using faster rcnn resnet 101 model (retraining the last layer of it) to do so. If you see the following figure: Figure 1 it detects all the confinements correctly (it also does so when there are many confinements at aligned vertically or horizontally)

Figure 1: capture

However, if you see figure 2 it completely ignores confinements (my assumption is it is due to the angle of orientation of figure 2 where objects are parallel 45 degree to horizontal). Figure 2: capture1

I want Figure 2 to output the following (note: edited in paint): capture2

Will you add a feature which does this? without rotating the image, that is outputs boxes at tilted angles in accordance with the objects?

ajinkya933 avatar Feb 23 '18 15:02 ajinkya933

An interesting feature would be to add "rotation" to the anchors, so it would be possible to regress not only the exact position of the bounding boxes, but also the rotation.

jkravanja avatar Mar 01 '18 10:03 jkravanja

Hi ajinkya, I have started working on same concept? Is there any possibility for you to share some sample code as I am completely new to Tensoflow and not able find any particular source for these kind of problems? It would be a really great help for me....

srikanthinty avatar Mar 19 '18 04:03 srikanthinty

is there any progress regarding this problem ?

achraf-boussaada avatar Apr 03 '18 12:04 achraf-boussaada

Reopening the issue as it is not resolved.

ajinkya933 avatar May 21 '18 14:05 ajinkya933

This is something I am looking into as well for my research, I will post my findings after talking with my professors.

beric7 avatar May 29 '18 21:05 beric7

Any update on this issue?

lroberts99 avatar Sep 03 '18 21:09 lroberts99

Still looking for this.

cannguyen275 avatar Nov 05 '18 07:11 cannguyen275

Anyone find anything?

Sasha1296 avatar Jan 15 '19 23:01 Sasha1296

Subbing for updates, this would be a great feature.

aysark avatar Feb 04 '19 22:02 aysark

Its been a year the closest Ive got to solving this is using deep lab and creating a custom image segmentor

ajinkya933 avatar May 14 '19 12:05 ajinkya933

@ajinkya933 Its been a year the closest Ive got to solving this is using deep lab and creating a custom image segmentor how you do that, can you share some thoughts? deeplab only gives you the pixel label,but you can not get any of the angle or rotation information

aohan237 avatar Sep 19 '19 06:09 aohan237

Any updates on this?

FPerezHernandez92 avatar Feb 06 '20 15:02 FPerezHernandez92

any updates on this guys? I feel like this is a very important feature request.

ruthvik92 avatar Oct 30 '20 14:10 ruthvik92

Any updates on this?

Did you figure this out?

ruthvik92 avatar Oct 30 '20 14:10 ruthvik92

This feature will be a great improvement to the API. Do we have any updates on this or any timeline when we can expect this feature to be included?

ameyskulkarni avatar Oct 30 '20 15:10 ameyskulkarni

Reoopening it as I clearly see this as VVIMP feature request for production

ajinkya933 avatar Oct 31 '20 07:10 ajinkya933

any updates on this feature ?

CliveKBinu avatar Jul 08 '21 19:07 CliveKBinu

Keen for this feature, would be great to add the bounding box rotation to the API. I guess what needs to be added is another regression node for the bounding box rotation as well as the IoU calculation should be updated since with rotation the IoU will need to be calculated in a polygon manner.

HoseinHashemi avatar Nov 01 '21 02:11 HoseinHashemi

any updates on this feature ?

melihyazgan avatar Nov 21 '22 13:11 melihyazgan

Hey all,

This feature is still not implemented, I requested it too, but no one will code it.

So let's come together add the algorithm for the community. BUT there's a problem... they training from scratch with rotated bounding boxes. All the models are pretrained for us users with normal bounding boxes. I don't know if the models can transfer from learning with normal bb to learn again with rot. bb.

@melihyazgan @HoseinHashemi @CliveKBinu @ajinkya933 @ameyskulkarni @ruthvik92

Petros626 avatar Jun 29 '23 10:06 Petros626

If we are set on retuning a bounding box, I think an easy win would be “instance segmentation” + “contouring”. After contouring the object you could draw a box from its corner extents.

beric7 avatar Jul 01 '23 11:07 beric7