We've recently been working on a structural overhaul of CoralNet's computer vision backend. In the process, we've re-evaluated a couple of finer details of how point annotations work on CoralNet. Depending on how you use CoralNet to get your work done, those details may affect you.

Changing from 1-indexing to 0-indexing

When you export annotations from CoralNet to CSV format, the point locations are given in 'row' and 'column' values, counting pixels starting from the top row and the left column of the image. When you upload annotations from CSV to CoralNet, you must use this same point locations scheme.

If you have an image which is 4000 pixels wide and 3000 pixels high, the column values used to range from 1 to 4000, and the row values used to range from 1 to 3000. Now, the column values range from 0 to 3999, and the row values range from 0 to 2999.

Why are we making this change? Without delving too far into technical details, the primary programming languages used in CoralNet - Python and Javascript - always do their array math and image-pixel math starting from 0. So, sticking with pixel values starting at 1 greatly increased our chances of careless mistakes.

As part of implementing this change, all existing point locations on CoralNet have had their row and column values decreased by 1. The points haven't actually "moved", but their representation has been ported from starting at 1 to starting at 0.

What this means for you:

  • If you've exported annotations to CSV before, the point locations in those old CSV files used rows and columns starting at 1. So, uploading those same annotations from CSV back into CoralNet will result in the point locations being 1 pixel off. Also, if you had a point location at the right edge or bottom edge of the image, the upload may fail. Before re-uploading old annotation CSV files, you'll want to subtract 1 from each row and column value first.

  • Automated annotations may get slightly more accurate, since the automated classifiers assumed point positions starting from 0 when they actually started from 1.

  • This change does not affect how existing points appear in the annotation tool.

  • This change does not affect uploading from and exporting to CPCe's file format.

Allowing uploads with points on the same row and column

When uploading annotations from CSV and CPCe files, CoralNet prevented the upload if a file contained two points with the same row and column values (in the same image). However:

  • This restriction was only in place starting in 2016, and never restricted points generated within CoralNet (using simple random or stratified random methods). All told, CoralNet has same-position points in about 10% of all sources.
  • CPCe does allow two points to be in the same position, so it is possible to have CPC files with that situation.

So, the reality is that a lot of benthic annotation projects have same-position points, whether based on CoralNet or on CPCe, and whether intentional or not. Porting data between systems is not a particularly fun task, and disallowing same-position points in uploads only made matters more difficult.

Therefore, we've changed our policy again to allow same-position points in uploads.

We have considered implementing a source-level option to turn same-position points on or off - for both uploads and CoralNet-generated points. However, this will be a low priority unless more people express interest in this feature.

Other news

You may have heard (or noticed) that unplanned site downtime has increased in the past week or two. After some server diagnosis work, we believe we finally have an understanding on the primary cause of the downtime and how to combat it. We have put a few simple measures in place to reduce the downtime frequency, and we are working on more long-term fixes.

We haven't really talked about the vision backend overhaul on this blog. But it's part of our preparation for the launch of CoralNet "Beta 2", which we have outlined briefly on our About page:

"[After CoralNet Beta] a second grant was received from NOAA to develop CoralNet Beta 2. This work will proceed along two main avenues. First, an API will be developed to allow easy and automated deployment of a trained classifier on new images. This also enables the creation of a repository of trained classifiers from which users can choose from. Second, we will take another look at the core technology behind the computer vision system to see if we can push performance even further."

We are looking to complete Beta 2 in the next couple of months, so we'll certainly have more Beta 2 details to discuss here later. Until then, we'll also keep working on the site, and hopefully fix a few more bugs in the process!

You can discuss this article on the forum: https://groups.google.com/forum/#!topic/coralnet-users/k1gspGSBviY