Skip to content

Commit d79a971

Browse files
committed
add instruction image
1 parent d7c8904 commit d79a971

File tree

3 files changed

+62
-4
lines changed

3 files changed

+62
-4
lines changed

_includes/instruction

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{% if include.id %}
2+
{% assign instruction = page[include.id] %}
3+
{% else %}
4+
{% assign instruction = page.instruction %}
5+
{% endif %}
6+
7+
{% if include.layout %}
8+
{% assign gallery_layout = include.layout %}
9+
{% else %}
10+
{% if instruction.size == 2 %}
11+
{% assign gallery_layout = 'half' %}
12+
{% elsif instruction.size >= 3 %}
13+
{% assign gallery_layout = 'third' %}
14+
{% else %}
15+
{% assign gallery_layout = '' %}
16+
{% endif %}
17+
{% endif %}
18+
19+
<figure class="{{ gallery_layout }} {{ include.class }}">
20+
{% for img in instruction %}
21+
{% if img.url %}
22+
<a href=
23+
{% if img.url contains "://" %}
24+
"{{ img.url }}"
25+
{% else %}
26+
"{{ img.url | relative_url }}"
27+
{% endif %}
28+
{% if img.title %}title="{{ img.title }}"{% endif %}
29+
>
30+
<img src=
31+
{% if img.image_path contains "://" %}
32+
"{{ img.image_path }}"
33+
{% else %}
34+
"{{ img.image_path | relative_url }}"
35+
{% endif %}
36+
alt="{% if img.alt %}{{ img.alt }}{% endif %}">
37+
</a>
38+
{% else %}
39+
<img src=
40+
{% if img.image_path contains "://" %}
41+
"{{ img.image_path }}"
42+
{% else %}
43+
"{{ img.image_path | relative_url }}"
44+
{% endif %}
45+
alt="{% if img.alt %}{{ img.alt }}{% endif %}">
46+
{% endif %}
47+
{% endfor %}
48+
{% if include.caption %}
49+
<figcaption>{{ include.caption | markdownify | remove: "<p>" | remove: "</p>" }}</figcaption>
50+
{% endif %}
51+
</figure>

_pages/exercises/ComputerVision/human_detection.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,29 @@ gallery:
1818
image_path: /assets/images/exercises/human_detection/human_detection_teaser.jpeg
1919
alt: "Human Detection"
2020
title: "Human Detection"
21-
21+
22+
instruction:
23+
- url: /assets/images/exercises/human_detection/human-detection-exercise-instruction-img-1.png
24+
image_path: /assets/images/exercises/human_detection/human-detection-exercise-instruction-img-1.png
25+
alt: "Exercise instruction"
26+
title: "Exercise instruction"
27+
2228
youtubeId1: XC4yJYnX7y4
2329

2430
---
2531

2632
<!-- title -->
2733
# Deep learning-based Human Detection Exercise
28-
34+
<!-- cover photo -->
35+
{% include gallery caption="" %}
2936
<!-- descriptions -->
3037
<p style="text-align:justify;">The primary goal of the human detection exercise is to identify individuals in the video feed from a webcam and to draw a rectangular boundary around each person. This exercise supports live webcam video stream inference, allowing users to observe real-time human detection performance using their own trained models.</p>
3138
<p style="text-align:justify;">Users are expected to upload a deep learning-based object detection model in the <a href="https://onnx.ai/" target="_blank" ><strong>ONNX (Open Neural Network Exchange)</strong></a> format. Users are encouraged to build and train their own human detection models using libraries such as <a href="https://pytorch.org/" target="_blank" ><strong>PyTorch</strong></a> or <a href="https://www.tensorflow.org/" target="_blank" ><strong>TensorFlow</strong></a>. After training, the model must be exported to the ONNX format to ensure compatibility with the exercise environment.</p>
3239

3340
<p style="text-align:justify;">After training, the model must be exported to the ONNX format to ensure compatibility with the exercise environment, and you must use the editor to write Python code that processes input from a live video feed, which is captured using your browser's webcam.</p>
3441

35-
{% include gallery caption="Detection Example" %}
36-
42+
<!-- instruction image -->
43+
{% include instruction caption="exercise instruction" %}
3744

3845
<!-- Note Guide -->
3946
<!-- <br/> -->
Loading

0 commit comments

Comments
 (0)