Skip to content

Commit 68ff74d

Browse files
authored
Merge pull request #107 from intel/device_modes
Device modes + OV API 2.0 update
2 parents aee4ae5 + 38c3987 commit 68ff74d

File tree

67 files changed

+5195
-4769
lines changed

Some content is hidden

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

67 files changed

+5195
-4769
lines changed

Docs/linux_install_guide.md

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,3 @@
1-
# Install OpenVINO
2-
1. Download the latest [OpenVINO™](https://github.com/openvinotoolkit/openvino/releases) for your version of Ubuntu.
3-
4-
https://github.com/gblong1/openvino-ai-plugins-gimp/assets/22227580/79ce7302-4f53-4451-89a2-47d3ef8a29c8
5-
6-
7-
3. Extract the archive
8-
```sh
9-
tar -xvf <ov-release-name>.tar.gz
10-
```
11-
4. Create an intel directory under `/opt` and move the extracted files to that directory
12-
```sh
13-
sudo mkdir /opt/intel
14-
sudo chown <user>:<group> /opt/intel
15-
mv <ov-release-name> /opt/intel/.
16-
```
17-
5. Link the release as `openvino` under `/opt/intel`
18-
```sh
19-
cd /opt/intel
20-
ln -sf <ov-release-name> openvino
21-
```
22-
231
# Build GIMP
242
1. Create a directory where you will download and build all of the sources for GIMP
253
```sh
@@ -73,25 +51,20 @@
7351
2. Run install script, and download models. The following steps will create the virtual environment "gimpenv3", install all required packages and will also walk you through models setup.
7452
```sh
7553
chmod +x openvino-ai-plugins-gimp/install.sh
76-
source /opt/intel/openvino/setupvars.sh
7754
./openvino-ai-plugins-gimp/install.sh
7855
```
7956
At the end of plugin setup, you will be prompted to setup the AI models used with OpenVINO™. Before proceeding, make note of the plugin directory and add that to the plugin path for GIMP before proceeding with model download.
8057
Start the GIMP application (`gimp-2.99`), and add the gimpenv3 path that was printed when running the above step to the list of plugin folders [Edit-> Preferences-> Folders-> Plugins].
8158

82-
https://github.com/gblong1/openvino-ai-plugins-gimp/assets/22227580/1bab09ae-9383-4d53-9615-eb87d2212e82
83-
8459
Choose the models that you would like to setup, keeping in mind that choosing to download all of them may take time and considerable disk space.
8560

8661
*You can re-run "run install script" step later again to install & setup models that you may have missed.*
8762

8863
# Verify Installation
8964
Start GIMP, ensuring to setup the environment variables correctly, and you should see 'OpenVINO-AI-Plugins' show up in 'Layer' menu
9065
```sh
91-
source /opt/intel/openvino/setupvars.sh
9266
export GI_TYPELIB_PATH=/usr/lib/x86_64-linux-gnu/girepository-1.0:/usr/local/lib/x86_64-linux-gnu/girepository-1.0
9367
gimp-2.99
9468
```
9569

96-
https://github.com/gblong1/openvino-ai-plugins-gimp/assets/22227580/a6222235-2017-45f8-9594-f49ab4107a70
9770

Docs/user_guide_for_windos_users.md renamed to Docs/user_guide_for_windows_users.md

Lines changed: 3 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -20,30 +20,9 @@
2020
- Note: This document will use python 3.9.13 as an example.
2121
- VC runtime
2222
- [GIMP 2.99.14](https://download.gimp.org/gimp/v2.99/windows/gimp-2.99.14-setup.exe)
23-
- [OpenVINO™ 2023.2](https://storage.openvinotoolkit.org/repositories/openvino/packages/2023.2/windows/w_openvino_toolkit_windows_2023.2.0.13089.cfd42bd2cb0_x86_64.zip) or later version
2423
- [GIMP AI plugins with OpenVINO™ Backend](https://github.com/intel/openvino-ai-plugins-gimp) from Github.
2524

2625

27-
### Install OpenVINO™
28-
29-
>__Notes:__ Use OpenVINO™ `2023.2` as an example.
30-
31-
Please following below steps to download and install the OpenVINO™ package.
32-
33-
- Check download [page](https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/download.html?VERSION=v_2023_2_0&OP_SYSTEM=WINDOWS&DISTRIBUTION=ARCHIVE) of OpenVINO™ website, then click "Download Archives"
34-
35-
![](figs/OpenVINO_installation.png)
36-
37-
- Download compressed package [w_openvino_toolkit_windows_2023.2.0.13089.cfd42bd2cb0_x86_64.zip](https://storage.openvinotoolkit.org/repositories/openvino/packages/2023.2/windows/w_openvino_toolkit_windows_2023.2.0.13089.cfd42bd2cb0_x86_64.zip)
38-
39-
![](figs/OpenVINO_installation_archives.png)
40-
41-
- Unzip `w_openvino_toolkit_windows_2023.2.0.13089.cfd42bd2cb0_x86_64.zip` to `C:\Users\Public\`
42-
43-
> __Notes:__ Use `C:\Users\Public\` as an example, you can unzip it to anywhere that you want.
44-
45-
46-
4726
### Install Python
4827

4928
>__Notes:__ Use Python `3.9.13` as an example.
@@ -114,7 +93,7 @@ Please download [gimp-2.99.14-setup.exe](https://download.gimp.org/gimp/v2.99/wi
11493

11594

11695

117-
### Install GIMP AI plugins with OpenVINO™ Backend
96+
### Install GIMP AI plugins
11897

11998
- Open command prompt and download it from Github by git with below instruction.
12099

@@ -127,15 +106,6 @@ Please download [gimp-2.99.14-setup.exe](https://download.gimp.org/gimp/v2.99/wi
127106
> __Notes__:
128107
> This is an example that will create a `GIMP` folder in `C:\Users\Public\`, and then download the package to `C:\Users\Public\GIMP`, you still can define where to place this package by yourself.
129108
130-
- Use same command prompt that used in previous step to include OpenVINO™ environment by below command.
131-
132-
```sh
133-
C:\Users\Public\w_openvino_toolkit_windows_2023.2.0.13089.cfd42bd2cb0_x86_64\setupvars.bat
134-
```
135-
> __Notes__:
136-
> - Folder name of `w_openvino_toolkit_windows_2023.2.0.13089.cfd42bd2cb0_x86_64` is for OpenVINO™ `2023.2` version and it depends on OpenVINO™ version.
137-
> - Please ensure the OpenVINO™ environment is set, otherwise, NPU will not work for GIMP AI plugins with OpenVINO™ Backend.
138-
139109
- Use same command prompt that used in previous steps and follow the command below to install it.
140110
141111
```sh
@@ -166,7 +136,7 @@ Please download [gimp-2.99.14-setup.exe](https://download.gimp.org/gimp/v2.99/wi
166136
> - The downloaded models include FP16 and INT8 precision, and INT8 precision can be executed on MTL NPU.
167137
> - Weights is saved at `C:\Users\\<user_name>\openvino-ai-plugins-gimp\weights`.
168138

169-
## Set up GIMP AI plugins with OpenVINO™ Backend on GIMP
139+
## Set up GIMP AI plugins
170140

171141
Please follow below steps to setup plugin at first time and then you can use GIMP to execute GIMP AI plugins with OpenVINO™ Backend to run Stable-Diffusion or other features.
172142

@@ -194,34 +164,7 @@ With previous section, the GIMP AI plugins with OpenVINO™ Backend is installed
194164

195165
## Execute GIMP
196166

197-
To make GIMP AI plugins with OpenVINO™ Backend can work with GIMP, please choose one of below two methods to execute it.
198-
199-
### Execute by commands in cmd prompt
200-
201-
Open command prompt, then follow below command to execute GIMP in command prompt.
202-
203-
```sh
204-
C:\Users\Public\w_openvino_toolkit_windows_2023.2.0.13089.cfd42bd2cb0_x86_64\setupvars.bat
205-
cd "C:\Program Files\GIMP 2.99\bin"
206-
gimp-2.99.exe
207-
```
208-
209-
### One-click execution by GIMP.bat file
210-
211-
- Create `GIMP.bat` in the directory `C:\Users\Public`.
212-
213-
```sh
214-
call C:\Users\Public\w_openvino_toolkit_windows_2023.2.0.13089.cfd42bd2cb0_x86_64\setupvars.bat
215-
cd "C:\Program Files\GIMP 2.99\bin"
216-
.\gimp-2.99.exe
217-
```
218-
219-
- And then double click `GIMP.bat` or open command prompt executes `GIMP.bat` by below command.
220-
221-
```sh
222-
C:\Users\Public\GIMP.bat
223-
```
224-
167+
You can now simply open Gimp from the start menu as you would any normal Windows application.
225168

226169
## Execute Stable-Diffusion – SD1.5_square_int8
227170

README.md

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44

55
## Current list of plugins:
66
[1] Super-Resolution <br>
7-
[2] Style-Transfer <br>
8-
[3] Inpainting <br>
9-
[4] Semantic-Segmentation <br>
10-
[5] Stable-Diffusion (Supports - SD 1.4, SD 1.5 (landscape, portrait, and Latent Consistency Model), SD 1.5 Inpainting, SD 1.5 Controlnet-OpenPose, SD 1.5 Controlnet-CannyEdge, SD 1.5 Controlnet-Scribble) <br>
7+
[2] Semantic-Segmentation <br>
8+
[3] Stable-Diffusion (Supports - SD 1.4, SD 1.5 (landscape, portrait, and Latent Consistency Model), SD 1.5 Inpainting, SD 1.5 Controlnet-OpenPose, SD 1.5 Controlnet-CannyEdge, SD 1.5 Controlnet-Scribble) <br>
119

1210
# Objectives
1311
[1] Provides a set of OpenVINO™ based plugins that add AI features to GIMP. <br>
@@ -22,13 +20,8 @@ Please raise a PR for any new features, modifications, or bug fixes.
2220
![gimp-screenshot](gimp-screenshot.PNG)
2321

2422
## Installation Steps
25-
26-
### Install OpenVINO™
27-
- Download and install [OpenVINO™](https://github.com/openvinotoolkit/openvino/releases) for your operating system. Please follow the instructions to download and install OpenVINO™ from the archive. **Do not use pypi for installation.**
28-
- Note that these plugins have been tested with 2023.1.0 and 2023.2.0
29-
3023
### Windows
31-
For detailed steps and tips please refer [User guide for Windows](./Docs/user_guide_for_windos_users.md).
24+
For detailed steps and tips please refer [User guide for Windows](./Docs/user_guide_for_windows_users.md).
3225

3326
### Linux
3427
This plugin is tested on Ubuntu 22.04. Building GIMP from source is recommended.<br>
@@ -108,18 +101,7 @@ _Note that the screenshots below are based on the previous UI_
108101
### OpenVINO™ Super Resolution Plugin
109102
![](gifs/super-res.webp)
110103

111-
### OpenVINO™ Style Transfer Plugin
112-
![](gifs/style-transfer.webp)
113-
114-
### OpenVINO™ Inpainting Plugin
115-
1. Open an image in GIMP.
116-
2. Make sure there is alpha channel added to the image by right clicking on the image from layer section and selecting “Add alpha channel”
117-
3. Add a new transparent layer of the same size as original image.
118-
4. Select paint brush with white foreground color and black background color. Choose the thickness of the brush
119-
10. Now paint the object that you want to remove from the image.
120-
11. Select the new layer and image at the same. You should see “two items selected in layer section”
121104

122-
![](gifs/inpainting.webp)
123105

124106

125107
# Acknowledgements

gimp-screenshot.PNG

-233 KB
Loading

gimpopenvino/plugins/fast-style-transfer-ov/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)