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
import os | |
import lmdb | |
import numpy as np | |
import pfm | |
from flowlib import * | |
from PIL import Image | |
def read_flow(filename): | |
""" | |
function: read flow file function |
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/python | |
import re | |
import sys | |
import matplotlib.pyplot as plt | |
TRAIN_LOSS_PATTERN = r"Iteration (\d+), loss = (\d+\.\d*)" | |
TEST_LOSS_PATTERN = r"Iteration (\d+), Testing net \(#0\)\n.*= (\d+\.\d+) loss\)\n.*= (\d+\.\d+) loss\)\n.*\n.*\n.*\n.*\n.*\n.*= (\d+\.\d+) loss\)\n.*= (\d+\.\d+) loss\)\n.*= (\d+\.\d+) loss\)\n.*= (\d+\.\d+) loss\)" | |
def main(): |
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
import caffe | |
import numpy as np | |
import flowlib as fl | |
from PIL import Image | |
def data2lmdb(imagefile1, imagefile2, labelfile): | |
# define image and ground truth file | |
imagefile1 = '' # specify 1st image file | |
imagefile2 = '' # specify 2nd image file | |
labelfile = '' # specify label file |