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