In [1]:
import pandas as pd
import numpy as np
import glob, os
from utils import *
from augment import *
import seaborn as sns
import matplotlib.pyplot as plt
import cPickle
sns.set_style("whitegrid")
%matplotlib inline
label_numbers = {"Button":0, "Icon":1, "Image":2, "Input field":3, "Line":4, "Text":5, "Navigation Menu":6}
number_label = {0:"Button", 1:"Icon", 2:"Image", 3:"Input field", 4:"Line", 5:"Text", 6: "Navigation Menu"}
In [2]:
#df = read_txts_and_combine() #uncomment if you want to reread all .txt logs into one .csv
df = pd.read_csv("img_labeled/logs/log_all.csv")
df.head()
Out[2]:
In [3]:
print "Number of labeled webpages: %i"%(len(df.groupby("filename")))
print "Number of labels: %i"%(len(df))
In [4]:
print "Number of labels per category:"
print df.groupby("label").count().id
In [5]:
df.groupby("label").count().id.plot(kind="bar")#, color=sns.color_palette()[0])
Out[5]:
In [6]:
#only take the labels for which we have at least 100 entries
df = filter_top_100(df)
print("%i labels left"%len(df))
In [7]:
#pickle_images("img_labeled/logs/", df)
In [8]:
In [ ]:
In [ ]:
In [11]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]: