76206

Object Detection API Assertion failed: [maximum box coordinate value is larger than 1.01: ] for resn

Question:

I'm using Tensorflow's <a href="https://github.com/tensorflow/models/tree/master/object_detection" rel="nofollow">Object Detection API</a>, but get the following error when training:

<blockquote>

InvalidArgumentError (see above for traceback): assertion failed: [maximum box coordinate value is larger than 1.01: ] [1.47]

</blockquote>

I get the error when I use any of the following:

<ul><li>faster_rcnn_inception_resnet_v2_atrous_coco </li> <li>rfcn_resnet101_coco</li> </ul>

But NOT when I use:

<ul><li>ssd_inception_v2_coco </li> <li>ssd_mobilenet_v1_coco</li> </ul>

My training images are a mixture of 300x300 and 450x450 pixels. I don't believe any of my bounding boxes are outside the image coordinates. Even if that's the case why would the last two models work but not the resnet models?

Answer1:

After looking at my raw bounding box data, turns out there were a few random instances where the bounding box coordinates either had very large numbers or negative numbers (not sure how that happened to begin with). I deleted these and now I have no issue training any of the models.

Answer2:

The first two networks you mentioned seem to be using a value between 0 and 1 to define the position of the bounding boxes. For that reason, I was getting the same error.

I had to change the script to create the TF records, from something like this:

# Assuming `x` & `y` are floats with the coordinates of the top-left corner: xmin = x ymin = y # Assuming `width` & `height` are floats with the size of the box xmax = x + width ymax = y + height

To something like this:

# Assuming `x` & `y` are floats with the coordinates of the top-left corner: xmin = x / image_width ymin = y / image_height # Assuming `width` & `height` are floats with the size of the box xmax = (x + width) / image_width ymax = (y + height) / image_height

Recommend

  • Julia: use of pmap with matrices
  • How to construct and plot uni-variate Gaussian Mixture using its parameters in Python
  • How do I apply this?
  • Paperclip not showing image even though URL/images in correct places
  • As shown in the figure, from these 2 table I want to select a record from 1st table if only if '
  • hibernate: Custom code on insert / update
  • How does MongoDB distribute data across a cluster
  • Equivalent of Matlab's 'fit' for Gaussian mixture models in R?
  • Else statement executing even the IF statement is TRUE
  • Machine learning Algorithms used by Elastic x-pack plugin
  • Marshaling structure with reference-type and value-type members inside a union
  • Python - Difference Between Windows SystemParametersInfoW vs SystemParametersInfoA Function
  • PHP SDK for Facebook: Uploading an Image for an Event created using the Graph API
  • Write a cell array in text file using Matlab
  • Hide characters in email address using an SQL query
  • Paperclip don't save on database
  • Object Detection API Assertion failed: [maximum box coordinate value is larger than 1.01: ] for resn
  • How to update a label in Tkinter, StringVar() not working
  • Rails 3/ paperclip/ imagemagick - merging two images
  • Result discrepancy between cv.MinAreaRect2 and ArcGIS (GIS software) . Possible bug?
  • Android: Skobbler, how to limit map view in an area?
  • How do I make a SKSpriteNode that does not respond to touch if it's pixels are transparent?
  • Restrict mouse movement over a specified window handle
  • onpreviewframe byte[] to int[]
  • Randomly placing a polygon inside of polygon
  • Drag and Drop for imageview not working
  • OpenCV Python: Draw minAreaRect ( RotatedRect not implemented)
  • cell spacing in div table
  • Adding Object or changing its parameter programmatically in C# / ASP.Net
  • Java color detection