Skip to content

Commit 9a415d1

Browse files
hlomziknik
authored andcommitted
feat: DEV-2636: Dynamic Labels templates (#2527)
* Add 5 new templates for Dynamic Labels ASR Hypotheses Inventory Tracking SERP Ranking Text-to-Image Generation Visual Genome * remove tabs from config templates * Change templates structure * Fixed images - recreate, 2x for retina, compression * Fix Inventory Tracking and Text-to-Image tpls - fix Inventory Tracking according to image - fix Text-to-Image category Co-authored-by: nik <[email protected]>
1 parent fa61ea8 commit 9a415d1

File tree

10 files changed

+282
-0
lines changed

10 files changed

+282
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
title: Inventory Tracking
2+
type: community
3+
group: Computer Vision
4+
image: /static/templates/inventory-tracking.png
5+
details: <h1>Label exact products on the shelves</h1>
6+
config: |
7+
<View>
8+
<View style="display:flex;justify-content:center">
9+
<PolygonLabels name="objects" toName="image" value="$objects"/>
10+
</View>
11+
<Image name="image" value="$image"/>
12+
</View>
13+
<!-- {
14+
"data": {
15+
"image": "https://htx-pub.s3.amazonaws.com/templates/inventory-tracking/shelf.jpeg",
16+
"objects": [{
17+
"value": "CocaCola",
18+
"html": "<img width='100' src='https://htx-pub.s3.amazonaws.com/templates/inventory-tracking/cocacola.png'/>"
19+
}, {
20+
"value": "RedBull",
21+
"html": "<img width='100' src='https://htx-pub.s3.amazonaws.com/templates/inventory-tracking/redbull.png'/>"
22+
}, {
23+
"value": "Burn",
24+
"html": "<img width='100' src='https://htx-pub.s3.amazonaws.com/templates/inventory-tracking/burn.png'/>"
25+
}, {
26+
"value": "Breezer",
27+
"html": "<img width='100' src='https://htx-pub.s3.amazonaws.com/templates/inventory-tracking/breezer.png'/>"
28+
}, {
29+
"value": "Monster",
30+
"html": "<img width='100' src='https://htx-pub.s3.amazonaws.com/templates/inventory-tracking/monster.png'/>"
31+
}]
32+
}
33+
} -->
34+
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
title: Visual Genome
2+
type: community
3+
group: Computer Vision
4+
image: /static/templates/visual-genome.png
5+
details: <h1>Label different described features</h1>
6+
config: |
7+
<View>
8+
<View style="display: flex; flex-wrap: wrap;">
9+
<View className="label-column">
10+
<Header value="Regions"/>
11+
<RectangleLabels name="regions" toName="image" value="$regions"/>
12+
</View>
13+
<View className="label-column">
14+
<Header value="Attributes"/>
15+
<RectangleLabels name="attributes" toName="image" value="$attributes"/>
16+
</View>
17+
<View className="label-column">
18+
<Header value="Relationships"/>
19+
<RectangleLabels name="relationships" toName="image" value="$relationships"/>
20+
</View>
21+
22+
</View>
23+
<Image name="image" value="$image"/>
24+
<Style>
25+
.label-column .lsf-labels {
26+
display: flex;
27+
flex-direction: column;
28+
align-items: flex-start;
29+
}
30+
</Style>
31+
</View>
32+
<!-- { "data": {
33+
"image": "https://htx-pub.s3.amazonaws.com/templates/visual-genome/panda.jpeg",
34+
"regions": [{
35+
"value": "panda bear holding something in it's paw"
36+
}, {
37+
"value": "trees behind the panda out of focus"
38+
}, {
39+
"value": "piece of bamboo in panda's paw"
40+
}, {
41+
"value": "bamboo next to panda"
42+
}, {
43+
"value": "the panda is cute"
44+
}],
45+
"attributes": [{
46+
"value": "markings is black"
47+
}, {
48+
"value": "nose is black"
49+
}, {
50+
"value": "face is round"
51+
}, {
52+
"value": "wood is round"
53+
}],
54+
"relationships": [{
55+
"value": "hole ON log"
56+
}, {
57+
"value": "tree BEHIND bear"
58+
}, {
59+
"value": "mouth OF panda"
60+
}]
61+
}}-->
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
title: ASR Hypotheses Selection
2+
type: community
3+
group: Ranking & Scoring
4+
image: /static/templates/asr-hypotheses.png
5+
details: <h1>Choose the most accurate Automatic Speach Recognition (ASR) hypothese</h1>
6+
config: |
7+
<View>
8+
<Audio name="audio" value="$audio"/>
9+
<Choices name="transcriptions" toName="audio" value="$transcriptions" selection="highlight"/>
10+
</View>
11+
<!-- { "data": {
12+
"audio": "https://htx-pub.s3.amazonaws.com/datasets/audio/f2btrop6.0.wav",
13+
"transcriptions": [{
14+
"style": "padding-left: 5px; box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px; background-color: #FFFFFF",
15+
"value": "potrostith points out that if school based clinics were established parental permission would be required for students to receive each service offered"
16+
}, {
17+
"style": "padding-left: 5px; box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px; background-color: #F8F8F8",
18+
"value": "potrostith points out that if school-based clinics were established parental permission would be required for students to receive each service offered"
19+
}, {
20+
"style": "padding-left: 5px; box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px; background-color: #F5F5F5",
21+
"value": "purporting points out that if school based clinics were established parental permission would be required for students to receive each service offered"
22+
}, {
23+
"style": "padding-left: 5px; box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px; background-color: #F0F0F0",
24+
"value": "pork roasted points out that if school based clinics were establish parental permission would be required for students to receive each service offered"
25+
}, {
26+
"style": "padding-left: 5px; box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px; background-color: #E8E8E8",
27+
"value": "purpose it points out that if school based clinics war establish parental permission would be required for students to receive each service offered"
28+
}]
29+
}} -->
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
title: Search Page Ranking
2+
type: community
3+
group: Ranking & Scoring
4+
image: /static/templates/serp-ranking.png
5+
details: <h1>Rank different kinds of results by given search query</h1>
6+
config: |
7+
<View>
8+
<View style="margin:5px; width:575px; border-radius:30px; border:1px solid #dcdcdc; height:45px; width:500px; font-size:16px; display: flex; justify-content: center; padding: 8px; outline: none; background-image: url('https://htx-pub.s3.amazonaws.com/samples/google-search-magnifying-glass-icon-5.jpeg'); background-position: left center; background-size: 24px; background-repeat: no-repeat; background-origin: content-box; ">
9+
<Text name="text" value="$text"/>
10+
</View>
11+
<View className="dynamic_choices">
12+
<Choices name="dynamic_choices" toName="text" selection="checkbox" value="$options" layout="vertical" choice="multiple" allownested="true"/>
13+
</View>
14+
<View style="box-shadow: 2px 2px 5px #999; padding: 20px; margin-top: 1em; border-radius: 5px;">
15+
<Header value="Search Quality"/>
16+
<Rating name="relevance" toName="text"/>
17+
</View>
18+
<View style="box-shadow: 2px 2px 5px #999; padding: 15px 5px 10px 20px; margin-top: 1.5em; margin-bottom: 1.25em; border-radius: 5px; display: flex; align-items: center;">
19+
<Header value="Labeling Confidence" style="font-size: 1.25em"/>
20+
<View style="margin: 0 1em 0.5em 1.5em">
21+
<Choices name="confidence" toName="text" choice="single" showInLine="true">
22+
<Choice value="Low" html="&lt;img width='40' src='https://www.iconsdb.com/icons/preview/green/thumbs-up-xxl.png'/&gt;"/>
23+
<Choice value="High" html="&lt;img width='40' src='https://www.iconsdb.com/icons/preview/red/thumbs-down-xxl.png'/&gt;"/>
24+
</Choices>
25+
</View>
26+
</View>
27+
<Style>
28+
.searchresultsarea {
29+
margin-left: 10px;
30+
font-family: 'Arial';
31+
}
32+
.searchresult {
33+
margin-left: 8px;
34+
}
35+
.searchresult h2 {
36+
font-size: 19px;
37+
line-height: 18px;
38+
font-weight: normal;
39+
color: rgb(29, 1, 189);
40+
margin-bottom: 0px;
41+
margin-top: 25px;
42+
}
43+
.searchresult a {
44+
font-size: 14px;
45+
line-height: 14px;
46+
color: green;
47+
margin-bottom: 0px;
48+
}
49+
.searchresult button {
50+
font-size: 10px;
51+
line-height: 14px;
52+
color: green;
53+
margin-bottom: 0px;
54+
padding: 0px;
55+
border-width: 0px;
56+
background-color: white;
57+
}
58+
</Style>
59+
</View>
60+
<!-- {
61+
"data": {
62+
"text": "Which is the biggest black hole in the universe?",
63+
"options": [
64+
{
65+
"value": "Wikipedia page",
66+
"html": "<div id=\"searchresultsarea\"><div class=\"searchresult\"><h2>Lock (computer science) - Wikipedia</h2><a>https://en.wikipedia.org/wiki/Lock_(computer_science)</a> <p>In computer science, a lock or mutex (from mutual exclusion) is a synchronization mechanism for enforcing limits on access to a resource in an environment where there are many threads of execution.</p></div>"
67+
},
68+
{
69+
"value": "Wikipedia page",
70+
"html": "<a href='https://en.wikipedia.org/wiki/List_of_most_massive_black_holes' target='_blank'>List of most massive black holes - Wikipedia</a>"
71+
}, {
72+
"value": "People also ask",
73+
"html": "<p style='font-size: 14px'>People also ask</p>",
74+
"children": [
75+
{
76+
"value": "Which is bigger universe or black hole?",
77+
"selected": true,
78+
"hotkey": "q"
79+
},
80+
{
81+
"value": "What is the biggest a black hole can get?"
82+
},
83+
{
84+
"value": "What is the biggest a black hole can get?"
85+
},
86+
{
87+
"value": "What is bigger Uy scuti or 618?"
88+
}
89+
]
90+
}
91+
]
92+
}
93+
} -->
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
title: Text-to-Image Generation
2+
type: community
3+
group: Ranking & Scoring
4+
image: /static/templates/text-to-image.png
5+
details: <h1>Choose the most related image generated by textual description</h1>
6+
config: |
7+
<View>
8+
<View className="ch-title">
9+
<Text name="prompt" value="$prompt"/>
10+
</View>
11+
<View className="highlight">
12+
<Choices name="images" toName="prompt" value="$images" choice="multiple" layout="inline"/>
13+
</View>
14+
<Style>
15+
.ch-title {
16+
font-size: 2em;
17+
box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
18+
text-align: center;
19+
}
20+
.ch-title .lsf-richtext__line:before {
21+
display: none;
22+
}
23+
.highlight .ant-checkbox {
24+
position: absolute;
25+
opacity: 0;
26+
}
27+
.ant-checkbox+span {
28+
border: 4px solid transparent;
29+
border-radius: 8px;
30+
padding: 8px;
31+
}
32+
.ant-checkbox-checked+span {
33+
border-color: red;
34+
}
35+
.ant-checkbox+span sup {
36+
position: absolute;
37+
right: 8px;
38+
top: 8px;
39+
z-index: 2;
40+
display: block;
41+
background: white;
42+
width: 24px;
43+
line-height: 16px;
44+
text-align: center;
45+
}
46+
</Style>
47+
</View>
48+
<!-- {"data": {
49+
"prompt": "An astronaut riding a horse in a photorealistic style",
50+
"images": [{
51+
"value": "id123#0",
52+
"style": "margin: 5px",
53+
"html": "<img width='400' src='https://cdn.openai.com/dall-e-2/demos/text2im/astronaut/horse/photo/0.jpg'/>"
54+
},
55+
{
56+
"value": "id123#1",
57+
"style": "margin: 5px",
58+
"html": "<img width='400' src='https://cdn.openai.com/dall-e-2/demos/text2im/astronaut/horse/photo/1.jpg'/>"
59+
}, {
60+
"value": "id123#2",
61+
"style": "margin: 5px",
62+
"html": "<img width='400' src='https://cdn.openai.com/dall-e-2/demos/text2im/astronaut/horse/photo/2.jpg'/>"
63+
}
64+
]
65+
}} -->
68.1 KB
Loading
370 KB
Loading
78.6 KB
Loading
331 KB
Loading
317 KB
Loading

0 commit comments

Comments
 (0)