In [1]:
%pylab
import json
from bubbly.extractors import RGBExtractor
In [5]:
data = json.load(open('../models/benchmark_scores.json'))
ind = np.argsort(data['off_score'])[::-1]
In [6]:
ex = RGBExtractor()
ex.shp = (200, 200)
In [12]:
def _ex(param):
r1 = ex.extract(*param)
p2 = list(param)
p2[-1] *= 2
r2 = ex.extract(*p2)
return np.hstack((r1, r2))
hard_off = [_ex(data['off'][i]) for i in ind[:100]]
collage = np.vstack(np.hstack(hard_off[i:i+10]) for i in range(0, len(hard_off), 10))
figure(figsize=(12, 12), dpi=200)
imshow(collage, origin='upper')
Out[12]:
In [19]:
hist(data['off_score'], histtype='step', color='r', label='Negative')
hist(data['on_score'], histtype='step', color='g', label='Positive')
legend()
yscale('log')
In [ ]: