Giter VIP home page Giter VIP logo

jsgg's Introduction

Scene Graph Benchmark in Pytorch

(Updated) Scene Graph Benchmark

Hello! This custom repository simple builds on the excellent work of Kaihua Tang (https://github.com/KaihuaTang/Scene-Graph-Benchmark.pytorch). This repository was created as an easy way to run this particular scene graph generator in a notebook environment. The internal code has been altered quite a lot to cater to these customized needs. Specifically, new dataloaders were defined after significant changes, so that the implementation of the function 'im2scenegraph' would be possible.

The function 'im2scenegraph' provides a convenient way of using the scene graph generator on custom images. The function can be passed any custom image, and will produce a complete scene graph, along with visualizations within the same notebook. I hope it can provide a good starting point for people looking for an instant way to run the SGG repository, without all the hassle of the setup.

Base paper: Tang et al. "Unbiased Scene Graph Generation from Biased Training", CVPR 2020. (https://arxiv.org/abs/2002.11949)

Main repository: Scene Graph Benchmark in Pytorch (https://github.com/KaihuaTang/Scene-Graph-Benchmark.pytorch)

Instructions to run the code

To run the scene graph generator, you can simply download the Python Notebook file titled 'j_SGG.ipynb' (https://github.com/jaleedkhan/jSGG/blob/main/j_SGG.ipynb), upload it to Google Colab or Amazon SageMaker, and run it to completion. No need to clone this repository and do any installation separately, the notebook takes care of everything.

This repository has been built and tested on Python 3 (PyTorch 1.6 Python 3.6 GPU Optimized) kernel on a ml.g4dn.xlarge instance on Amazon Sagemaker, and also on Google Colab.

jsgg's People

Contributors

jaleedkhan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

jsgg's Issues

NoCredentialsError

NoCredentialsError Traceback (most recent call last)
in
6 #f = fs.open(f'https://cs.stanford.edu/people/rak248/VG_100K/2370463.jpg')
7 #f = fs.open(f's3://jaleed-bucket/vg/images/2316655.jpg')
----> 8 f = fs.open(f's3://jaleed-bucket/vg/images/2317213.jpg')
9 image = Image.open(f)
10 pretrained_model_path = 'upload_causal_motif_sgdet/'

20 frames
/usr/local/lib/python3.7/dist-packages/botocore/auth.py in add_auth(self, request)
405 def add_auth(self, request):
406 if self.credentials is None:
--> 407 raise NoCredentialsError()
408 datetime_now = datetime.datetime.utcnow()
409 request.context['timestamp'] = datetime_now.strftime(SIGV4_TIMESTAMP)

NoCredentialsError: Unable to locate credentials

question about SGG datasets

Hello, I want to ask how to make the scene graph generation datasets of myself? Is there a corresponding annotation tool? Thanks!

can not download the pre-trained models

hi, the code you write is exactly what I need,when I run ”j_SGG.ipynb“ on colab than i get this:

downloading pretrained models

import boto3
if os.path.isdir('upload_causal_motif_sgdet'):
print("'jSGG/upload_causal_motif_sgdet' already exists")
else:
#wget -O ucms.zip "https://onedrive.live.com/download?cid=22376FFAD72C4B64&resid=22376FFAD72C4B64%21781947&authkey=AF_EM-rkbMyT3gs"
boto3.Session().resource('s3').Bucket('jaleed-bucket').download_file('upload_causal_motif_sgdet.zip','upload_causal_motif_sgdet.zip')
!unzip upload_causal_motif_sgdet.zip -d upload_causal_motif_sgdet/


NoCredentialsError Traceback (most recent call last)
in ()
5 else:
6 #wget -O ucms.zip "https://onedrive.live.com/download?cid=22376FFAD72C4B64&resid=22376FFAD72C4B64%21781947&authkey=AF_EM-rkbMyT3gs"
----> 7 boto3.Session().resource('s3').Bucket('jaleed-bucket').download_file('upload_causal_motif_sgdet.zip','upload_causal_motif_sgdet.zip')
8 get_ipython().system('unzip upload_causal_motif_sgdet.zip -d upload_causal_motif_sgdet/')

18 frames
/usr/local/lib/python3.7/dist-packages/botocore/auth.py in add_auth(self, request)
386 def add_auth(self, request):
387 if self.credentials is None:
--> 388 raise NoCredentialsError()
389 datetime_now = datetime.datetime.utcnow()
390 request.context['timestamp'] = datetime_now.strftime(SIGV4_TIMESTAMP)

NoCredentialsError: Unable to locate credentials

the source seems unreachable , how can i solve this?

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.