Instance IDs or tracking IDs help give machines some degree of object permanence. Imagine you have an object and you need to make sure your model knows that it's the same object throughout different frames as it moves around. Or imagine this object is visible by multiple cameras at the same time.
This is where Instance IDs do their part. Let's take a look at this picture. Suddenly there's a moped driving through. We're going to label this and create an auto annotation around it. We're going to be adding the points that are missing from it until the annotation is complete. You can notice that it's been given the ID number three. Move to the next image, and the moped has driven forward, so we're going to create another annotation around it and once complete we'll notice that the ID given to it is actually number four. This is because it's a brand new annotation and the system doesn't yet know that it's the same motorcycle. After completing this annotation, though, we can amend this. By hovering over the cent, we can notice that there is an ID button here. We can click it and edit this number to any value we wish.
In this case, we'll set it back to three. You'll also notice that these IDs have a unique combination of three colors. This is called chroma hashing. It allows us to present the number with a set of colors that is entirely unique up to 999 billion. It's particularly useful if IDs start to become huge numbers such as this one.
And it's going to be easier to compare them by color than by a massive value. Going back to our annotation, we'll switch to the next frame and notice that the moped has driven even forward. We'll press the copy instance button on the right and this will copy over annotations and their sub annotations. In this case, the instance ID we will press the edit auto annotate button to change the shapes boundaries, and reset it to the new location and scale of the moped.
We will also press the clear button to get rid of those previous clicks, and it will adapt to its new shape. The shortcut for this is M right next to the N button for auto annotate. And before switching to the next image, here's a quick tip. You can press this button to lock the zoom into position so that when you switch images using the period and comma button.
The zooming level and position of the camera will stay the same. This way we can track our friend on the moped and create yet another annotation by copying instances, moving it to his new location, and then pressing the M key or the edit auto annotate button. We'll resize this, and every time a resize is done, Auto annotate will readjust itself to the new shape.
Bear in mind that every annotation carries with itself the auto annotate box around the centroid, so wherever you move around, it will carry the clicks and auto annotate settings with it. Let's say we forgotten this case to copy over the annotations. Instead we created a new one. We could edit the figure manually, but if it is a particularly large one, we can simply go back one image.
Control C to copy or Command C on a Mac and then paste it using Shift control V or Shift Command V on a Mac. This is the paste sub annotation shortcut, which will allow you to paste the instance ID only in this case and would also paste attributes if they were present on the image. Finally, as our friend drives away, we can continue to copy instances, move the annotation and restart auto annotate to fit a polygon to the new shape.
By simply adjusting the box or moving it in cases where there is only a translation and not a change in scale. If you're watching this video past July, 2020, much of this work can also be automated using auto complete. You can refer to the tutorial and auto complete in the description of this video or the sidebar to the right.
You can activate instance IDs at any point by editing a class settings, and you'll find an object's instance ID within the export of every annotation.