Coder Social home page Coder Social logo

micco00x / py-pascalpart Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 2.0 3 KB

Py-PascalPart is a simple tool to read annotations files from PASCAL-Part Dataset in Python. It has been developed as final project for the module Human-Objects Relations of Elective in AI (Spring 2018) at Sapienza University of Rome.

Python 100.00%
pascal-voc pascal-part datasets

py-pascalpart's Introduction

Py-PascalPart

Py-PascalPart is a simple tool to read annotations files from PASCAL-Part Dataset in Python, giving an easy access to 10103 images, 24971 object masks and 181770 body parts.

Repository and Datasets

Clone the repository and download the PASCAL-VOC 2010 and the PASCAL-Part Datasets if you don't have them on your computer:

git clone https://github.com/micco00x/py-pascalpart
mkdir datasets
cd datasets
wget http://www.stat.ucla.edu/~xianjie.chen/pascal_part_dataset/trainval.tar.gz
wget http://host.robots.ox.ac.uk/pascal/VOC/voc2010/VOCtrainval_03-May-2010.tar
tar -zxvf trainval.tar.gz
tar -zxvf VOCtrainval_03-May-2010.tar
rm VOCtrainval_03-May-2010.tar
rm trainval.tar.gz

Explore the dataset:

python3 explore_dataset.py

Explore the dataset specifying a different path for PASCAL-Part Dataset annotation folder and PASCAL VOC 2010 JPEG images folder:

python3 explore_dataset.py --annotation_folder=PATH_TO_ANNOTATIONS --images_folder=PATH_TO_IMAGES

Note that utils.load_annotations(path) returns a dictionary containing all the information stored in the .mat file specified by path. See explore_dataset.py for a typical example of usage. More in detail, once the annotation file has been loaded:

  • annotations["objects"] is a list of objects contained in the image
  • obj["mask"] is the mask of the object
  • obj["class"] is the class of the object
  • obj["parts"] is a list of body parts
  • body_part["mask"]is the mask of the body part
  • body_part["part_name"] is the class of the body part

with obj element of annotations["objects"] and body_part element of obj["parts"].

py-pascalpart's People

Contributors

micco00x avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

py-pascalpart's Issues

COCO transform

Hello,

Very nice and useful repo! Are you aware if there is any code to transform these annotations to COCO format?

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.