This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A yaml constructor is for loading from a yaml node. | |
# This is taken from @misha 's answer: http://stackoverflow.com/a/15942429 | |
def opencv_matrix_constructor(loader, node): | |
mapping = loader.construct_mapping(node, deep=True) | |
mat = np.array(mapping["data"]) | |
mat.resize(mapping["rows"], mapping["cols"]) | |
return mat | |
yaml.add_constructor(u"tag:yaml.org,2002:opencv-matrix", opencv_matrix_constructor) | |
# A yaml representer is for dumping structs into a yaml node. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The network is used for the video description experiments of S2VT [1]. | |
# Please consider citing S2VT [1] if you use this example in your work. | |
# | |
# [1] S. Venugopalan, M. Rohrbach, J. Donahue, R. Mooney, T. Darrell, | |
# K. Saenko. "Sequence to Sequence - Video to Text." ICCV 2015. | |
# The data is prepared using framefc7_stream_text_to_hdf5.py | |
# It is in (32) parallel streams. | |
name: "s2vt" | |
layer { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
"""Minimal python commad line.""" | |
import sys | |
import argparse | |
import logging |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import matplotlib.pyplot as plt | |
import Image | |
img = Image.open('truman-stairs.jpg') | |
fig, ax = plt.subplots(figsize=(12,12)) | |
ax.imshow(img, aspect='equal') | |
ax.add_patch( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################################# | |
# Authors: Keiller Nogueira, Victor de Melo | |
################################################################################# | |
# nvidia-docker seems more stable now and several images are starting to adopt it (including | |
# [kaixhin](https://github.com/NVIDIA/nvidia-docker/issues/85). | |
# hence, we suggest to use it instead, as it solves a few issues with gpu passthrough. | |
# usage: it is only required when creating a container, i.e, with `run` and related arguments | |
# you're not required to provide $DOCKER_NVIDIA_DEVICES as it will find the devices itself |
NewerOlder