Skip to content

supervisely-ecosystem/merge-classes

Repository files navigation

Merge Classes

OverviewHow To RunNotes

GitHub release (latest SemVer) views runs

Overview

Sometimes class management (combining, mapping, handling class imbalance) can be tricky and time-consuming. This App helps to merge classes with the same shapes. Let's consider several cases:

  1. Map one or several classes to the existing one: all objects will be assigned to destination class and the source class will be removed from project. Follow steps from (How To Run section)
  2. Map one or several classes to a new one: first, you have to create new class (on Project->Classes page) and then follow steps from (How To Run section).

Notes:

  • Result project name = original name + "(merged classes)" suffix
  • Your data is safe: app creates new project with modified classes and objects. The original project remains unchanged

How To Run

Step 1: Run from context menu of project

Go to "Context Menu" (images project) -> "Run App" -> "Transform" -> "Merge Classes"

Step 2: Waiting until the app is started

Once app is started, new task appear in workspace tasks. Wait message Application is started ... (1) and then press Open button (2).

Step 3: Define mapping

App contains 3 sections: information about input project, information about output and the list of all classes from input project. In column CONVERT TO there are dropdown lists in front of each class (row of the table). You have to define transformations for classes of interest.

Default remain unchanged option is selected and means that class and all its objects will be copied without modification to a new project. Dropdown lists only contain allowed shapes (see Overview), for example Rectangle can not be transformed to Polyline or Point.

Step 4: Press RUN button and wait

Press Run button. The progress bas will appear in Output section. Also you can monitor progress from tasks list of the current workspace.

App creates new project and it will appear in Output section. Result project name = original name + "(merged classes)" suffix

Step 5: App shuts down automatically

Even if app is finished, you can always use it as a history: open it from tasks list in Read Only mode to view all information about a task: Input project, mapping settings and Output project.