Skip to content

Commit

Permalink
add model layer tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
mschrimpf committed Oct 3, 2018
1 parent 5c21485 commit 3c22343
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 804 deletions.
7 changes: 5 additions & 2 deletions benchmarks/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ class CandidateModel(models.Model):
name = models.CharField(max_length=200)
brain_score = models.FloatField()
imagenet_top1 = models.FloatField()
v4 = models.FloatField()
it = models.FloatField()
V4 = models.FloatField()
IT = models.FloatField()
behavior = models.FloatField()
V4_layer = models.CharField(max_length=500, default=None)
IT_layer = models.CharField(max_length=500, default=None)
behavior_layer = models.CharField(max_length=500, default=None)
paper_link = models.CharField(max_length=200)
paper_identifier = models.CharField(max_length=200)

Expand Down
13 changes: 7 additions & 6 deletions benchmarks/templates/benchmarks/table.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<th class="rotate"><p><strong>V4</strong>: <a href="http://www.jneurosci.org/content/35/39/13402.short">dicarlo.Majaj2015</a></p></th>
<th class="rotate"><p><strong>IT</strong>: <a href="http://www.jneurosci.org/content/35/39/13402.short">dicarlo.Majaj2015</a></p></th>
<th class="rotate"><p><strong>Behavior</strong>: <a href="https://www.biorxiv.org/content/early/2018/02/12/240614">dicarlo.Raja...2018</a></p></th>
<th class="rotate"><p><strong>Performance</strong>: <a href="https://ieeexplore.ieee.org/abstract/document/5206848/">Imagenet2012</a></p></th>
<th class="rotate"><p><strong>Classification</strong>: <a href="https://ieeexplore.ieee.org/abstract/document/5206848/">Imagenet2012</a></p></th>
</tr>
<!-- data -->
<tr>
Expand All @@ -19,8 +19,8 @@
<td class="score_cell" style="background-color: {{data.brain_score_color}}">{{data.brain_score}}</td>
<td class="score_cell" style="background-color:#e0e1e2"></td>
<td class="score_cell" style="background-color:#e0e1e2"></td>
<td class="score_cell" style="background-color:{{data.v4_color}}">{{data.v4}}</td>
<td class="score_cell" style="background-color:{{data.it_color}}">{{data.it}}</td>
<td class="score_cell" style="background-color:{{data.V4_color}}">{{data.V4}}</td>
<td class="score_cell" style="background-color:{{data.IT_color}}">{{data.IT}}</td>
<td class="score_cell" style="background-color:{{data.behavior_color}}">{{data.behavior}}</td>
<td class="score_cell" style="background-color:{{data.imagenet_top1_color}}">{{data.imagenet_top1}}</td>
</tr>
Expand All @@ -34,9 +34,9 @@
<td class="score_cell" style="background-color:{{model.brain_score_color}}">{{model.brain_score}}</td>
<td class="score_cell" style="background-color:#e0e1e2"></td>
<td class="score_cell" style="background-color:#e0e1e2"></td>
<td class="score_cell" style="background-color:{{model.v4_color}}">{{model.v4}}</td>
<td class="score_cell" style="background-color:{{model.it_color}}">{{model.it}}</td>
<td class="score_cell" style="background-color:{{model.behavior_color}}">{{model.behavior}}</td>
<td title="{{model.V4_layer}}" class="score_cell" style="background-color:{{model.V4_color}}">{{model.V4}}</td>
<td title="{{model.IT_layer}}" class="score_cell" style="background-color:{{model.IT_color}}">{{model.IT}}</td>
<td title="{{model.behavior_layer}}" class="score_cell" style="background-color:{{model.behavior_color}}">{{model.behavior}}</td>
<td class="score_cell" style="background-color:{{model.imagenet_top1_color}}">{{model.imagenet_top1}}</td>
</tr>
{% endfor %}
Expand All @@ -45,6 +45,7 @@

Model scores on brain benchmarks.
The more green and bright a cell, the better the model's score.
Hover over cells to see the model layer.
Scores are un-ceiled, but ceiling is factored into the coloring.

{% else %}
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/views/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def view(request):
is_ie = _is_ie(user_agent)
models = CandidateModel.objects.order_by('-brain_score')
data = {}
for field in ['brain_score', 'v4', 'it', 'behavior', 'imagenet_top1']:
for field in ['brain_score', 'V4', 'IT', 'behavior', 'imagenet_top1']:
ceiling = ceilings[field] if field in ceilings else None
values = [getattr(model, field) for model in models]
min_value, max_value = min(values), max(values)
Expand Down
Loading

0 comments on commit 3c22343

Please sign in to comment.