Skip to content

Commit 9b71bff

Browse files
[DOCS] Fixing formatting in Pallet Defect Detection docs (open-edge-platform#1534)
Signed-off-by: Sebastian Golebiewski <sebastianx.golebiewski@intel.com>
1 parent 44a925a commit 9b71bff

29 files changed

Lines changed: 1061 additions & 848 deletions

manufacturing-ai-suite/industrial-edge-insights-vision/docs/user-guide/pallet-defect-detection/environment-variables.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ This reference application's configuration has the following environment variabl
77
- **APP_DIR**
88
- (String). Optional. Refers to absolute path to the sample app directory. It gets auto-populated during app installation.
99

10-
11-
In addtion to the ones above, the application also uses environment variables of following two Microservices:
10+
In addition to the ones above, the application also uses environment variables of following two Microservices:
1211

1312
1. DL Streamer Pipeline Server
1413
- DL Streamer Pipeline Server reference document on environment variables is present [here](https://docs.openedgeplatform.intel.com/dev/edge-ai-libraries/dlstreamer-pipeline-server/environment-variables.html)

manufacturing-ai-suite/industrial-edge-insights-vision/docs/user-guide/pallet-defect-detection/get-started.md

Lines changed: 168 additions & 167 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Get Started
22

3-
- **Time to Complete:** 30 minutes
4-
- **Programming Language:** Python 3
3+
- **Time to Complete:** 30 minutes
4+
- **Programming Language:** Python 3
55

66
## Prerequisites
77

@@ -14,46 +14,48 @@ If not, follow the [installation guide for docker engine](https://docs.docker.co
1414

1515
1. Clone the **edge-ai-suites** repository and change into industrial-edge-insights-vision directory. The directory contains the utility scripts required in the instructions that follows.
1616

17-
```bash
18-
git clone https://github.com/open-edge-platform/edge-ai-suites.git
19-
cd edge-ai-suites/manufacturing-ai-suite/industrial-edge-insights-vision/
20-
```
17+
```bash
18+
git clone https://github.com/open-edge-platform/edge-ai-suites.git
19+
cd edge-ai-suites/manufacturing-ai-suite/industrial-edge-insights-vision/
20+
```
2121

22-
2. Set app-specific environment variable file
23-
```bash
24-
cp .env_pallet_defect_detection .env
25-
```
22+
2. Set app-specific environment variable file
2623

27-
3. Edit the below mentioned environment variables in the `.env` file as follows:
24+
```bash
25+
cp .env_pallet_defect_detection .env
26+
```
2827

29-
```bash
30-
HOST_IP=<HOST_IP> # IP address of server where DL Streamer Pipeline Server is running.
28+
3. Edit the below mentioned environment variables in the `.env` file as follows:
3129

32-
MR_PSQL_PASSWORD= #PostgreSQL service & client adapter e.g. intel1234
30+
```bash
31+
HOST_IP=<HOST_IP> # IP address of server where DL Streamer Pipeline Server is running.
3332

34-
MR_MINIO_ACCESS_KEY= # MinIO service & client access key e.g. intel1234
35-
MR_MINIO_SECRET_KEY= # MinIO service & client secret key e.g. intel1234
33+
MR_PSQL_PASSWORD= #PostgreSQL service & client adapter e.g. intel1234
3634

37-
MTX_WEBRTCICESERVERS2_0_USERNAME=<username> # WebRTC credentials e.g. intel1234
38-
MTX_WEBRTCICESERVERS2_0_PASSWORD=<password>
35+
MR_MINIO_ACCESS_KEY= # MinIO service & client access key e.g. intel1234
36+
MR_MINIO_SECRET_KEY= # MinIO service & client secret key e.g. intel1234
3937

40-
# application directory
41-
SAMPLE_APP=pallet-defect-detection
42-
```
38+
MTX_WEBRTCICESERVERS2_0_USERNAME=<username> # WebRTC credentials e.g. intel1234
39+
MTX_WEBRTCICESERVERS2_0_PASSWORD=<password>
4340

44-
4. Install the pre-requisites. Run with sudo if needed.
41+
# application directory
42+
SAMPLE_APP=pallet-defect-detection
43+
```
4544

46-
```bash
47-
./setup.sh
48-
```
45+
4. Install the pre-requisites. Run with sudo if needed.
4946

50-
This script sets up application pre-requisites, download artifacts, sets executable permissions for scripts etc. Downloaded resource directories are made available to the application via volume mounting in docker compose file automatically.
47+
```bash
48+
./setup.sh
49+
```
50+
51+
This script sets up application pre-requisites, download artifacts, sets executable permissions for scripts etc. Downloaded resource directories are made available to the application via volume mounting in docker compose file automatically.
5152

5253
## Deploy the Application
5354

54-
5. Start the Docker application:
55+
1. Start the Docker application:
5556

5657
The Docker daemon service should start automatically at boot. If not, you can start it manually:
58+
5759
```bash
5860
sudo systemctl start docker
5961
```
@@ -62,147 +64,146 @@ If not, follow the [installation guide for docker engine](https://docs.docker.co
6264
docker compose up -d
6365
```
6466

65-
6. Fetch the list of pipeline loaded available to launch:
66-
67-
```bash
68-
./sample_list.sh
69-
```
70-
71-
This lists the pipeline loaded in DL Streamer Pipeline Server.
72-
73-
Example Output:
74-
75-
```bash
76-
# Example output for Pallet Defect Detection
77-
Environment variables loaded from /home/intel/OEP/edge-ai-suites/manufacturing-ai-suite/industrial-edge-insights-vision/.env
78-
Running sample app: pallet-defect-detection
79-
Checking status of dlstreamer-pipeline-server...
80-
Server reachable. HTTP Status Code: 200
81-
Loaded pipelines:
82-
[
83-
...
84-
{
85-
"description": "DL Streamer Pipeline Server pipeline",
86-
"name": "user_defined_pipelines",
87-
"parameters": {
88-
"properties": {
89-
"detection-properties": {
90-
"element": {
91-
"format": "element-properties",
92-
"name": "detection"
93-
}
94-
}
95-
},
96-
"type": "object"
97-
},
98-
"type": "GStreamer",
99-
"version": "pallet_defect_detection"
100-
}
101-
...
102-
]
103-
```
104-
105-
7. Start the sample application with a pipeline.
106-
107-
```bash
108-
./sample_start.sh -p pallet_defect_detection
109-
```
110-
111-
This command will look for the payload for the pipeline specified in the `-p` argument above, inside the `payload.json` file and launch a pipeline instance in DL Streamer Pipeline Server. Refer to the table, to learn about different available options.
112-
113-
> **IMPORTANT**: Before you run `sample_start.sh` script, make sure that
114-
> `jq` is installed on your system. See the
115-
> [troubleshooting guide](./troubleshooting-guide.md#unable-to-parse-json-payload-due-to-missing-jq-package)
116-
> for more details.
117-
118-
Output:
119-
120-
```bash
121-
# Example output for Pallet Defect Detection
122-
Environment variables loaded from /home/intel/OEP/edge-ai-suites/manufacturing-ai-suite/industrial-edge-insights-vision/.env
123-
Running sample app: pallet-defect-detection
124-
Checking status of dlstreamer-pipeline-server...
125-
Server reachable. HTTP Status Code: 200
126-
Loading payload from /home/intel/OEP/edge-ai-suites/manufacturing-ai-suite/industrial-edge-insights-vision/apps/pallet-defect-detection/payload.json
127-
Payload loaded successfully.
128-
Starting pipeline: pallet_defect_detection
129-
Launching pipeline: pallet_defect_detection
130-
Extracting payload for pipeline: pallet_defect_detection
131-
Found 1 payload(s) for pipeline: pallet_defect_detection
132-
Payload for pipeline 'pallet_defect_detection' {"source":{"uri":"file:///home/pipeline-server/resources/videos/warehouse.avi","type":"uri"},"destination":{"frame":{"type":"webrtc","peer-id":"pdd"}},"parameters":{"detection-properties":{"model":"/home/pipeline-server/resources/models/pallet-defect-detection/model.xml","device":"CPU"}}}
133-
Posting payload to REST server at https://<HOST_IP>/api/pipelines/user_defined_pipelines/pallet_defect_detection
134-
Payload for pipeline 'pallet_defect_detection' posted successfully. Response: "4b36b3ce52ad11f0ad60863f511204e2"
135-
```
136-
137-
> **NOTE:** This will start the pipeline. To view the inference stream on WebRTC, open a browser and navigate to https://<HOST_IP>/mediamtx/pdd/ for Pallet Defect Detection
138-
139-
8. Get the status of running pipeline instance(s):
140-
141-
```bash
142-
./sample_status.sh
143-
```
144-
145-
This command lists the statuses of pipeline instances launched during the lifetime of sample application.
146-
147-
Output:
148-
149-
```bash
150-
# Example output for Pallet Defect Detection
151-
Environment variables loaded from /home/intel/OEP/edge-ai-suites/manufacturing-ai-suite/industrial-edge-insights-vision/.env
152-
Running sample app: pallet-defect-detection
153-
[
154-
{
155-
"avg_fps": 30.00446179356829,
156-
"elapsed_time": 36.927825689315796,
157-
"id": "4b36b3ce52ad11f0ad60863f511204e2",
158-
"message": "",
159-
"start_time": 1750956469.620569,
160-
"state": "RUNNING"
161-
}
162-
]
163-
```
164-
165-
9. Stop pipeline instances.
166-
167-
```bash
168-
./sample_stop.sh
169-
```
170-
171-
This command will stop all instances that are currently in the `RUNNING` state and return their last status.
172-
173-
Output:
174-
175-
```bash
176-
# Example output for Pallet Defect Detection
177-
No pipelines specified. Stopping all pipeline instances
178-
Environment variables loaded from /home/intel/OEP/edge-ai-suites/manufacturing-ai-suite/industrial-edge-insights-vision/.env
179-
Running sample app: pallet-defect-detection
180-
Checking status of dlstreamer-pipeline-server...
181-
Server reachable. HTTP Status Code: 200
182-
Instance list fetched successfully. HTTP Status Code: 200
183-
Found 1 running pipeline instances.
184-
Stopping pipeline instance with ID: 4b36b3ce52ad11f0ad60863f511204e2
185-
Pipeline instance with ID '4b36b3ce52ad11f0ad60863f511204e2' stopped successfully. Response: {
186-
"avg_fps": 30.002200575353214,
187-
"elapsed_time": 63.72864031791687,
188-
"id": "4b36b3ce52ad11f0ad60863f511204e2",
189-
"message": "",
190-
"start_time": 1750956469.620569,
191-
"state": "RUNNING"
192-
}
193-
```
194-
195-
To stop a specific instance, identify it with the `--id` argument.
196-
For example, `./sample_stop.sh --id 4b36b3ce52ad11f0ad60863f511204e2`
197-
198-
10. Stop the Docker application.
199-
200-
```bash
201-
docker compose down -v
202-
```
203-
204-
This will bring down the services in the application and remove any volumes.
67+
2. Fetch the list of pipeline loaded available to launch:
68+
69+
```bash
70+
./sample_list.sh
71+
```
72+
73+
This lists the pipeline loaded in DL Streamer Pipeline Server.
74+
75+
Example Output:
76+
77+
```bash
78+
# Example output for Pallet Defect Detection
79+
Environment variables loaded from /home/intel/OEP/edge-ai-suites/manufacturing-ai-suite/industrial-edge-insights-vision/.env
80+
Running sample app: pallet-defect-detection
81+
Checking status of dlstreamer-pipeline-server...
82+
Server reachable. HTTP Status Code: 200
83+
Loaded pipelines:
84+
[
85+
...
86+
{
87+
"description": "DL Streamer Pipeline Server pipeline",
88+
"name": "user_defined_pipelines",
89+
"parameters": {
90+
"properties": {
91+
"detection-properties": {
92+
"element": {
93+
"format": "element-properties",
94+
"name": "detection"
95+
}
96+
}
97+
},
98+
"type": "object"
99+
},
100+
"type": "GStreamer",
101+
"version": "pallet_defect_detection"
102+
}
103+
...
104+
]
105+
```
106+
107+
3. Start the sample application with a pipeline.
108+
109+
```bash
110+
./sample_start.sh -p pallet_defect_detection
111+
```
112+
113+
This command will look for the payload for the pipeline specified in the `-p` argument above, inside the `payload.json` file and launch a pipeline instance in DL Streamer Pipeline Server. Refer to the table, to learn about different available options.
114+
115+
> **IMPORTANT**: Before you run `sample_start.sh` script, make sure that
116+
> `jq` is installed on your system. See the
117+
> [troubleshooting guide](./troubleshooting-guide.md#unable-to-parse-json-payload-due-to-missing-jq-package)
118+
> for more details.
119+
120+
Output:
121+
122+
```bash
123+
# Example output for Pallet Defect Detection
124+
Environment variables loaded from /home/intel/OEP/edge-ai-suites/manufacturing-ai-suite/industrial-edge-insights-vision/.env
125+
Running sample app: pallet-defect-detection
126+
Checking status of dlstreamer-pipeline-server...
127+
Server reachable. HTTP Status Code: 200
128+
Loading payload from /home/intel/OEP/edge-ai-suites/manufacturing-ai-suite/industrial-edge-insights-vision/apps/pallet-defect-detection/payload.json
129+
Payload loaded successfully.
130+
Starting pipeline: pallet_defect_detection
131+
Launching pipeline: pallet_defect_detection
132+
Extracting payload for pipeline: pallet_defect_detection
133+
Found 1 payload(s) for pipeline: pallet_defect_detection
134+
Payload for pipeline 'pallet_defect_detection' {"source":{"uri":"file:///home/pipeline-server/resources/videos/warehouse.avi","type":"uri"},"destination":{"frame":{"type":"webrtc","peer-id":"pdd"}},"parameters":{"detection-properties":{"model":"/home/pipeline-server/resources/models/pallet-defect-detection/model.xml","device":"CPU"}}}
135+
Posting payload to REST server at https://<HOST_IP>/api/pipelines/user_defined_pipelines/pallet_defect_detection
136+
Payload for pipeline 'pallet_defect_detection' posted successfully. Response: "4b36b3ce52ad11f0ad60863f511204e2"
137+
```
138+
139+
> **NOTE:** This will start the pipeline. To view the inference stream on WebRTC, open a browser and navigate to https://<HOST_IP>/mediamtx/pdd/ for Pallet Defect Detection
140+
141+
4. Get the status of running pipeline instance(s):
142+
143+
```bash
144+
./sample_status.sh
145+
```
146+
147+
This command lists the statuses of pipeline instances launched during the lifetime of sample application.
148+
149+
Output:
150+
151+
```bash
152+
# Example output for Pallet Defect Detection
153+
Environment variables loaded from /home/intel/OEP/edge-ai-suites/manufacturing-ai-suite/industrial-edge-insights-vision/.env
154+
Running sample app: pallet-defect-detection
155+
[
156+
{
157+
"avg_fps": 30.00446179356829,
158+
"elapsed_time": 36.927825689315796,
159+
"id": "4b36b3ce52ad11f0ad60863f511204e2",
160+
"message": "",
161+
"start_time": 1750956469.620569,
162+
"state": "RUNNING"
163+
}
164+
]
165+
```
166+
167+
5. Stop pipeline instances.
168+
169+
```bash
170+
./sample_stop.sh
171+
```
172+
173+
This command will stop all instances that are currently in the `RUNNING` state and return their last status.
174+
175+
Output:
176+
177+
```bash
178+
# Example output for Pallet Defect Detection
179+
No pipelines specified. Stopping all pipeline instances
180+
Environment variables loaded from /home/intel/OEP/edge-ai-suites/manufacturing-ai-suite/industrial-edge-insights-vision/.env
181+
Running sample app: pallet-defect-detection
182+
Checking status of dlstreamer-pipeline-server...
183+
Server reachable. HTTP Status Code: 200
184+
Instance list fetched successfully. HTTP Status Code: 200
185+
Found 1 running pipeline instances.
186+
Stopping pipeline instance with ID: 4b36b3ce52ad11f0ad60863f511204e2
187+
Pipeline instance with ID '4b36b3ce52ad11f0ad60863f511204e2' stopped successfully. Response: {
188+
"avg_fps": 30.002200575353214,
189+
"elapsed_time": 63.72864031791687,
190+
"id": "4b36b3ce52ad11f0ad60863f511204e2",
191+
"message": "",
192+
"start_time": 1750956469.620569,
193+
"state": "RUNNING"
194+
}
195+
```
196+
197+
To stop a specific instance, identify it with the `--id` argument.
198+
For example, `./sample_stop.sh --id 4b36b3ce52ad11f0ad60863f511204e2`
199+
200+
6. Stop the Docker application.
201+
202+
```bash
203+
docker compose down -v
204+
```
205205

206+
This will bring down the services in the application and remove any volumes.
206207

207208
## Further Reading
208209

0 commit comments

Comments
 (0)