Skip to content

Instantly share code, notes, and snippets.

View ronghanghu's full-sized avatar

Ronghang Hu ronghanghu

View GitHub Profile

Call For Papers — ACL 2020 Workshop on Advances in Language and Vision Research (ALVR)

Workshop Website: http://alvr-workshop.github.io

Overview

Language and vision research has attracted great attention from both natural language processing (NLP) and computer vision (CV) researchers. Gradually, this area is shifting from passive perception, templated language, and synthetic imagery/environments to active perception, natural language, and photo-realistic simulation or real world deployment. Thus far, few workshops on language and vision research have been organized by groups from the NLP community. We propose the first workshop on Advances in Language and Vision Research (ALVR) in order to promote the frontier of language and vision research and to bring interested researchers together to discuss how to best tackle and solve real-world problems in this area.

This workshop covers (but is not limited to) the following topics:

  • New tasks and datasets that provide real-world solutions in the intersection o
@ronghanghu
ronghanghu / textvqa_eval.py
Created October 10, 2019 20:28
An offline evaluation script for TextVQA https://textvqa.org/
import json
import re
class EvalAIAnswerProcessor:
"""
Processes an answer similar to Eval AI
copied from
https://github.com/facebookresearch/pythia/blob/c46b3b3391275b4181567db80943473a89ab98ab/pythia/tasks/processors.py#L897
"""
@ronghanghu
ronghanghu / The Technical Interview Cheat Sheet.md
Created April 19, 2019 22:44 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
import matplotlib.pyplot as plt
import os.path as osp
import numpy as np
angle_inc = np.pi / 6.
def print_bbox(bbox):
x1, y1, x2, y2 = bbox
plt.plot([x1, x2, x2, x1, x1], [y1, y1, y2, y2, y1], 'r-')
@ronghanghu
ronghanghu / trajectory_visualization_v2.ipynb
Last active June 11, 2024 18:29
Speaker-Follower visualization
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ronghanghu
ronghanghu / train_clevr.py
Last active May 1, 2018 02:46
CLEVR train
import tensorflow as tf
from glob import glob
import numpy as np
sess = tf.Session(config=tf.ConfigProto(
gpu_options=tf.GPUOptions(allow_growth=True)))
N = 100 # batch_size
@ronghanghu
ronghanghu / visualize_vqa.ipynb
Created August 15, 2017 16:19
Visualize VQA attentions
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ronghanghu
ronghanghu / laser_test.py
Created August 14, 2017 16:53
ImageNET 22k Laser test
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import numpy as np
import logging
import os
import cv2
from laser.client.py import LaserClient, Options
#!/usr/bin/env python2
import json
import sys
with open(sys.argv[1]) as data_file, \
open("ids.txt", "w") as id_file, \
open("questions.txt", "w") as question_file:
data = json.load(data_file)
questions = data["questions"]
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcuda.so locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcurand.so locally
WARNING:tensorflow:<tensorflow.python.ops.rnn_cell.BasicLSTMCell object at 0x7fe3fc03dd10>: Using a concatenated state is slower and will soon be deprecated. Use state_is_tuple=True.
I tensorflow/core/common_runtime/gpu/gpu_init.cc:102] Found device 0 with properties:
name: Tesla K40c
major: 3 minor: 5 memoryClockRate (GHz) 0.745
pciBusID 0000:88:00.0