Skip to main content

A MaskRCNN Keras implementation with Modanet annotations on the Paperdoll dataset

Project description

A Mask R-CNN Keras implementation with Modanet annotations on the Paperdoll dataset

Mask R-CNN with ModaNet

My bachelor's thesis project.

ModaNet

To sum it all up, I created a program that enables you to quickly train any model using fizyr's keras-maskrcnn (I spent around a month to make it work). And in particular to train it using ModaNet. ModaNet, I discovered, had its flaws, particularly on the footwear and boots. They had the bounding boxes overlap with each other. You can check them out by running maskrcnn-modanet viewimage --all-set --original With and without the "original" parameter, in parallel in two different terminal tabs/windows.

So I fixed them (although help is much appreciated to refine it).

Then I ran some tests to check the results and footwear and boots recognition were dramatically improved.

I then formulated a simple application to analyze how many shoes, or skirts, or one of the other 13 labels, are in the user's instagram account, only analyzing images in which there is only one person in the frame. More details again on the release notes for v1.0.

Below is the home screen of the program.

Usage: maskrcnn-modanet [OPTIONS] COMMAND [ARGS]...

  Main CLI.

Options:
  --help  Show this message and exit.

Commands:
  datasets        Manage your datasets run 1 -> maskrcnn-modanet datasets...
  evaluate        Evaluate any trained model, average precision and recall.
  instagram       Simple implementation to track instagram metrics per...
  processimage    View and save processed image and annotations from input...
  savedvars       Show and edit saved variables
  train           Train using the dataset downloaded usage: maskrcnn-
                  modanet...
  viewannotation  View and (not yet needed) save dataset images, plain (not...
  viewimage       View and (not yet needed) save dataset images, plain (not...


I'll be very happy to merge your pull requests that add new implementations, or link to them in a section here!

Regarding the Instagram analyzer, I started from the Instaloader classes and overrode some methods to get the urls of the posts instead of downloading them.

It then runs through the COCO model to determine the images that have only one person that is bigger than 10% of the image, and on those images I run the ModaNet model to show some statistics about what type of apparel the user is wearing and even display the instances of them, if you request it.

Say you want to quickly find what skirt (or footwear) your instagram star always wears. With this tool you can! And you can also see how often the instagram user shows himself alone in their images, and what he/she usually shares of him (always pictures with shoes? always only the top part?)

Getting Started

This project is written in Python 3, so it works in all major OSes. Although only Linux and MacOS are fully supported. Keep in mind to use pip or pip3 depending on your settings.

Clone this repo

Run pip install maskrcnn-modanet --user

Or go to the repo you just cloned on the terminal and run pip install . -e --user

If you see any errors, just install the dependencies manually, just like this: pip3 install --upgrade cython --user

Now that you've installed it, run maskrcnn-modanet datasets download the/folder/you/want/to/put/data/in

It will take a while, about 40GB to download! EDIT: it is now reduced to just 2-3 GB. See the release notes for v1.0 for details on this and on the instagram application.

Then you can explore its features and commands by running maskrcnn-modanet

Prerequisites

Install Python and Keras

Install Git LFS (Large File Storage) to get all the files!

Built With

Contributing

The following is a copy of PurpleBooth

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

For the versions available, see the releases on this repository.

Authors

  • Pier Carlo Cadoppi - Initial work

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • Hat tip to anyone whose code was used
  • Inspiration
  • etc lol

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

maskrcnn-modanet-0.1.tar.gz (27.0 kB view details)

Uploaded Source

Built Distributions

maskrcnn_modanet-1.0.1-py3-none-any.whl (32.1 kB view details)

Uploaded Python 3

maskrcnn_modanet-0.1-py3-none-any.whl (31.9 kB view details)

Uploaded Python 3

File details

Details for the file maskrcnn-modanet-0.1.tar.gz.

File metadata

  • Download URL: maskrcnn-modanet-0.1.tar.gz
  • Upload date:
  • Size: 27.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for maskrcnn-modanet-0.1.tar.gz
Algorithm Hash digest
SHA256 f73d9222c40632ceefe2223737b669334cc9049ea7899cd787b4daa3e784f5e7
MD5 6e864f9f4a6d0820815fc30869ac32a7
BLAKE2b-256 b0910ce7b75bc7838b6f5f8318c310cafc8a26e7207dc029ed8cd235b2aa8237

See more details on using hashes here.

File details

Details for the file maskrcnn_modanet-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: maskrcnn_modanet-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 32.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for maskrcnn_modanet-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a9a10579335566869d1583f234e1ba7f5f4a2a9a1da7e7e6321affe45050981c
MD5 103dd6610b76a4e086d5fcd9a85cea44
BLAKE2b-256 8045992b37243535afa11818627bdabcd46bccbb33f7399679b95d91a169fd33

See more details on using hashes here.

File details

Details for the file maskrcnn_modanet-0.1-py3-none-any.whl.

File metadata

  • Download URL: maskrcnn_modanet-0.1-py3-none-any.whl
  • Upload date:
  • Size: 31.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for maskrcnn_modanet-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 31b346d0322b453e8988f146ea055936607bd86f10806df6d1ba558d57979f82
MD5 e0dd29e3c9f1edaf559239322cc03f51
BLAKE2b-256 b1ef8d3504ccbdf6bf23114cd6def9ca644f618e749b80228644f98b72bd7cdc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page