From d2de5e3ee5f54bd7cd6bb62ebb462cd2837c75d2 Mon Sep 17 00:00:00 2001 From: xujinghan66 Date: Sat, 7 May 2022 12:13:38 +0000 Subject: [PATCH 01/20] =?UTF-8?q?=E6=96=B0=E5=BB=BA=20Discriminate=5FLoss?= =?UTF-8?q?=5FFunction=5Ffor=5FTensorFlow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TensorFlow/Discriminate_Loss_Function_for_TensorFlow/.keep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 TensorFlow/Discriminate_Loss_Function_for_TensorFlow/.keep diff --git a/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/.keep b/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/.keep new file mode 100644 index 000000000..e69de29bb -- Gitee From 372603bb031dbc2fa641c11a2a0cf0f1241fafb3 Mon Sep 17 00:00:00 2001 From: xujinghan66 Date: Sat, 7 May 2022 12:15:27 +0000 Subject: [PATCH 02/20] =?UTF-8?q?=E6=96=B0=E5=BB=BA=20LICENSE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Discriminate_Loss_Function_for_TensorFlow/LICENSE/.keep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 TensorFlow/Discriminate_Loss_Function_for_TensorFlow/LICENSE/.keep diff --git a/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/LICENSE/.keep b/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/LICENSE/.keep new file mode 100644 index 000000000..e69de29bb -- Gitee From 5db7a6b4f9d3ad5b11d9ca3db0a467d0c7483f72 Mon Sep 17 00:00:00 2001 From: xujinghan66 Date: Sat, 7 May 2022 12:15:43 +0000 Subject: [PATCH 03/20] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20Te?= =?UTF-8?q?nsorFlow/Discriminate=5FLoss=5FFunction=5Ffor=5FTensorFlow/LICE?= =?UTF-8?q?NSE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Discriminate_Loss_Function_for_TensorFlow/LICENSE/.keep | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 TensorFlow/Discriminate_Loss_Function_for_TensorFlow/LICENSE/.keep diff --git a/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/LICENSE/.keep b/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/LICENSE/.keep deleted file mode 100644 index e69de29bb..000000000 -- Gitee From 3fa43f7892dbcf2baee058a624129d42bc7a0eb7 Mon Sep 17 00:00:00 2001 From: xujinghan66 Date: Sat, 7 May 2022 12:16:10 +0000 Subject: [PATCH 04/20] add TensorFlow/Discriminate_Loss_Function_for_TensorFlow. --- .../Discriminate_Loss_Function_for_TensorFlow/requirement.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 TensorFlow/Discriminate_Loss_Function_for_TensorFlow/requirement.txt diff --git a/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/requirement.txt b/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/requirement.txt new file mode 100644 index 000000000..e69de29bb -- Gitee From 9d3ee4ad9cd5a6f4863559f23810e94921554fab Mon Sep 17 00:00:00 2001 From: xujinghan66 Date: Sat, 7 May 2022 12:16:59 +0000 Subject: [PATCH 05/20] update TensorFlow/Discriminate_Loss_Function_for_TensorFlow/requirement.txt. --- .../Discriminate_Loss_Function_for_TensorFlow/requirement.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/requirement.txt b/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/requirement.txt index e69de29bb..61b19bdb2 100644 --- a/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/requirement.txt +++ b/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/requirement.txt @@ -0,0 +1 @@ +tensorflow 1.15 \ No newline at end of file -- Gitee From 4549432f6f91006537acd2479acfc81035357103 Mon Sep 17 00:00:00 2001 From: xujinghan66 Date: Sat, 7 May 2022 12:18:24 +0000 Subject: [PATCH 06/20] read --- .../README.md | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md diff --git a/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md b/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md new file mode 100644 index 000000000..9bf709fe9 --- /dev/null +++ b/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md @@ -0,0 +1,83 @@ +## Instance Segmentation with a Discriminative Loss Function + +Tensorflow implementation of [Semantic Instance Segmentation with a Discriminative Loss Function](https://arxiv.org/abs/1708.02551) trained on the [TuSimple dataset](http://benchmark.tusimple.ai/#/t/1) + +--- +### Files +├── __data__ here the data should be stored +│        └── __tusimple_dataset_processing.py__ processes the TuSimple dataset +├── __doc__ documentation +├── __inference_test__ inference related data +│        └── __images__ for testing the inference +├── __trained_model__ pretrained model for finetuning +├── __clustering.py__ mean-shift clustering +├── __datagenerator.py__ feeds data for training and evaluation +├── __enet.py__ [Enet architecture](https://github.com/kwotsin/TensorFlow-ENet) +├── __inference.py__ tests inference on images +├── __loss.py__ defines discriminative loss function +├── __README.md__ +├── __training.py__ contains training pipeline +├── __utils.py__ contains utilities files for building and initializing the graph +└── __visualization.py__ contains visualization of the clustering and pixel embeddings + + +### Instructions + +#### Inference +1. To test the inference of the trained model execute: +`python inference.py --modeldir trained_model --outdir inference_test/results` + +#### Training + +1. Download the [TuSimple training dataset](http://benchmark.tusimple.ai/#/t/1) and extract its contents to the `data` folder. The folder structure should look like this: +| data +├── train_set +│     ├── clips +│     ├── label_data_0313.json +│     ├── label_data_0531.json +│     ├── label_data_0601.json +│     └── readme.md +2. Run the following script to prepare images and labels. +`python data/tusimple_dataset_processing.py ` +This should create the following images and labels folders: +| data +├── train_set +├── images +└── labels +3. For training on the dataset execute: +`python training.py` +alternatively use optional parameters (default parameters in this example): +`python training --srcdir data --modeldir pretrained_semantic_model --outdir saved_model --logdir log --epochs 50 --var 1.0 --dist 1.0 --reg 1.0 --dvar 0.5 --ddist 1.5 +` +4. To test the trained network execute: +`python inference.py --modeldir saved_model` + +### Training Pipeline + + +### Training Visualization +Feature space projection of one image for consecutive gradient steps. Each point represents one pixel embedding and each color represents an instance in the label. + + + + +### Results + + + + +### Todo +- pip requirements +- semantic segmentation code +- visualization + +Tensorflow version 1.2 + +### Reference and Credits +This application uses Open Source components. We acknowledge and are grateful to these developers for their contributions to open source: +- Project: TensorFlow-ENet https://github.com/kwotsin/TensorFlow-ENet +- Project: TuSimple dataset http://benchmark.tusimple.ai +- Project: Fast Scene Understanding https://github.com/DavyNeven/fastSceneUnderstanding + +### Related work +- Paper: [Towards End-to-End Lane Detection: an Instance Segmentation Approach](https://arxiv.org/abs/1802.05591) -- Gitee From 3ca92fc2a3c31cf7aaab9dce0e58f43cd3ba937b Mon Sep 17 00:00:00 2001 From: xujinghan66 Date: Sat, 7 May 2022 12:24:16 +0000 Subject: [PATCH 07/20] update TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md. --- .../README.md | 84 +------------------ 1 file changed, 1 insertion(+), 83 deletions(-) diff --git a/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md b/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md index 9bf709fe9..83f341fa7 100644 --- a/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md +++ b/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md @@ -1,83 +1 @@ -## Instance Segmentation with a Discriminative Loss Function - -Tensorflow implementation of [Semantic Instance Segmentation with a Discriminative Loss Function](https://arxiv.org/abs/1708.02551) trained on the [TuSimple dataset](http://benchmark.tusimple.ai/#/t/1) - ---- -### Files -├── __data__ here the data should be stored -│        └── __tusimple_dataset_processing.py__ processes the TuSimple dataset -├── __doc__ documentation -├── __inference_test__ inference related data -│        └── __images__ for testing the inference -├── __trained_model__ pretrained model for finetuning -├── __clustering.py__ mean-shift clustering -├── __datagenerator.py__ feeds data for training and evaluation -├── __enet.py__ [Enet architecture](https://github.com/kwotsin/TensorFlow-ENet) -├── __inference.py__ tests inference on images -├── __loss.py__ defines discriminative loss function -├── __README.md__ -├── __training.py__ contains training pipeline -├── __utils.py__ contains utilities files for building and initializing the graph -└── __visualization.py__ contains visualization of the clustering and pixel embeddings - - -### Instructions - -#### Inference -1. To test the inference of the trained model execute: -`python inference.py --modeldir trained_model --outdir inference_test/results` - -#### Training - -1. Download the [TuSimple training dataset](http://benchmark.tusimple.ai/#/t/1) and extract its contents to the `data` folder. The folder structure should look like this: -| data -├── train_set -│     ├── clips -│     ├── label_data_0313.json -│     ├── label_data_0531.json -│     ├── label_data_0601.json -│     └── readme.md -2. Run the following script to prepare images and labels. -`python data/tusimple_dataset_processing.py ` -This should create the following images and labels folders: -| data -├── train_set -├── images -└── labels -3. For training on the dataset execute: -`python training.py` -alternatively use optional parameters (default parameters in this example): -`python training --srcdir data --modeldir pretrained_semantic_model --outdir saved_model --logdir log --epochs 50 --var 1.0 --dist 1.0 --reg 1.0 --dvar 0.5 --ddist 1.5 -` -4. To test the trained network execute: -`python inference.py --modeldir saved_model` - -### Training Pipeline - - -### Training Visualization -Feature space projection of one image for consecutive gradient steps. Each point represents one pixel embedding and each color represents an instance in the label. - - - - -### Results - - - - -### Todo -- pip requirements -- semantic segmentation code -- visualization - -Tensorflow version 1.2 - -### Reference and Credits -This application uses Open Source components. We acknowledge and are grateful to these developers for their contributions to open source: -- Project: TensorFlow-ENet https://github.com/kwotsin/TensorFlow-ENet -- Project: TuSimple dataset http://benchmark.tusimple.ai -- Project: Fast Scene Understanding https://github.com/DavyNeven/fastSceneUnderstanding - -### Related work -- Paper: [Towards End-to-End Lane Detection: an Instance Segmentation Approach](https://arxiv.org/abs/1802.05591) +训练命令:python train.py -- Gitee From f56fafe23dbd9a44fb96583f8b3d663dab1d879c Mon Sep 17 00:00:00 2001 From: xujinghan66 Date: Sat, 7 May 2022 12:33:56 +0000 Subject: [PATCH 08/20] update TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md. --- .../README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md b/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md index 83f341fa7..9668bdb62 100644 --- a/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md +++ b/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md @@ -1 +1,15 @@ -训练命令:python train.py +代码位置:https://github.com/hq-jiang/instance-segmentation-with-discriminative-loss-tensorflow + +训练命令:python training.py +GPU 训练时间:168小时 +NPU 训练时间:24小时 + +GPU 精度:https://cann001.obs.cn-north-4.myhuaweicloud.com/log.1217215.out +NPU 精度:https://cann001.obs.cn-north-4.myhuaweicloud.com/modelarts-job-4c06ae91-0a9b-4c9c-a9f6-4e32fe5c0bd7-proc-rank-0-device-0.txt + +ckpt转pb:https://gitee.com/ascend/modelzoo/blob/master/built-in/TensorFlow/Research/cv/image_segmentation/UNet3D_ID0057_for_TensorFlow/pbinference/unet3d_pb_frozen.py + +pb转om:atc --model=/home/HwHiAiUser/AscendProjects/NGNN/pb_model/model.ckpt-163150.pb --framework=3 --output=/home/HwHiAiUser/AscendProjects/NGNN/ngnn_acc --soc_version=Ascend310 --input_shape="Placeholder:1,512,512,3" + +离线推理命令:./msame --model /home/HwHiAiUser/AscendProjects/tools/msame/ngnn_acc.om --input /home/HwHiAiUser/AscendProjects/tools/msame/982.bin --output /home/HwHiAiUser/ljj/AMEXEC/out/output1 --outfmt TXT --loop 2 +离线推理结果:https://cann001.obs.cn-north-4.myhuaweicloud.com/ngnn_acc_output_0.txt -- Gitee From 975583ef5ba8c520c6130bc75167b613cb636687 Mon Sep 17 00:00:00 2001 From: xujinghan66 Date: Sat, 7 May 2022 12:35:00 +0000 Subject: [PATCH 09/20] update TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md. --- TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md b/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md index 9668bdb62..16911db0f 100644 --- a/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md +++ b/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md @@ -1,4 +1,5 @@ 代码位置:https://github.com/hq-jiang/instance-segmentation-with-discriminative-loss-tensorflow +参数:默认参数 训练命令:python training.py GPU 训练时间:168小时 -- Gitee From 8f6fbd286b973732b29e74877a16ca4192cf15b2 Mon Sep 17 00:00:00 2001 From: xujinghan66 Date: Sat, 7 May 2022 12:36:40 +0000 Subject: [PATCH 10/20] update TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md. --- TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md b/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md index 16911db0f..5757c8a4f 100644 --- a/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md +++ b/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md @@ -1,5 +1,6 @@ 代码位置:https://github.com/hq-jiang/instance-segmentation-with-discriminative-loss-tensorflow 参数:默认参数 +数据集:http://benchmark.tusimple.ai/#/t/1 训练命令:python training.py GPU 训练时间:168小时 -- Gitee From 51234784560d28a2c5f737d3e121efa7b087dc81 Mon Sep 17 00:00:00 2001 From: xujinghan66 Date: Sat, 7 May 2022 12:37:46 +0000 Subject: [PATCH 11/20] add TensorFlow/Discriminate_Loss_Function_for_TensorFlow/LICENSE. --- .../LICENSE | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 TensorFlow/Discriminate_Loss_Function_for_TensorFlow/LICENSE diff --git a/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/LICENSE b/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/LICENSE new file mode 100644 index 000000000..7e341a77e --- /dev/null +++ b/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/LICENSE @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2022, xujinghan66 + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -- Gitee From bd45a158dc0dfde11763b45b4e35e1aa24e71f9b Mon Sep 17 00:00:00 2001 From: xujinghan66 Date: Sat, 7 May 2022 12:38:35 +0000 Subject: [PATCH 12/20] update TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md. --- .../Discriminate_Loss_Function_for_TensorFlow/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md b/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md index 5757c8a4f..476df4836 100644 --- a/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md +++ b/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md @@ -1,12 +1,16 @@ 代码位置:https://github.com/hq-jiang/instance-segmentation-with-discriminative-loss-tensorflow + 参数:默认参数 + 数据集:http://benchmark.tusimple.ai/#/t/1 训练命令:python training.py + GPU 训练时间:168小时 NPU 训练时间:24小时 GPU 精度:https://cann001.obs.cn-north-4.myhuaweicloud.com/log.1217215.out + NPU 精度:https://cann001.obs.cn-north-4.myhuaweicloud.com/modelarts-job-4c06ae91-0a9b-4c9c-a9f6-4e32fe5c0bd7-proc-rank-0-device-0.txt ckpt转pb:https://gitee.com/ascend/modelzoo/blob/master/built-in/TensorFlow/Research/cv/image_segmentation/UNet3D_ID0057_for_TensorFlow/pbinference/unet3d_pb_frozen.py @@ -14,4 +18,5 @@ ckpt转pb:https://gitee.com/ascend/modelzoo/blob/master/built-in/TensorFlow/Re pb转om:atc --model=/home/HwHiAiUser/AscendProjects/NGNN/pb_model/model.ckpt-163150.pb --framework=3 --output=/home/HwHiAiUser/AscendProjects/NGNN/ngnn_acc --soc_version=Ascend310 --input_shape="Placeholder:1,512,512,3" 离线推理命令:./msame --model /home/HwHiAiUser/AscendProjects/tools/msame/ngnn_acc.om --input /home/HwHiAiUser/AscendProjects/tools/msame/982.bin --output /home/HwHiAiUser/ljj/AMEXEC/out/output1 --outfmt TXT --loop 2 + 离线推理结果:https://cann001.obs.cn-north-4.myhuaweicloud.com/ngnn_acc_output_0.txt -- Gitee From a6e600b65b5bb31b2696e5a0a4546b4b2b797af7 Mon Sep 17 00:00:00 2001 From: xujinghan66 Date: Sun, 8 May 2022 09:22:21 +0000 Subject: [PATCH 13/20] =?UTF-8?q?=E6=96=B0=E5=BB=BA=20Discriminate=5FLoss?= =?UTF-8?q?=5FFunction=5FID1093=5Ffor=5FTensorFlow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cv/Discriminate_Loss_Function_ID1093_for_TensorFlow/.keep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 TensorFlow/contrib/cv/Discriminate_Loss_Function_ID1093_for_TensorFlow/.keep diff --git a/TensorFlow/contrib/cv/Discriminate_Loss_Function_ID1093_for_TensorFlow/.keep b/TensorFlow/contrib/cv/Discriminate_Loss_Function_ID1093_for_TensorFlow/.keep new file mode 100644 index 000000000..e69de29bb -- Gitee From 57baa83adadb566ae08c2ce3fe1e3a8e96928663 Mon Sep 17 00:00:00 2001 From: xujinghan66 Date: Sun, 8 May 2022 09:25:20 +0000 Subject: [PATCH 14/20] =?UTF-8?q?=E6=96=B0=E5=BB=BA=20README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../README.md/.keep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 TensorFlow/contrib/cv/Discriminate_Loss_Function_ID1093_for_TensorFlow/README.md/.keep diff --git a/TensorFlow/contrib/cv/Discriminate_Loss_Function_ID1093_for_TensorFlow/README.md/.keep b/TensorFlow/contrib/cv/Discriminate_Loss_Function_ID1093_for_TensorFlow/README.md/.keep new file mode 100644 index 000000000..e69de29bb -- Gitee From 97114bb21de83192f3f3718f752270e0cfdd620d Mon Sep 17 00:00:00 2001 From: xujinghan66 Date: Sun, 8 May 2022 09:26:15 +0000 Subject: [PATCH 15/20] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20Te?= =?UTF-8?q?nsorFlow/contrib/cv/Discriminate=5FLoss=5FFunction=5FID1093=5Ff?= =?UTF-8?q?or=5FTensorFlow/README.md/.keep?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../README.md/.keep | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 TensorFlow/contrib/cv/Discriminate_Loss_Function_ID1093_for_TensorFlow/README.md/.keep diff --git a/TensorFlow/contrib/cv/Discriminate_Loss_Function_ID1093_for_TensorFlow/README.md/.keep b/TensorFlow/contrib/cv/Discriminate_Loss_Function_ID1093_for_TensorFlow/README.md/.keep deleted file mode 100644 index e69de29bb..000000000 -- Gitee From 882a9f73f5e559fdb9820989a52b782835785c28 Mon Sep 17 00:00:00 2001 From: xujinghan66 Date: Sun, 8 May 2022 09:28:38 +0000 Subject: [PATCH 16/20] add TensorFlow/contrib/cv/Discriminate_Loss_Function_ID1093_for_TensorFlow/README.md. --- .../README.md | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 TensorFlow/contrib/cv/Discriminate_Loss_Function_ID1093_for_TensorFlow/README.md diff --git a/TensorFlow/contrib/cv/Discriminate_Loss_Function_ID1093_for_TensorFlow/README.md b/TensorFlow/contrib/cv/Discriminate_Loss_Function_ID1093_for_TensorFlow/README.md new file mode 100644 index 000000000..cde79e5f9 --- /dev/null +++ b/TensorFlow/contrib/cv/Discriminate_Loss_Function_ID1093_for_TensorFlow/README.md @@ -0,0 +1,24 @@ +GPU代码位置:https://github.com/hq-jiang/instance-segmentation-with-discriminative-loss-tensorflow + +NPU代码位置:obs://cann001/dataset/output/MA-new-CANN_npu_20211027101127-04-10-21-10/ + +参数:默认参数 + +数据集:http://benchmark.tusimple.ai/#/t/1 + +训练命令:python training.py + +GPU 训练时间:168小时 +NPU 训练时间:24小时 + +GPU 精度:https://cann001.obs.cn-north-4.myhuaweicloud.com/log.1217215.out + +NPU 精度:https://cann001.obs.cn-north-4.myhuaweicloud.com/modelarts-job-4c06ae91-0a9b-4c9c-a9f6-4e32fe5c0bd7-proc-rank-0-device-0.txt + +ckpt转pb:https://gitee.com/ascend/modelzoo/blob/master/built-in/TensorFlow/Research/cv/image_segmentation/UNet3D_ID0057_for_TensorFlow/pbinference/unet3d_pb_frozen.py + +pb转om:atc --model=/home/HwHiAiUser/AscendProjects/NGNN/pb_model/model.ckpt-163150.pb --framework=3 --output=/home/HwHiAiUser/AscendProjects/NGNN/ngnn_acc --soc_version=Ascend310 --input_shape="Placeholder:1,512,512,3" + +离线推理命令:./msame --model /home/HwHiAiUser/AscendProjects/tools/msame/ngnn_acc.om --input /home/HwHiAiUser/AscendProjects/tools/msame/982.bin --output /home/HwHiAiUser/ljj/AMEXEC/out/output1 --outfmt TXT --loop 2 + +离线推理结果:https://cann001.obs.cn-north-4.myhuaweicloud.com/ngnn_acc_output_0.txt -- Gitee From d80a0dfde5124fc58edc038b04636bf88a02948a Mon Sep 17 00:00:00 2001 From: xujinghan66 Date: Sun, 8 May 2022 09:30:15 +0000 Subject: [PATCH 17/20] add TensorFlow/contrib/cv/Discriminate_Loss_Function_ID1093_for_TensorFlow/requirement.txt. --- .../requirement.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 TensorFlow/contrib/cv/Discriminate_Loss_Function_ID1093_for_TensorFlow/requirement.txt diff --git a/TensorFlow/contrib/cv/Discriminate_Loss_Function_ID1093_for_TensorFlow/requirement.txt b/TensorFlow/contrib/cv/Discriminate_Loss_Function_ID1093_for_TensorFlow/requirement.txt new file mode 100644 index 000000000..61b19bdb2 --- /dev/null +++ b/TensorFlow/contrib/cv/Discriminate_Loss_Function_ID1093_for_TensorFlow/requirement.txt @@ -0,0 +1 @@ +tensorflow 1.15 \ No newline at end of file -- Gitee From 70f1aabf675b1cd0b6f511ae52a1b369ec1bcd5e Mon Sep 17 00:00:00 2001 From: xujinghan66 Date: Sun, 8 May 2022 09:30:58 +0000 Subject: [PATCH 18/20] add TensorFlow/contrib/cv/Discriminate_Loss_Function_ID1093_for_TensorFlow/LICENSE. --- .../LICENSE | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 TensorFlow/contrib/cv/Discriminate_Loss_Function_ID1093_for_TensorFlow/LICENSE diff --git a/TensorFlow/contrib/cv/Discriminate_Loss_Function_ID1093_for_TensorFlow/LICENSE b/TensorFlow/contrib/cv/Discriminate_Loss_Function_ID1093_for_TensorFlow/LICENSE new file mode 100644 index 000000000..7e341a77e --- /dev/null +++ b/TensorFlow/contrib/cv/Discriminate_Loss_Function_ID1093_for_TensorFlow/LICENSE @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2022, xujinghan66 + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -- Gitee From d222ac94ee68696efdfbc1e30bbcf2d2210ce68d Mon Sep 17 00:00:00 2001 From: xujinghan66 Date: Sun, 8 May 2022 09:31:28 +0000 Subject: [PATCH 19/20] update TensorFlow/contrib/cv/Discriminate_Loss_Function_ID1093_for_TensorFlow/LICENSE. --- .../LICENSE | 210 +++++++++++++++++- 1 file changed, 198 insertions(+), 12 deletions(-) diff --git a/TensorFlow/contrib/cv/Discriminate_Loss_Function_ID1093_for_TensorFlow/LICENSE b/TensorFlow/contrib/cv/Discriminate_Loss_Function_ID1093_for_TensorFlow/LICENSE index 7e341a77e..29f81d812 100644 --- a/TensorFlow/contrib/cv/Discriminate_Loss_Function_ID1093_for_TensorFlow/LICENSE +++ b/TensorFlow/contrib/cv/Discriminate_Loss_Function_ID1093_for_TensorFlow/LICENSE @@ -1,15 +1,201 @@ -ISC License + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -Copyright (c) 2022, xujinghan66 + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + 1. Definitions. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. -- Gitee From 068b43b89042e6d7837d513e21940e6ba763c8ee Mon Sep 17 00:00:00 2001 From: xujinghan66 Date: Sun, 8 May 2022 09:32:02 +0000 Subject: [PATCH 20/20] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20Te?= =?UTF-8?q?nsorFlow/Discriminate=5FLoss=5FFunction=5Ffor=5FTensorFlow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../.keep | 0 .../LICENSE | 15 ------------- .../README.md | 22 ------------------- .../requirement.txt | 1 - 4 files changed, 38 deletions(-) delete mode 100644 TensorFlow/Discriminate_Loss_Function_for_TensorFlow/.keep delete mode 100644 TensorFlow/Discriminate_Loss_Function_for_TensorFlow/LICENSE delete mode 100644 TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md delete mode 100644 TensorFlow/Discriminate_Loss_Function_for_TensorFlow/requirement.txt diff --git a/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/.keep b/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/.keep deleted file mode 100644 index e69de29bb..000000000 diff --git a/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/LICENSE b/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/LICENSE deleted file mode 100644 index 7e341a77e..000000000 --- a/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -ISC License - -Copyright (c) 2022, xujinghan66 - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md b/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md deleted file mode 100644 index 476df4836..000000000 --- a/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/README.md +++ /dev/null @@ -1,22 +0,0 @@ -代码位置:https://github.com/hq-jiang/instance-segmentation-with-discriminative-loss-tensorflow - -参数:默认参数 - -数据集:http://benchmark.tusimple.ai/#/t/1 - -训练命令:python training.py - -GPU 训练时间:168小时 -NPU 训练时间:24小时 - -GPU 精度:https://cann001.obs.cn-north-4.myhuaweicloud.com/log.1217215.out - -NPU 精度:https://cann001.obs.cn-north-4.myhuaweicloud.com/modelarts-job-4c06ae91-0a9b-4c9c-a9f6-4e32fe5c0bd7-proc-rank-0-device-0.txt - -ckpt转pb:https://gitee.com/ascend/modelzoo/blob/master/built-in/TensorFlow/Research/cv/image_segmentation/UNet3D_ID0057_for_TensorFlow/pbinference/unet3d_pb_frozen.py - -pb转om:atc --model=/home/HwHiAiUser/AscendProjects/NGNN/pb_model/model.ckpt-163150.pb --framework=3 --output=/home/HwHiAiUser/AscendProjects/NGNN/ngnn_acc --soc_version=Ascend310 --input_shape="Placeholder:1,512,512,3" - -离线推理命令:./msame --model /home/HwHiAiUser/AscendProjects/tools/msame/ngnn_acc.om --input /home/HwHiAiUser/AscendProjects/tools/msame/982.bin --output /home/HwHiAiUser/ljj/AMEXEC/out/output1 --outfmt TXT --loop 2 - -离线推理结果:https://cann001.obs.cn-north-4.myhuaweicloud.com/ngnn_acc_output_0.txt diff --git a/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/requirement.txt b/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/requirement.txt deleted file mode 100644 index 61b19bdb2..000000000 --- a/TensorFlow/Discriminate_Loss_Function_for_TensorFlow/requirement.txt +++ /dev/null @@ -1 +0,0 @@ -tensorflow 1.15 \ No newline at end of file -- Gitee