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