Giter VIP home page Giter VIP logo

bounding_box_text's Introduction

Setup

Install Python (at least 3.7) and pip

  1. https://www.python.org/downloads/

  2. python -m ensurepip --upgrade

Install the requirements from requirements.txt

pip install -r requirements.txt

Run

python3 BoundingBoxTest.py

Problem

Se da o imagine de dimensiuni width x height si un dicționar de forma {clasa1: [lista de dreptunghiuri], clasa2: [lista de dreptunghiuri], ...} cu maxim 8 clase Listele de dreptunghiuri au forma [[x1, y1, x2, y2], [x1, y1, x2, y2], ...]; dreptunghiurile se pot suprapune intre ele

In primul rand, toate perechile de dreptunghiuri (doua sau mai multe) care se suprapun si apartin aceleiasi clase trebuie trebuie unite intr+un nou dreptunghi care sa fie de arie minima si sa le contina pe toate

Apoi, pentru fiecare dreptunghi trebuie determinata pozitia din imagine x,y la care se poate afisa un text de dimensiune width_text, height_text (care afiseaza numele clasei), astfel incat textul sa fie cat mai aproape de unul din colturile dreptunghiului aferent, sa nu se afle pe perimetrul niciunui dreptunghi si daca se poate, acesta trebuie sa nici nu se afle in interiorul niciunui dreptunghi

Code

Codul dat citeste imaginea img.jpeg si lista de dreptunghiuri din bounding_boxes.json, le afiseaza pe imagine (de mai multe ori, pentru a calcula timpul de executie), apoi salveaza rezultatul in fisierul out.jpeg. Codul trebuie modificat sub linia MODIFY THIS

bounding_box_text's People

Watchers

Andrei Tenescu 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.