Main Content

Label Large Images in the Image Labeler

TheImage Labelerapp enables you to label images that might be too large to fit into memory. The app achieves this by converting the large image into ablocked image. A blocked image divides the large image into smaller blocks that can fit in memory.

In theImage Labelerapp, you can label a blocked image as you would any other image.

Import Blocked Image into Image Labeler

When loading images into theImage Labelerapp, if an image appears to be too large to fit into memory (having at least one dimension larger than 8000 pixels) or is a multiresolution image, the app displays the Importing Large Images dialog box, which offers you the option to convert the image into a blocked image. The image on the left side of the dialog box represents a blocked image, with visible grid lines to show how an image is divided into blocks. To choose to use a blocked image, selectImport as Blocked Imageand clickOK.

The Importing Large Images dialog box in the Image Labeler.

最初,这个应用程序加载块形式之分er of the image (50% of image height and width). For multiresolution images, the app chooses the resolution to use depending on how much of the image is visible. As you zoom in on an image, the app switches to a finer resolution. For more information about displaying multiresolution images, seebigimageshow.

When using blocked images, the app also provides a view of the entire image in theOverviewpane. In theOverviewpane, the display overlays a box on the image that shows the portion of the image that is currently visible in the main view pane in the center of the app window. To view other parts of the image in the app, drag the view box to a different part of the image in theOverviewpane. To get a more detailed view of the image, use the zoom buttons in the axes toolbar that appears when you move the mouse over the image in the main view pane. The axes toolbar also contains a button to enable a view of the block boundaries grid over the image. The current resolution level used by the app can affect the visibility of these block boundaries.

View of blocked image in Image Labeler app.

Work with Blocked Images in the Image Labeler

Once you load a blocked image into theImage Labelerapp, you can work with the blocked image as you would with nonblocked images. You can create labels, sublabels, and attributes and, when you are finished labeling, you can export the labels as agroundTruthobject.

How to label a blocked image in the Image Labeler.

Limitations

Using blocked images enables you to label images in the app that do not fit in memory. However, there are some limitations with use of blocked images in theImage Labeler应用程序。

  • Pixel labeling is not supported. You can only create labels using ROI shapes, such as rectangles, lines, and projected cuboid polygons.

  • When working with a multiresolution image, the images at every resolution must be in registered to each other, that is, in alignment.

  • Thumbnails of images displayed in the app cannot be rotated.

Use Blocked Image Automation with Images

With blocked images, as with nonblocked images, you can take advantage of automated processing to help with the labeling process. For example, with medical images, you can do automatic tumor detection using blocked image automation. You can train a object detector deep learning network and use that in the app to automatically label tumors with bounding boxes.

To use blocked image automation, clickSelect Algorithm, selectAdd Blocked Image Algorithm, and choose to either create a new algorithm, by selectingCreate New Blocked Image Algorithm, or import an existing algorithm, by selectingImport Blocked Image Algorithm.

Select Blocked Image Automation in the Image Labeler.

When you choose to create a new blocked image algorithm, the app opens a class file template in the editor. The class subclassesvision.labeler.mixin.BlockedImageAutomation. The template contains stubs for standard methods that you must implement for your algorithm, including theblockedImageAutomationAlgorithmmethod. For more information about implementing this method, seeblockedImageAutomationAlgorithm. Add the code you want the algorithm to execute. For more information about creating labeler automation algorithms and where to save this class file, seeCreate Automation Algorithm for Labeling.

After saving the class file and adding the location folder to the path, clickSelect Algorithmin the Image Labeler app, and selectRefresh list. You can select your new blocked image automation algorithm by clickingSelect Algorithm, and then selecting your algorithm.

Add new algorithm to Select Algorithm menu.

SelectMy Algorithmand clickAutomate. The app opens theAutomatetab. Use this tab to control execution of your blocked image automation algorithm.

  • Determine what parts of the image the algorithm processes: the whole image, the current region, or a region that you specify by drawing an ROI.

  • Specify which resolution level you want to process. Level 1 is the finest resolution level. The resolution level with the highest number is the coarsest resolution level.

  • Specify the size of the blocks in the blocked image. By default, blocks are 1024-by-1024.

  • ClickUse Parallelto take advantage of parallel processing techniques

  • ClickSettingsto access other parameters made available by the algorithm

After you select the automation algorithm, theAutomatetab appears. Any text instructions included about your algorithm in the class file, is displayed in the bottom-right pane of the app. TheAutomatetab also includes a subset of viewing options from theVisualizationtab. It also contains information about the blocked image, options to select automation regions, and run options. To try out the algorithm, clickRun.

The Image Labeler Automate tab.

Postprocess Exported Labels to Create a Labeled Blocked Image

You can convert polygon coordinates exported as agroundTruthobject from theImage Labelerapp into a labeled blocked image using thepolyToBlockedImagefunction. For more information, seeConvert Image Labeler Polygons to Labeled Blocked Image for Semantic Segmentation.

See Also

||

Related Examples

More About