From 1540f7ecc76025737d100c63834998e1d8630044 Mon Sep 17 00:00:00 2001 From: khalid-davis Date: Thu, 28 Jan 2021 19:18:18 +0800 Subject: [PATCH] Update the directory structure of examples Signed-off-by: khalid-davis --- README.md | 2 +- README_zh.md | 2 +- .../surface_defect_detection/README.md | 8 ++++---- .../aggregation_worker/aggregate.py | 0 .../surface_defect_detection/data/1.txt | 0 .../surface_defect_detection/data/2.txt | 0 .../training_worker/inference.py | 0 .../training_worker/network.py | 0 .../training_worker/train.py | 0 .../helmet_detection_incremental_train/README.md | 2 +- .../training/data_gen.py | 0 .../training/eval.py | 0 .../training/inference.py | 0 .../training/interface.py | 0 .../training/resnet18.py | 0 .../training/train.py | 0 .../training/validate_utils.py | 0 .../training/yolo3_multiscale.py | 0 .../helmet_detection_inference/README.md | 6 +++--- .../big_model/big_model.py | 0 .../images/inference-result.png | Bin .../little_model/little_model.py | 0 22 files changed, 10 insertions(+), 10 deletions(-) rename examples/{ => federated_learning}/surface_defect_detection/README.md (85%) rename examples/{ => federated_learning}/surface_defect_detection/aggregation_worker/aggregate.py (100%) rename examples/{ => federated_learning}/surface_defect_detection/data/1.txt (100%) rename examples/{ => federated_learning}/surface_defect_detection/data/2.txt (100%) rename examples/{ => federated_learning}/surface_defect_detection/training_worker/inference.py (100%) rename examples/{ => federated_learning}/surface_defect_detection/training_worker/network.py (100%) rename examples/{ => federated_learning}/surface_defect_detection/training_worker/train.py (100%) rename examples/{ => incremental_learning}/helmet_detection_incremental_train/README.md (98%) rename examples/{ => incremental_learning}/helmet_detection_incremental_train/training/data_gen.py (100%) rename examples/{ => incremental_learning}/helmet_detection_incremental_train/training/eval.py (100%) rename examples/{ => incremental_learning}/helmet_detection_incremental_train/training/inference.py (100%) rename examples/{ => incremental_learning}/helmet_detection_incremental_train/training/interface.py (100%) rename examples/{ => incremental_learning}/helmet_detection_incremental_train/training/resnet18.py (100%) rename examples/{ => incremental_learning}/helmet_detection_incremental_train/training/train.py (100%) rename examples/{ => incremental_learning}/helmet_detection_incremental_train/training/validate_utils.py (100%) rename examples/{ => incremental_learning}/helmet_detection_incremental_train/training/yolo3_multiscale.py (100%) rename examples/{ => joint_inference}/helmet_detection_inference/README.md (92%) rename examples/{ => joint_inference}/helmet_detection_inference/big_model/big_model.py (100%) rename examples/{ => joint_inference}/helmet_detection_inference/images/inference-result.png (100%) rename examples/{ => joint_inference}/helmet_detection_inference/little_model/little_model.py (100%) diff --git a/README.md b/README.md index 7ef987663..084ddb3c8 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ Neptune consists of the following components: Follow the [Neptune installation document](docs/setup/install.md) to install Neptune. ### Examples -Example1:[Joint Inference Service in Helmet Detection Scenario](/examples/helmet_detection_inference/README.md). +Example1:[Joint Inference Service in Helmet Detection Scenario](/examples/joint_inference/helmet_detection_inference/README.md). ## Roadmap diff --git a/README_zh.md b/README_zh.md index 07ab1d1db..bc8085c1b 100644 --- a/README_zh.md +++ b/README_zh.md @@ -62,7 +62,7 @@ Neptune由以下组件构建: Neptune的安装文档请参考[这里](/docs/setup/install.md)。 ### 样例 -样例1:[大小模型协同推理](/examples/helmet_detection_inference/README.md)。 +样例1:[大小模型协同推理](/examples/joint_inference/helmet_detection_inference/README.md)。 ## 路标 diff --git a/examples/surface_defect_detection/README.md b/examples/federated_learning/surface_defect_detection/README.md similarity index 85% rename from examples/surface_defect_detection/README.md rename to examples/federated_learning/surface_defect_detection/README.md index 9c65dd045..5996fd0d9 100644 --- a/examples/surface_defect_detection/README.md +++ b/examples/federated_learning/surface_defect_detection/README.md @@ -14,14 +14,14 @@ Follow the [Neptune installation document](/docs/setup/install.md) to install Ne ### Prepare Dataset -Download [dataset](https://github.com/abin24/Magnetic-tile-defect-datasets.) and the [label file](/examples/surface_defect_detection/data/1.txt) to `/data` of edge1. -Download [dataset](https://github.com/abin24/Magnetic-tile-defect-datasets.) and the [label file](/examples/surface_defect_detection/data/2.txt) to `/data` of edge2. +Download [dataset](https://github.com/abin24/Magnetic-tile-defect-datasets.) and the [label file](/examples/federated_learning/surface_defect_detection/data/1.txt) to `/data` of edge1. +Download [dataset](https://github.com/abin24/Magnetic-tile-defect-datasets.) and the [label file](/examples/federated_learning/surface_defect_detection/data/2.txt) to `/data` of edge2. ### Prepare Script -Download the script [aggregate.py](/examples/surface_defect_detection/aggregation_worker/aggregate.py) to the `/code` of cloud node. +Download the script [aggregate.py](/examples/federated_learning/surface_defect_detection/aggregation_worker/aggregate.py) to the `/code` of cloud node. -Download the script [training_worker](/examples/surface_defect_detection/training_worker/train.py) to the `/code` of edge1 and edge2. +Download the script [training_worker](/examples/federated_learning/surface_defect_detection/training_worker/train.py) to the `/code` of edge1 and edge2. ### Create Federated Learning Job diff --git a/examples/surface_defect_detection/aggregation_worker/aggregate.py b/examples/federated_learning/surface_defect_detection/aggregation_worker/aggregate.py similarity index 100% rename from examples/surface_defect_detection/aggregation_worker/aggregate.py rename to examples/federated_learning/surface_defect_detection/aggregation_worker/aggregate.py diff --git a/examples/surface_defect_detection/data/1.txt b/examples/federated_learning/surface_defect_detection/data/1.txt similarity index 100% rename from examples/surface_defect_detection/data/1.txt rename to examples/federated_learning/surface_defect_detection/data/1.txt diff --git a/examples/surface_defect_detection/data/2.txt b/examples/federated_learning/surface_defect_detection/data/2.txt similarity index 100% rename from examples/surface_defect_detection/data/2.txt rename to examples/federated_learning/surface_defect_detection/data/2.txt diff --git a/examples/surface_defect_detection/training_worker/inference.py b/examples/federated_learning/surface_defect_detection/training_worker/inference.py similarity index 100% rename from examples/surface_defect_detection/training_worker/inference.py rename to examples/federated_learning/surface_defect_detection/training_worker/inference.py diff --git a/examples/surface_defect_detection/training_worker/network.py b/examples/federated_learning/surface_defect_detection/training_worker/network.py similarity index 100% rename from examples/surface_defect_detection/training_worker/network.py rename to examples/federated_learning/surface_defect_detection/training_worker/network.py diff --git a/examples/surface_defect_detection/training_worker/train.py b/examples/federated_learning/surface_defect_detection/training_worker/train.py similarity index 100% rename from examples/surface_defect_detection/training_worker/train.py rename to examples/federated_learning/surface_defect_detection/training_worker/train.py diff --git a/examples/helmet_detection_incremental_train/README.md b/examples/incremental_learning/helmet_detection_incremental_train/README.md similarity index 98% rename from examples/helmet_detection_incremental_train/README.md rename to examples/incremental_learning/helmet_detection_incremental_train/README.md index 6a9397c84..9713bda6a 100644 --- a/examples/helmet_detection_incremental_train/README.md +++ b/examples/incremental_learning/helmet_detection_incremental_train/README.md @@ -39,7 +39,7 @@ wget https://edgeai-neptune.obs.cn-north-1.myhuaweicloud.com/examples/helmet-det tar -zxvf model.tar.gz ``` ### Prepare Script -Download the [scripts](/examples/helmet_detection_incremental_train/training) to the path `code` of your node +Download the [scripts](/examples/incremental_learning/helmet_detection_incremental_train/training) to the path `code` of your node ### Create Incremental Job diff --git a/examples/helmet_detection_incremental_train/training/data_gen.py b/examples/incremental_learning/helmet_detection_incremental_train/training/data_gen.py similarity index 100% rename from examples/helmet_detection_incremental_train/training/data_gen.py rename to examples/incremental_learning/helmet_detection_incremental_train/training/data_gen.py diff --git a/examples/helmet_detection_incremental_train/training/eval.py b/examples/incremental_learning/helmet_detection_incremental_train/training/eval.py similarity index 100% rename from examples/helmet_detection_incremental_train/training/eval.py rename to examples/incremental_learning/helmet_detection_incremental_train/training/eval.py diff --git a/examples/helmet_detection_incremental_train/training/inference.py b/examples/incremental_learning/helmet_detection_incremental_train/training/inference.py similarity index 100% rename from examples/helmet_detection_incremental_train/training/inference.py rename to examples/incremental_learning/helmet_detection_incremental_train/training/inference.py diff --git a/examples/helmet_detection_incremental_train/training/interface.py b/examples/incremental_learning/helmet_detection_incremental_train/training/interface.py similarity index 100% rename from examples/helmet_detection_incremental_train/training/interface.py rename to examples/incremental_learning/helmet_detection_incremental_train/training/interface.py diff --git a/examples/helmet_detection_incremental_train/training/resnet18.py b/examples/incremental_learning/helmet_detection_incremental_train/training/resnet18.py similarity index 100% rename from examples/helmet_detection_incremental_train/training/resnet18.py rename to examples/incremental_learning/helmet_detection_incremental_train/training/resnet18.py diff --git a/examples/helmet_detection_incremental_train/training/train.py b/examples/incremental_learning/helmet_detection_incremental_train/training/train.py similarity index 100% rename from examples/helmet_detection_incremental_train/training/train.py rename to examples/incremental_learning/helmet_detection_incremental_train/training/train.py diff --git a/examples/helmet_detection_incremental_train/training/validate_utils.py b/examples/incremental_learning/helmet_detection_incremental_train/training/validate_utils.py similarity index 100% rename from examples/helmet_detection_incremental_train/training/validate_utils.py rename to examples/incremental_learning/helmet_detection_incremental_train/training/validate_utils.py diff --git a/examples/helmet_detection_incremental_train/training/yolo3_multiscale.py b/examples/incremental_learning/helmet_detection_incremental_train/training/yolo3_multiscale.py similarity index 100% rename from examples/helmet_detection_incremental_train/training/yolo3_multiscale.py rename to examples/incremental_learning/helmet_detection_incremental_train/training/yolo3_multiscale.py diff --git a/examples/helmet_detection_inference/README.md b/examples/joint_inference/helmet_detection_inference/README.md similarity index 92% rename from examples/helmet_detection_inference/README.md rename to examples/joint_inference/helmet_detection_inference/README.md index 2c6c076bd..6e6268063 100644 --- a/examples/helmet_detection_inference/README.md +++ b/examples/joint_inference/helmet_detection_inference/README.md @@ -33,14 +33,14 @@ tar -zxvf big-model.tar.gz ``` ### Prepare Script -* step1: download the script [little_model.py](/examples/helmet_detection_inference/little_model/little_model.py) to the path `/code/little_model` of edge node. +* step1: download the script [little_model.py](/examples/joint_inference/helmet_detection_inference/little_model/little_model.py) to the path `/code/little_model` of edge node. ``` mkdir -p /code/little_model curl -o little_model.py https://github.com/edgeai-neptune/neptune/blob/main/examples/helmet_detection_inference/little_model/little_model.py ``` -* step2: download the script [big_model.py](/examples/helmet_detection_inference/big_model/big_model.py) to the path `/code/big_model` of cloud node. +* step2: download the script [big_model.py](/examples/joint_inference/helmet_detection_inference/big_model/big_model.py) to the path `/code/big_model` of cloud node. ``` mkdir -p /code/big_model @@ -81,7 +81,7 @@ EOF #### Create JointInferenceService -Note the setting of the following parameters, which have to same as the script [little_model.py](/examples/helmet_detection_inference/little_model/little_model.py): +Note the setting of the following parameters, which have to same as the script [little_model.py](/examples/joint_inference/helmet_detection_inference/little_model/little_model.py): - hardExampleMining: set hard example algorithm from {IBT, CrossEntropy} for inferring in edge side. - video_url: set the url for video streaming. - all_examples_inference_output: set your output path for the inference results, and note that the root path has to be /home/data. diff --git a/examples/helmet_detection_inference/big_model/big_model.py b/examples/joint_inference/helmet_detection_inference/big_model/big_model.py similarity index 100% rename from examples/helmet_detection_inference/big_model/big_model.py rename to examples/joint_inference/helmet_detection_inference/big_model/big_model.py diff --git a/examples/helmet_detection_inference/images/inference-result.png b/examples/joint_inference/helmet_detection_inference/images/inference-result.png similarity index 100% rename from examples/helmet_detection_inference/images/inference-result.png rename to examples/joint_inference/helmet_detection_inference/images/inference-result.png diff --git a/examples/helmet_detection_inference/little_model/little_model.py b/examples/joint_inference/helmet_detection_inference/little_model/little_model.py similarity index 100% rename from examples/helmet_detection_inference/little_model/little_model.py rename to examples/joint_inference/helmet_detection_inference/little_model/little_model.py