Skip to content

Commit 093f5eb

Browse files
authored
Merge pull request #7 from openvinotoolkit/main
Updating from upstream
2 parents 7261204 + 8794c7c commit 093f5eb

File tree

99 files changed

+1783
-1536
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+1783
-1536
lines changed

.ci/test_notebooks.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,18 @@ def test_readme():
3535
"""
3636
Test that all notebooks have a README file and exist in the Notebooks README
3737
"""
38-
notebooks_readme_path = Path("notebooks/README.md")
38+
notebooks_readme_path = Path("README.md")
3939
notebooks_readme = notebooks_readme_path.read_text(encoding="utf-8")
4040
for item in Path("notebooks").iterdir():
4141
if item.is_dir():
4242
# item is a notebook directory
43-
notebook_dir = item.relative_to("notebooks")
43+
notebook_dir = item.relative_to(Path("notebooks"))
4444
if str(notebook_dir)[0].isdigit():
4545
assert "README.md" in [
4646
filename.name for filename in item.iterdir()
4747
], f"README not found in {item}"
4848
assert (
49-
str(notebook_dir) in notebooks_readme
49+
str(item.relative_to(notebooks_readme_path.parent)) in notebooks_readme
5050
), f"{item} not found in notebooks README: {notebooks_readme_path}"
5151

5252

.docker/Pipfile

-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ torch = {index = "pytorch-wheels", version = "==1.13.1+cpu"}
5454
torchmetrics = ">=0.11.0"
5555
torchvision = {index = "pytorch-wheels", version = "==0.14.1+cpu"}
5656
transformers = ">=4.21.1"
57-
yaspin = "*"
5857

5958
[dev-packages]
6059

.docker/Pipfile.lock

+1-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

+34-90
Large diffs are not rendered by default.

README_cn.md

+24-76
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,7 @@ Jupyter notebooks 分为四个大类,选择一个跟你需求相关的开始
6969
### ⌚ 转换 & 优化
7070

7171
解释如何使用OpenVINO工具进行模型优化和量化的教程。
72-
73-
| [101-tensorflow-to-openvino](notebooks/101-tensorflow-to-openvino/)<br>[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/openvinotoolkit/openvino_notebooks/HEAD?filepath=notebooks%2F101-tensorflow-to-openvino%2F101-tensorflow-to-openvino.ipynb) | [102-pytorch-onnx-to-openvino](notebooks/102-pytorch-onnx-to-openvino/) | [103-paddle-to-openvino](notebooks/103-paddle-to-openvino/)<br>[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/openvinotoolkit/openvino_notebooks/HEAD?filepath=notebooks%2F103-paddle-to-openvino%2F103-paddle-to-openvino-classification.ipynb) | [104-model-tools](notebooks/104-model-tools/)<br>[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/openvinotoolkit/openvino_notebooks/HEAD?filepath=notebooks%2F104-model-tools%2F104-model-tools.ipynb) |
74-
| -------------------------------------------------------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
75-
| 转换TensorFlow模型为OpenVINO IR | 转换PyTorch模型为OpenVINO IR | 转换PaddlePaddle模型为OpenVINO IR | 从Open Model Zoo进行模型下载,转换以及进行基线测试 |
76-
| <img src="https://user-images.githubusercontent.com/15709723/127779167-9d33dcc6-9001-4d74-a089-8248310092fe.png" width=250> | <img src="https://user-images.githubusercontent.com/15709723/127779246-32e7392b-2d72-4a7d-b871-e79e7bfdd2e9.png" width=300 > | <img src="https://user-images.githubusercontent.com/15709723/127779326-dc14653f-a960-4877-b529-86908a6f2a61.png" width=300> | <img src="https://user-images.githubusercontent.com/10940214/157541917-c5455105-b0d9-4adf-91a7-fbc142918015.png" width=150> |
77-
78-
更多有趣的notebooks在这里!
7972

80-
<p>
81-
<details>
82-
<summary> 点击这里查看完整列表! </summary>
8373

8474
| Notebook | Description |
8575
| :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------- |
@@ -98,27 +88,15 @@ Jupyter notebooks 分为四个大类,选择一个跟你需求相关的开始
9888
| [115-async-api](notebooks/115-async-api/)<br>[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/openvinotoolkit/openvino_notebooks/HEAD?labpath=notebooks%2F115-async-api%2F115-async-api.ipynb) | 使用异步执行改进数据流水线 |
9989
| [116-sparsity-optimization](notebooks/116-sparsity-optimization/)| 提高稀疏Transformer模型的性能 |
10090
| [117-model-server](notebooks/117-model-server/)| OpenVINO模型服务(OVMS)介绍 |
101-
</details>
102-
</p>
91+
| [118-optimize-preprocessing](notebooks/118-optimize-preprocessing/)| 提升图片预处理性能 |
10392

10493
<div id='-model-demos'/>
10594

10695
### 🎯 模型演示
10796

10897
演示对特定模型的推理。
109-
110-
| [225-stable-diffusion-text-to-image](notebooks/225-stable-diffusion-text-to-image/)| [227-whisper-subtitles-generation](notebooks/227-whisper-subtitles-generation/)| [230-yolov8-optimization](notebooks/230-yolov8-optimization/) | [231-instruct-pix2pix-image-editing](notebooks/231-instruct-pix2pix-image-editing/)|
111-
| --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
112-
| 用Stable Diffusion由文本生成图像 | 通过OpenAI Whisper和OpenVINO进行字幕生成 | 使用NNCF PTQ API优化YOLOv8 | InstructPix2Pix图片编辑 |
113-
| <img src=https://user-images.githubusercontent.com/29454499/216524089-ed671fc7-a78b-42bf-aa96-9f7c791a9419.png width=225>| <img src=https://user-images.githubusercontent.com/29454499/204548693-1304ef33-c790-490d-8a8b-d5766acb6254.png width=225> | <img src = "https://user-images.githubusercontent.com/29454499/212105105-f61c8aab-c1ff-40af-a33f-d0ed1fccc72e.png" width=225> | <img src=https://user-images.githubusercontent.com/29454499/219943222-d46a2e2d-d348-4259-8431-37cf14727eda.png width=750> |
114-
115-
更多有趣的notebooks在这里!
11698

117-
<p>
118-
<details>
119-
<summary> 点击这里查看完整列表! </summary>
120-
121-
99+
122100
| Notebook | Description | Preview |
123101
| :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
124102
| [201-vision-monodepth](notebooks/201-vision-monodepth/)<br>[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/openvinotoolkit/openvino_notebooks/HEAD?filepath=notebooks%2F201-vision-monodepth%2F201-vision-monodepth.ipynb) | 利用图像和视频进行单目深度估计 | <img src="https://user-images.githubusercontent.com/15709723/127752390-f6aa371f-31b5-4846-84b9-18dd4f662406.gif" width=250> |
@@ -149,8 +127,10 @@ Jupyter notebooks 分为四个大类,选择一个跟你需求相关的开始
149127
| [229-distilbert-sequence-classification](notebooks/229-distilbert-sequence-classification/)<br> | 利用OpenVINO进行句子分类 | <img src = "https://user-images.githubusercontent.com/95271966/206130638-d9847414-357a-4c79-9ca7-76f4ae5a6d7f.png" width=225> |
150128
| [230-yolov8-optimization](notebooks/230-yolov8-optimization/)<br> |使用NNCF PTQ API优化YOLOv8 | <img src = "https://user-images.githubusercontent.com/29454499/212105105-f61c8aab-c1ff-40af-a33f-d0ed1fccc72e.png" width=225> |
151129
|[231-instruct-pix2pix-image-editing](notebooks/231-instruct-pix2pix-image-editing/)<br>| 利用InstructPix2Pix进行图像编辑 | <img src=https://user-images.githubusercontent.com/29454499/219943222-d46a2e2d-d348-4259-8431-37cf14727eda.png width=225> |
152-
</details>
153-
</p>
130+
|[232-clip-language-saliency-map](notebooks/232-clip-language-saliency-map/)<br>| 基于CLIP和OpenVINO™的视觉语言显著性检测 | <img src=https://user-images.githubusercontent.com/29454499/218967961-9858efd5-fff2-4eb0-bde9-60852f4b31cb.JPG width=225> |
131+
|[233-blip-visual-language-processing](notebooks/233-blip-visual-language-processing/)<br>| 基于BLIP和OpenVINO™的视觉问答与图片注释 | <img src=https://user-images.githubusercontent.com/29454499/221933762-4ff32ecb-5e5d-4484-80e1-e9396cb3c511.png width=225> |
132+
|[234-encodec-audio-compression](notebooks/234-encodec-audio-compression/)<br>| # 基于EnCodec和OpenVINO™的音频压缩 | <img src=https://github.com/facebookresearch/encodec/raw/main/thumbnail.png width=225> |
133+
|[235-controlnet-stable-diffusion](notebooks/235-controlnet-stable-diffusion/)<br>| # 使用ControlNet状态调节Stable Diffusion 实现文字生成图片 | <img src=https://user-images.githubusercontent.com/29454499/224541412-9d13443e-0e42-43f2-8210-aa31820c5b44.png width=225> |
154134

155135
<div id='-model-training'/>
156136

@@ -169,17 +149,6 @@ Jupyter notebooks 分为四个大类,选择一个跟你需求相关的开始
169149
### 📺 实时演示
170150
在网络摄像头或视频文件上运行的实时推理演示。
171151

172-
| [401-object-detection-webcam](notebooks/401-object-detection-webcam/)<br>[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/openvinotoolkit/openvino_notebooks/HEAD?filepath=notebooks%2F401-object-detection-webcam%2F401-object-detection.ipynb) | [403-action-recognition-webcam](notebooks/403-action-recognition-webcam/)<br>[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/openvinotoolkit/openvino_notebooks/HEAD?filepath=notebooks%2F403-action-recognition-webcam%2F403-action-recognition-webcam.ipynb) | [404-style-transfer-webcam](notebooks/404-style-transfer-webcam/)<br>[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/openvinotoolkit/openvino_notebooks/HEAD?filepath=notebooks%2F404-style-transfer-webcam%2F404-style-transfer.ipynb) | [405-paddle-ocr-webcam](notebooks/405-paddle-ocr-webcam/)<br>[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/openvinotoolkit/openvino_notebooks/HEAD?labpath=notebooks%2F405-paddle-ocr-webcam%2F405-paddle-ocr-webcam.ipynb) |
173-
| -------------------------------------------------------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
174-
|使用网络摄像头或视频文件进行目标检测 | 使用网络摄像头或视频文件进行动作识别 | 使用网络摄像头或视频文件进行样式变换| 使用网络摄像头或视频文件进行OCR |
175-
| <img src="https://user-images.githubusercontent.com/4547501/141471665-82b28c86-cf64-4bfe-98b3-c314658f2d96.gif" width=150> | <img src="https://user-images.githubusercontent.com/10940214/151552326-642d6e49-f5a0-4fc1-bf14-ae3f457e1fec.gif" width=200> | <img src="https://user-images.githubusercontent.com/109281183/203772234-f17a0875-b068-43ef-9e77-403462fde1f5.gif" width=300> | <img src="https://raw.githubusercontent.com/yoyowz/classification/master/images/paddleocr.gif" width=230> |
176-
177-
更多有趣的notebooks在这里!
178-
179-
<p>
180-
<details>
181-
<summary> 点击这里查看完整列表! </summary>
182-
183152

184153
| Notebook | Description | Preview |
185154
| :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
@@ -192,19 +161,10 @@ Jupyter notebooks 分为四个大类,选择一个跟你需求相关的开始
192161
| [407-person-tracking-webcam](notebooks/407-person-tracking-webcam/)<br>[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/openvinotoolkit/openvino_notebooks/HEAD?filepath=notebooks%2F407-person-tracking-webcam%2F407-person-tracking.ipynb) | 使用网络摄像头或视频文件进行人体跟踪 | <img src = "https://user-images.githubusercontent.com/91237924/210479548-b70dbbaa-5948-4e49-b48e-6cb6613226da.gif" width=225> |
193162

194163

195-
</details>
196-
</p>
197-
198164
如果你遇到了问题,请查看[故障排除](#-troubleshooting), [常见问题解答](#-faq) 或者创建一个GitHub [discussion](https://github.com/openvinotoolkit/openvino_notebooks/discussions)
199165

200166
带有![binder logo](https://mybinder.org/badge_logo.svg) 按键的Notebooks可以在无需安装的情况下运行。[Binder](https://mybinder.org/) 是一项资源有限的免费在线服务。 如果享有获得最佳性能体验,请遵循[安装指南](#-installation-guide)在本地运行Notebooks。
201167

202-
您将在这一部分中获得很多乐趣:
203-
204-
| [Vision-monodepth](notebooks/201-vision-monodepth/) | [Object-detection-webcam](notebooks/401-object-detection-webcam/) | [Pose-estimation-webcam](notebooks/402-pose-estimation-webcam/) | [Action-recognition-webcam](notebooks/403-action-recognition-webcam/) |
205-
| -------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
206-
| <img src="https://user-images.githubusercontent.com/15709723/127752390-f6aa371f-31b5-4846-84b9-18dd4f662406.gif" width=250> | <img src="https://user-images.githubusercontent.com/4547501/141471665-82b28c86-cf64-4bfe-98b3-c314658f2d96.gif" width=225> | <img src="https://user-images.githubusercontent.com/4547501/138267961-41d754e7-59db-49f6-b700-63c3a636fad7.gif" width=225> | <img src="https://user-images.githubusercontent.com/10940214/151552326-642d6e49-f5a0-4fc1-bf14-ae3f457e1fec.gif" width=225> |
207-
208168

209169
[![-----------------------------------------------------](https://user-images.githubusercontent.com/10940214/155750931-fc094349-b6ec-4e1f-9f9a-113e67941119.jpg)]()
210170
<div id='-system-requirements'/>
@@ -253,61 +213,49 @@ jupyter lab notebooks
253213

254214
## 🧹 清理
255215

256-
<p>
257-
<details>
258-
<summary>停止Jupyter Kernel</summary>
216+
<div id='-shut-down-jupyter-kernel'>
217+
&#8226; 停止Jupyter Kernel
259218

260219
按 Ctrl-c 结束 Jupyter session,会弹出一个提示框 Shutdown this Jupyter server (y/[n])? 输入 y 并按 回车。
261-
</details>
262-
</p>
220+
</div>
263221

264-
<p>
265-
<details>
266-
<summary>注销虚拟环境</summary>
222+
<div id='-deactivate-virtual-environment'>
223+
&#8226; 注销虚拟环境
267224

268225
注销虚拟环境:只需在激活了 openvino_env 的终端窗口中运行 deactivate 即可。
269226

270227
重新激活环境:在Linux上运行 source openvino_env/bin/activate 或者在Windows上运行 openvino_env\Scripts\activate 即可,然后输入 jupyter lab 或 jupyter notebook 即可重新运行notebooks。
271-
</details>
272-
</p>
228+
</div>
273229

274-
<p>
275-
<details>
276-
<summary>删除虚拟环境 _(可选)_</summary>
230+
<div id='-delete-virtual-environment'>
231+
&#8226; >删除虚拟环境 _(可选)_
277232

278233
直接删除 openvino_env 目录即可删除虚拟环境:
279-
</details>
280-
</p>
234+
</div>
281235

282-
<p>
283-
<details>
284-
<summary>Linux和macOS:</summary>
236+
<div id='-on-linux-and-macos'>
237+
&#8226; Linux和macOS:
285238

286239
```bash
287240
rm -rf openvino_env
288241
```
289-
</details>
290-
</p>
242+
</div>
291243

292-
<p>
293-
<details>
294-
<summary>Windows:</summary>
244+
<div id='-on-windows'>
245+
&#8226; Windows:
295246

296247
```bash
297248
rmdir /s openvino_env
298249
```
299-
</details>
300-
</p>
250+
</div>
301251

302-
<p>
303-
<details>
304-
<summary>从Jupyter中移除openvino_env Kernel</summary>
252+
<div id='-remove-openvino-env-kernel'>
253+
&#8226;从Jupyter中移除openvino_env Kernel
305254

306255
```bash
307256
jupyter kernelspec remove openvino_env
308257
```
309-
</details>
310-
</p>
258+
</div>
311259

312260
[![-----------------------------------------------------](https://user-images.githubusercontent.com/10940214/155750931-fc094349-b6ec-4e1f-9f9a-113e67941119.jpg)]()
313261
<div id='-troubleshooting'/>

notebooks/002-openvino-api/002-openvino-api.ipynb

+3-1
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,7 @@
733733
]
734734
},
735735
{
736+
"attachments": {},
736737
"cell_type": "markdown",
737738
"id": "a9657dc5-9713-4d2b-a324-c8cd6195e79a",
738739
"metadata": {},
@@ -779,11 +780,12 @@
779780
]
780781
},
781782
{
783+
"attachments": {},
782784
"cell_type": "markdown",
783785
"id": "48e0a860-c93c-4b93-a684-f53cd66ec2e3",
784786
"metadata": {},
785787
"source": [
786-
"After running the previous cell, we know the model exists in the cache directory. We delete the compiled model and load it again. We measure the time it takes now."
788+
"After running the previous cell, we know the model exists in the cache directory. Then, we delete the compiled model and load it again. Now, we measure the time it takes now."
787789
]
788790
},
789791
{

0 commit comments

Comments
 (0)