Coder Social home page Coder Social logo

dsabarinathan / attribute-recognition Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 0.0 35 KB

This repository contains a PyTorch implementation of a person attribute recognition model. The model has been trained to recognize various attributes such as age, gender, hair length, upper body features, lower body features, and accessories.

License: MIT License

Python 100.00%

attribute-recognition's Introduction

Person Attribute Recognition with Deep Learning

License: GPL By

Star History

Star History Chart

Overview

This repository contains a PyTorch implementation of a person attribute recognition model. The model has been trained to recognize various attributes such as age, gender, hair length, upper body features, lower body features, and accessories.

Pre-trained model

Model ROC AUC F1 Score Model Type
Resnet 18 0.9221371 0.910283516 Pytorch
Resnet 30 0.94394 0.943229 Pytorch

Model Details

The model is trained to recognize the following attributes:

  • Age

    • Young
    • Adult
    • Old
  • Gender

    • Female
  • Hair Length

    • Short
    • Long
    • Bald
  • Upper Body Features

    • Length
      • Short
    • Color
      • Black
      • Blue
      • Brown
      • Green
      • Grey
      • Orange
      • Pink
      • Purple
      • Red
      • White
      • Yellow
      • Other
  • Lower Body Features

    • Length
      • Short
    • Color
      • Black
      • Blue
      • Brown
      • Green
      • Grey
      • Orange
      • Pink
      • Purple
      • Red
      • White
      • Yellow
      • Other
    • Type
      • Trousers & Shorts
      • Skirt & Dress
  • Accessories

    • Backpack
    • Bag
    • Glasses
      • Normal
      • Sun
    • Hat

Usage

1. Installation

Clone the repository and navigate to the project directory:

git clone https://github.com/dsabarinathan/attribute-recognition.git
cd attribute-recognition

2. Download Pre-trained Model

Download the pre-trained model weights file from the releases section of this repository and place it in the models/ directory.

The pre-trained model weights can be downloaded from Google Drive. Download Model

3. Install Dependencies

Install the required Python packages:

pip install -r requirements.txt

4. Run Inference

Use the provided script to perform attribute recognition on an input image:

python inference.py --image_path path/to/your/image.jpg

Replace path/to/your/image.jpg with the path to the image you want to analyze.

5. Sample Results:

Input image:

0028_c3s1_002001_02

Output:

Predicted results: {'labels': array(['Age-Adult', 'Gender-Female', 'LowerBody-Color-Black',
       'LowerBody-Type-Trousers&Shorts'], dtype='<U30'), 'prob': array([0.64786081, 0.61053316, 0.63944295, 0.85024354])}

Contributing

We welcome contributions! If you find any issues or have suggestions for improvements, please create an issue or submit a pull request.

License

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

attribute-recognition's People

Contributors

dsabarinathan avatar

Stargazers

firzaich avatar Shashank G. Sharma avatar Ryan Burnsworth avatar  avatar sabari avatar Jaemin Noh avatar

Watchers

Kostas Georgiou avatar  avatar

attribute-recognition's Issues

Train script

Can you provide some information like Dataset and how did you train

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.