Giter Club home page Giter Club logo

deeper_reltr's Introduction

Deeper_RelTR

Part of LLMETA project, we implement Relation Transformer which can classify even deeper. LLMETA project is for metadata extraction from text (research paper), also in image too. But, as you can see, we didn't extract any metadata like file size or things like that we normally know about.

We propose a new metadata for image as scene graph, which can use various research field. But, our RelTR-based model can classify human emotions, age, races and also various breeds based on ImageNet classes. More details can be found in our brief paper.

Network of Deeper RelTR Model

1. Installation

Download Deeper_RelTR Repo with:

git clone https://github.com/KBH00/Deeper_RelTR.git
cd Deeper_RelTR

For Inference

# create a conda environment
conda create -n drm python=3.11
conda activate drm
# install packages
# for windows
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121conda install matplotlib

# for linux
pip3 install torch torchvision torchaudio
# other pakages
pip install deepface
pip install tf-keras
pip install transformers
pip install scipy
pip install matplotlib

Or you can use environment.yml or requirements.txt

conda env create --file environment.yml
pip install -r requirements.txt

2. Usage

Inference

a) Download RelTR model pretrained on the Visual Genome dataset and put it under

ckpt/checkpoint0149.pth

b) Infer the relationships in an image with the command:

python img_inference.py --img_path $IMAGE_PATH --resume $MODEL_PATH 

We attached some images from internet. You can also test with your customized image.

3. Examples

you can see the results that can classify man to 22 year old happy latino man.

also even in animal breeds, but sometimes the accuracy of human emotions is lower than expected. which can turn on or off from our system.

4. Table

label RelTR Ours
Human 12 504
Animal 10 347
Others 4 18

number of classifiable labels

Method R@50(V6) R@50(V6+detailed)
RelTR 71.66 28.41
Ours 73.52 54.85

Comparsion on V6 and detailed test set

References

https://github.com/yrcong/RelTR

https://github.com/serengil/deepface

deeper_reltr's People

Contributors

kbh00 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.