home.html
HTML document, ASCII text
1
{% extends "default.html" %}
2
{% block title %}Home | {{ site_name }}{% endblock %}
3
{% block content %}
4
<x-frame style="--width: 768px">
5
<h1>{{ site_name }}</h1>
6
<p>
7
Free/libre/open image data for machine learning, computer vision, data science, research, and more.
8
</p>
9
<p>Some actions you can do:</p>
10
<ul>
11
<li><a href="/upload">Upload a picture (but you must log in first)</a></li>
12
<li><a href="/object/">List of objects</a></li>
13
<li><a href="/query-pictures">Query the dataset</a></li>
14
</ul>
15
<h2>Random pictures</h2>
16
<ul class="thumbnail-list">
17
{% for resource in resources %}
18
<li>
19
<a href="/picture/{{ resource.id }}">
20
<div class="annotation-zone">
21
<img src="/raw/picture/{{ resource.id }}" alt="{{ resource.title }}">
22
{% for region in resource.regions %}
23
{% if region.json.type == "bbox" %}
24
<svg class="shape-container" viewBox="0 0 {{ resource.width }} {{ resource.height }}">
25
<rect x="{{ region.json.shape.x * resource.width }}"
26
y="{{ region.json.shape.y * resource.height }}"
27
width="{{ region.json.shape.w * resource.width }}"
28
height="{{ region.json.shape.h * resource.height }}"
29
fill="none" class="shape-bbox shape"
30
></rect>
31
</svg>
32
{% elif region.json.type == "polygon" %}
33
<svg class="shape-container" viewBox="0 0 {{ resource.width }} {{ resource.height }}">
34
<polygon points="{% for point in region.json.shape %}{{ point.x * resource.width }},{{ point.y * resource.height }} {% endfor %}" fill="none" class="shape-polygon shape"></polygon>
35
</svg>
36
{% elif region.json.type == "polyline" %}
37
<svg class="shape-container" viewBox="0 0 {{ resource.width }} {{ resource.height }}">
38
<polyline points="{% for point in region.json.shape %}{{ point.x * resource.width }},{{ point.y * resource.height }} {% endfor %}" fill="none" class="shape-polyline shape"></polyline>
39
</svg>
40
{% elif region.json.type == "point" %}
41
<svg class="shape-container" viewBox="0 0 {{ resource.width }} {{ resource.height }}">
42
<circle cx="{{ region.json.shape.x * resource.width }}" cy="{{ region.json.shape.y * resource.height }}" r="0" fill="none" class="shape-point shape"></circle>
43
</svg>
44
{% endif %}
45
{% endfor %}
46
</div>
47
<div class="list-detail">
48
{{ resource.title }}
49
</div>
50
</a>
51
</li>
52
{% endfor %}
53
</ul>
54
</x-frame>
55
{% endblock %}