Skip to content

Commit 3d6765d

Browse files
authored
Merge pull request #3 from SonySemiconductorSolutions/release/1.0.1
Release/1.0.1 to main
2 parents 1dd1090 + 0909754 commit 3d6765d

File tree

8 files changed

+677
-36
lines changed

8 files changed

+677
-36
lines changed

.devcontainer/devcontainer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@
4343

4444
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
4545
"remoteUser": "vscode",
46-
46+
47+
"forwardPorts": [5000],
48+
4749
// for git submodules: https://docs.github.com/ja/codespaces/managing-your-codespaces/managing-repository-access-for-your-codespaces
4850
"customizations": {
4951
"codespaces": {

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule ".devcontainer/Dependencies/aitrios-sdk-console-access-lib-python"]
22
path = .devcontainer/Dependencies/aitrios-sdk-console-access-lib-python
3-
url = https://github.com/SonySemiconductorSolutions/aitrios-sdk-console-access-lib-python
3+
url = https://github.com/SonySemiconductorSolutions/aitrios-sdk-console-access-lib-python

README.md

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
## Overview
1818

19-
This repository provides sample code for a [Flask](https://flask.palletsprojects.com/en/2.3.x/) Web API that uses [Console Access Library for Python](https://github.com/SonySemiconductorSolutions/aitrios-sdk-console-access-lib-python) to respond inference results to a frontend application, as well as configuration files for building a development environment. This application builds an API to retrieve and return object detection based metadata from AITRIOS Console.
19+
This repository provides sample code for a [Flask](https://flask.palletsprojects.com/en/2.3.x/) Web API that uses [Console Access Library for Python](https://github.com/SonySemiconductorSolutions/aitrios-sdk-console-access-lib-python) to respond inference results to a [frontend application (aitrios-sample-application-check-data-tool-ts)](https://github.com/SonySemiconductorSolutions/aitrios-sample-application-check-data-tool-ts), as well as configuration files for building a development environment. This application builds an API to retrieve and return object detection based metadata from AITRIOS | Console.
2020

2121
## Get Started
2222

@@ -40,24 +40,36 @@ This repository provides sample code for a [Flask](https://flask.palletsprojects
4040
> * Specify registered application secret for client_secret
4141
> * Specify registered application client ID for client_id
4242
43-
See the [Portal user manual](https://developer.aitrios.sony-semicon.com/file/download/portal-user-manual) for details.
43+
See the [Portal user manual](https://developer.aitrios.sony-semicon.com/documents/portal-user-manual/) for details.
4444
4. Run the sample application using the following command.
4545
```
4646
$ cd ./src
4747
$ flask run --debugger --reload
4848
```
4949
5. Open `localhost:5000` in a browser and verify that the application is running.
5050
51+
> **Note**
52+
> Please check only for codespaces users!
53+
>
54+
> **Public Ports (Front-end application link)**
55+
> To link with the front-end application, follow the steps below to make the port on codespaces public.
56+
> 1. Open a terminal and open the [Port] tab. Right-click on the port that will be shared and, after clicking on [Port Display Range], click on [Public].
57+
> 2. Click on the copy icon on the right side of the port’s local adress and copy it.
58+
>
59+
60+
![codespace_public_port](./docs/20230704_codespace_public_port.png)
61+
62+
5163
## Specifications
5264
5365
### Functional overview
5466
55-
- Web API to obtain various datas from AITRIOS Console.
56-
- An API that can be obtained a list of edge AI devices connected to the Console.
67+
- Web API to obtain various datas from AITRIOS | Console.
68+
- An API that can be obtained a list of edge AI devices connected to the AITRIOS | Console.
5769
- An API that can be obtained a list of sub-directories containing images taken with the specified device.
5870
- An API that can be obtained a list of pairs of image and inference result that stored in the Console.
59-
- Only object detection is supported as baseAI model.
60-
- It can be run on devcontainer/Codespaces.
71+
- Only object detection made by Custom Vision is supported.
72+
- It can be run on devcontainer/codespaces.
6173
6274
### Restrictions
6375
@@ -68,16 +80,16 @@ None
6880
- [Contact us](https://developer.aitrios.sony-semicon.com/contact-us/)
6981
7082
## See also
71-
83+
- [Get Started](https://developer.aitrios.sony-semicon.com/development-guides/get-started)
7284
- [aitrios-sdk-console-access-lib-python](https://github.com/SonySemiconductorSolutions/aitrios-sdk-console-access-lib-python)
7385
- [aitrios-sdk-cloud-app-sample-python](https://github.com/SonySemiconductorSolutions/aitrios-sdk-cloud-app-sample-python)
7486
7587
7688
## Trademark
77-
- [Read This First](https://developer.aitrios.sony-semicon.com/development-guides/documents/manuals/)
89+
- [Read This First](https://developer.aitrios.sony-semicon.com/development-guides/documents/read-this-first/)
7890
7991
## Notice
8092
8193
### Security
8294
83-
Before using Codespaces, please read the Site Policy of GitHub and understand the usage conditions.
95+
Before using Codespaces, please read the Site Policy of GitHub and understand the usage conditions.
693 KB
Loading

jupyter_notebook/cloud_sdk_tutorial.ipynb

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@
4141
"### 1. Clientの取得\n",
4242
"\n",
4343
"* `get_console_client`関数を呼び出し、`console_access_settings.yaml`に記載されている接続先情報を用いてAITRIOSに接続するためのClientを作成します。 \n",
44-
"* `console_access_settings.yaml`は`tutorial_sample.ipynb`と同じディレクトリに置くことを想定していますが、都合に応じて次セル内の`console_access_settings_dir`のファイルパスを変更することで他においても動作可能です。\n",
45-
"\n",
44+
"* `/workspace/src/data_loader/common/`に`console_access_settings.yaml`を作成し、`console_access_settings_dir`にファイルパスを記述してください。\n",
4645
"\n",
4746
"```yaml:console_access_settings.yaml\n",
4847
"console_access_settings:\n",
@@ -163,7 +162,7 @@
163162
},
164163
{
165164
"cell_type": "code",
166-
"execution_count": 28,
165+
"execution_count": null,
167166
"metadata": {},
168167
"outputs": [
169168
{
@@ -175,7 +174,11 @@
175174
}
176175
],
177176
"source": [
178-
"device_id = devices_list[2]\n",
177+
"# devices_list配列から適当なdevice_idを選択してください。\n",
178+
"# 本チュートリアルでは、配列の先頭を選択していますが、device_idの文字列指定でも選択できます。\n",
179+
"device_id = devices_list[0]\n",
180+
"#device_id = \"sid-xxxxxxxxxxxxxxxxxxxxxxx\"\n",
181+
"\n",
179182
"image_directories = get_image_directories(device_id)\n",
180183
"print(image_directories)"
181184
]
@@ -311,9 +314,11 @@
311314
}
312315
],
313316
"source": [
317+
"# device_directory_nameで取得した画像ディレクトリを選択してください。\n",
318+
"# 本チュートリアルでは先頭ディレクトリを選択しています。\n",
314319
"images_data = get_images(device_id=device_id, device_directory_name=image_directories[0])\n",
315320
"\n",
316-
"#画像群から最新の1枚を選択\n",
321+
"# 画像群から最新の1枚を選択\n",
317322
"image_name = images_data[-1][\"name\"]\n",
318323
"img_base64 = images_data[-1][\"contents\"]\n",
319324
"\n",
@@ -414,12 +419,12 @@
414419
" bbox_2d = BoundingBox2d.BoundingBox2d()\n",
415420
" bbox_2d.Init(obj_list.BoundingBox().Bytes, obj_list.BoundingBox().Pos)\n",
416421
" buf[str(i + 1)] = {}\n",
417-
" buf[str(i + 1)]['class_id'] = obj_list.ClassId()\n",
418-
" buf[str(i + 1)]['score'] = obj_list.Score()\n",
419-
" buf[str(i + 1)]['left'] = bbox_2d.Left()\n",
420-
" buf[str(i + 1)]['top'] = bbox_2d.Top()\n",
421-
" buf[str(i + 1)]['right'] = bbox_2d.Right()\n",
422-
" buf[str(i + 1)]['bottom'] = bbox_2d.Bottom()\n",
422+
" buf[str(i + 1)]['C'] = obj_list.ClassId()\n",
423+
" buf[str(i + 1)]['P'] = obj_list.Score()\n",
424+
" buf[str(i + 1)]['X'] = bbox_2d.Left()\n",
425+
" buf[str(i + 1)]['Y'] = bbox_2d.Top()\n",
426+
" buf[str(i + 1)]['x'] = bbox_2d.Right()\n",
427+
" buf[str(i + 1)]['y'] = bbox_2d.Bottom()\n",
423428
"\n",
424429
" return buf\n",
425430
"```\n",
@@ -458,12 +463,12 @@
458463
" bbox_2d = BoundingBox2d.BoundingBox2d()\n",
459464
" bbox_2d.Init(obj_list.BoundingBox().Bytes, obj_list.BoundingBox().Pos)\n",
460465
" buf[str(i + 1)] = {}\n",
461-
" buf[str(i + 1)]['class_id'] = obj_list.ClassId()\n",
462-
" buf[str(i + 1)]['score'] = obj_list.Score()\n",
463-
" buf[str(i + 1)]['left'] = bbox_2d.Left()\n",
464-
" buf[str(i + 1)]['top'] = bbox_2d.Top()\n",
465-
" buf[str(i + 1)]['right'] = bbox_2d.Right()\n",
466-
" buf[str(i + 1)]['bottom'] = bbox_2d.Bottom()\n",
466+
" buf[str(i + 1)]['C'] = obj_list.ClassId()\n",
467+
" buf[str(i + 1)]['P'] = obj_list.Score()\n",
468+
" buf[str(i + 1)]['X'] = bbox_2d.Left()\n",
469+
" buf[str(i + 1)]['Y'] = bbox_2d.Top()\n",
470+
" buf[str(i + 1)]['x'] = bbox_2d.Right()\n",
471+
" buf[str(i + 1)]['y'] = bbox_2d.Bottom()\n",
467472
"```"
468473
]
469474
},

0 commit comments

Comments
 (0)