Coder Social home page Coder Social logo

coco_yolov4c's Introduction

COCO_YOLOv4c

MS COCO ground truth preparation for YOLOv4c training and validation.

The problem

The original MS COCO dataset annotations include coordinates of rectangular bounding boxes as well as polygons (masks) for instance segmentation task for every object. For training YOLOv4c we need to enclose the instances of the objects into ellipses instead of the rectangles. The ellipses are parameterized in terms of the rectangles that enclose them. Thus, the original bounding boxes is not a correct way of training and testing the model, and in the current project we attempt to transform masks into more suitable bounding boxes.

The solution

To simplify the problem, we decided to generate square bounding boxes from the masks. To do this, we fitted a minimum enclosing circle for masks of each instance of the objects. In some cases, the objects were occluded, and the instances contained more than one mask. For this case, a Convex Hull algorithm was applied to the masks of that instance, and the circle was fitter to the resulting polygon.

The idea of the proposed solution is shown in the image below. The blue bounding box is the original rectangular bounding box from the COCO dataset. The white countour is the mask for that instance of the object. The red is the generated bounding box corresponding to the circular bounding box that encloses the object.

The results

The comparison between the original bounding boxes and the bounding boxes after the transformation is shown in the images below. In most of the cases, these bounding boxes are more suitable for training and validation of YOLOv4c compared to the original ones. However, better results could be achieved if the data was labeled with ellipses or circles by hand.

coco_yolov4c's People

Contributors

fastovetsilya avatar

Watchers

 avatar

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.