GithubHelp home page GithubHelp logo

supervisely-ecosystem / convert-class-shape Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 1.0 1.17 MB

Convert class shapes: polygons to rectangles, bitmaps to polygons and others transformations

Home Page: https://supervise.ly/

Python 55.41% HTML 44.59%
computer-vision class-management data-transformation

convert-class-shape's Introduction

Convert Class Shape

Overview โ€ข How To Run

GitHub release (latest SemVer) views runs

Overview

It is often needed to convert labeled objects from one geometry to another while doing computer vision reseach. There are huge number of scenarios , here are some examples:

  • you labeled data with polygons to train semantic segmentation model, and then you decided to try detection model. Therefore you have to convert your labels from polygons to rectangles (bounding boxes)
  • or you applied neural network to images and it produced pre-annotations as bitmaps (masks). Then you want to transform them to polygons for manual correction.

This app covers following transformations:

  • from Bitmap to Polygon, Rectangle and AnyShape
  • from Polygon to Rectangle, Bitmap and AnyShape
  • from Polyline to Rectangle, Bitmap, Polygon, AnyShape
  • from Rectangle to Polygon, Bitmap and AnyShape
  • from Graph (i.e. Keypoints) to Rectangle and AnyShape
  • from Point to AnyShape
  • Cuboid, Cuboid3d, Pointcloud (segmentation of point clouds), Point3d are not supported yet (send us a feature request if you need it)

Notes:

  • Result project name = original name + "(new shapes)" suffix
  • Your data is safe: app creates new project with modified classes and objects. The original project remains unchanged
  • Before converting AnyShape classes, you have to unpack it with another app - Unpack Anyshape
  • Colors of new classes will be generated randomly
  • Note: transformation from raster (bitmap) to vector (polygon) will result in huge number of points. App performs approximation to reduce the number. That can lead to slight loss of accuracy at borders. Special settings to control approximation will be released in next version.

How To Run

Step 1: Run from context menu of project

Go to "Context Menu" (images project) -> "Run App" -> "Transform" -> "Convert Class Shape"

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 transformations

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 + "(new shapes)" 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 check Input project, list of applied transformations and Output project.

convert-class-shape's People

Contributors

almazgimaev avatar cxnt avatar max-supervisely avatar mkolomeychenko avatar nikolaipetukhov avatar peixed351 avatar tdionis avatar valeriyavorozhko avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

michelangelo367

convert-class-shape's Issues

How to convert class type of 'any' to a rectangle on the app in the website?

Hi Guys,
Thanks for the great work ๐Ÿ‘
I have a small dataset that I labelled using Supervise.ly. This dataset consists of different cones, now because in some images the cones were too pixelated to label them as bitmap we had created bounding boxes for such pixelated cones and the rest of the clearly visible cones were labelled using the magic tool and hence label type was bitmap. Now due to some reasons we decided to change all labels to BBoxes. So I came across this app 'convert-class-shape' on the website and I tried to run the app on my dataset. But because we wanted the flexibility of labelling an object as Rectangle or Bitmap, I had set the class label types as 'any' and now when I run the app, the drop down list is not available for this class type 'any' (See Image). Can you please help me with this issue and guide me what would be a good way to get this done?

convert_class_issue

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.