Browse Source

!12799 Fix typos in head descriptions about license.

From: @c_34
Reviewed-by: @wuxuejian
Signed-off-by: @wuxuejian
tags/v1.2.0-rc1
mindspore-ci-bot Gitee 5 years ago
parent
commit
bb303647c7
52 changed files with 92 additions and 80 deletions
  1. +8
    -5
      model_zoo/official/cv/crnn/postprocess.py
  2. +1
    -1
      model_zoo/official/cv/ctpn/eval.py
  3. +1
    -1
      model_zoo/official/cv/ctpn/train.py
  4. +5
    -5
      model_zoo/official/cv/deeptext/eval.py
  5. +5
    -4
      model_zoo/official/cv/deeptext/src/Deeptext/vgg16.py
  6. +1
    -1
      model_zoo/official/cv/deeptext/train.py
  7. +3
    -3
      model_zoo/official/cv/faster_rcnn/eval.py
  8. +4
    -3
      model_zoo/official/cv/faster_rcnn/postprocess.py
  9. +1
    -1
      model_zoo/official/cv/faster_rcnn/train.py
  10. +3
    -3
      model_zoo/official/cv/maskrcnn/eval.py
  11. +6
    -5
      model_zoo/official/cv/maskrcnn/postprocess.py
  12. +1
    -1
      model_zoo/official/cv/maskrcnn/train.py
  13. +3
    -3
      model_zoo/official/cv/maskrcnn_mobilenetv1/eval.py
  14. +1
    -1
      model_zoo/official/cv/maskrcnn_mobilenetv1/train.py
  15. +3
    -3
      model_zoo/official/cv/retinaface_resnet50/eval.py
  16. +1
    -1
      model_zoo/official/cv/retinaface_resnet50/scripts/run_distribute_gpu_train.sh
  17. +1
    -1
      model_zoo/official/cv/retinaface_resnet50/scripts/run_standalone_gpu_eval.sh
  18. +2
    -2
      model_zoo/official/cv/retinaface_resnet50/src/augmemtation.py
  19. +1
    -1
      model_zoo/official/cv/retinaface_resnet50/src/config.py
  20. +1
    -1
      model_zoo/official/cv/retinaface_resnet50/src/dataset.py
  21. +1
    -1
      model_zoo/official/cv/retinaface_resnet50/src/loss.py
  22. +1
    -1
      model_zoo/official/cv/retinaface_resnet50/src/lr_schedule.py
  23. +1
    -1
      model_zoo/official/cv/retinaface_resnet50/src/network.py
  24. +1
    -1
      model_zoo/official/cv/retinaface_resnet50/src/utils.py
  25. +1
    -1
      model_zoo/official/cv/retinaface_resnet50/train.py
  26. +1
    -1
      model_zoo/official/cv/retinanet/eval.py
  27. +1
    -1
      model_zoo/official/cv/retinanet/train.py
  28. +1
    -1
      model_zoo/official/cv/ssd/eval.py
  29. +1
    -1
      model_zoo/official/cv/ssd/postprocess.py
  30. +1
    -1
      model_zoo/official/cv/ssd/train.py
  31. +1
    -1
      model_zoo/official/cv/unet/eval.py
  32. +1
    -1
      model_zoo/official/cv/unet/export.py
  33. +1
    -1
      model_zoo/official/cv/unet/scripts/run_distribute_train.sh
  34. +1
    -1
      model_zoo/official/cv/unet/scripts/run_standalone_eval.sh
  35. +1
    -1
      model_zoo/official/cv/unet/scripts/run_standalone_train.sh
  36. +1
    -1
      model_zoo/official/cv/unet/src/config.py
  37. +1
    -1
      model_zoo/official/cv/unet/src/data_loader.py
  38. +1
    -1
      model_zoo/official/cv/unet/src/loss.py
  39. +1
    -1
      model_zoo/official/cv/unet/src/unet_medical/__init__.py
  40. +1
    -1
      model_zoo/official/cv/unet/src/unet_medical/unet_model.py
  41. +1
    -1
      model_zoo/official/cv/unet/src/unet_medical/unet_parts.py
  42. +1
    -1
      model_zoo/official/cv/unet/src/unet_nested/__init__.py
  43. +1
    -1
      model_zoo/official/cv/unet/src/unet_nested/unet_model.py
  44. +1
    -1
      model_zoo/official/cv/unet/src/unet_nested/unet_parts.py
  45. +1
    -1
      model_zoo/official/cv/unet/src/utils.py
  46. +1
    -1
      model_zoo/official/cv/unet/train.py
  47. +1
    -1
      model_zoo/official/cv/yolov3_resnet18/eval.py
  48. +1
    -1
      model_zoo/official/cv/yolov3_resnet18/train.py
  49. +1
    -1
      model_zoo/research/cv/ssd_ghostnet/eval.py
  50. +9
    -3
      model_zoo/research/cv/ssd_ghostnet/train.py
  51. +1
    -1
      tests/st/model_zoo_tests/yolov3/test_yolov3.py
  52. +1
    -1
      tests/st/model_zoo_tests/yolov3_darknet53/test_yolov3_darknet53.py

+ 8
- 5
model_zoo/official/cv/crnn/postprocess.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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
@@ -37,7 +37,7 @@ def read_annotation(ann_file):

return ann

def read_IC13_annotation(ann_file):
def read_ic13_annotation(ann_file):
file = open(ann_file)

ann = {}
@@ -60,14 +60,17 @@ def read_svt_annotation(ann_file):
return ann

def get_eval_result(result_path, ann_file):
"""
Calculate accuracy according to the annotation file and result file.
"""
metrics = CRNNAccuracy(config)

if args.dataset == "ic03" or args.dataset == "iiit5k":
ann = read_annotation(args.ann_file)
ann = read_annotation(ann_file)
elif args.dataset == "ic13":
ann = read_IC13_annotation(args.ann_file)
ann = read_ic13_annotation(ann_file)
elif args.dataset == "svt":
ann = read_svt_annotation(args.ann_file)
ann = read_svt_annotation(ann_file)

for img_name, label in ann.items():
result_file = os.path.join(result_path, img_name[:-4] + "_0.bin")


+ 1
- 1
model_zoo/official/cv/ctpn/eval.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
model_zoo/official/cv/ctpn/train.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 5
- 5
model_zoo/official/cv/deeptext/eval.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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
@@ -43,7 +43,7 @@ args_opt = parser.parse_args()
context.set_context(mode=context.GRAPH_MODE, device_target="Ascend", device_id=args_opt.device_id)


def Deeptext_eval_test(dataset_path='', ckpt_path=''):
def deeptext_eval_test(dataset_path='', ckpt_path=''):
"""Deeptext evaluation."""
ds = create_deeptext_dataset(dataset_path, batch_size=config.test_batch_size,
repeat_num=1, is_training=False)
@@ -114,9 +114,9 @@ def Deeptext_eval_test(dataset_path='', ckpt_path=''):
print("\n========================================\n")
for i in range(config.num_classes - 1):
j = i + 1
F1 = (2 * precisions[j] * recalls[j]) / (precisions[j] + recalls[j] + 1e-6)
f1 = (2 * precisions[j] * recalls[j]) / (precisions[j] + recalls[j] + 1e-6)
print("class {} precision is {:.2f}%, recall is {:.2f}%,"
"F1 is {:.2f}%".format(j, precisions[j] * 100, recalls[j] * 100, F1 * 100))
"F1 is {:.2f}%".format(j, precisions[j] * 100, recalls[j] * 100, f1 * 100))
if config.use_ambigous_sample:
break

@@ -137,4 +137,4 @@ if __name__ == '__main__':

print("CHECKING MINDRECORD FILES DONE!")
print("Start Eval!")
Deeptext_eval_test(mindrecord_file, args_opt.checkpoint_path)
deeptext_eval_test(mindrecord_file, args_opt.checkpoint_path)

+ 5
- 4
model_zoo/official/cv/deeptext/src/Deeptext/vgg16.py View File

@@ -6,19 +6,19 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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.
# ============================================================================

"""VGG16 for deeptext"""

import mindspore.common.dtype as mstype
import mindspore.nn as nn
from mindspore.ops import operations as P

# """VGG16 for deeptext"""


def _conv(in_channels, out_channels, kernel_size=3, stride=1, padding=0, pad_mode='pad'):
"""Conv2D wrapper."""
# shape = (out_channels, in_channels, kernel_size, kernel_size)
@@ -60,6 +60,7 @@ class VGG16FeatureExtraction(nn.Cell):
self.cast = P.Cast()

def construct(self, x):
""" Construction of VGG """
x = self.cast(x, mstype.float32)
x = self.conv1_1(x)
x = self.relu(x)


+ 1
- 1
model_zoo/official/cv/deeptext/train.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 3
- 3
model_zoo/official/cv/faster_rcnn/eval.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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
@@ -41,7 +41,7 @@ args_opt = parser.parse_args()

context.set_context(mode=context.GRAPH_MODE, device_target=args_opt.device_target, device_id=args_opt.device_id)

def FasterRcnn_eval(dataset_path, ckpt_path, ann_file):
def fasterrcnn_eval(dataset_path, ckpt_path, ann_file):
"""FasterRcnn evaluation."""
ds = create_fasterrcnn_dataset(dataset_path, batch_size=config.test_batch_size, is_training=False)
net = Faster_Rcnn_Resnet50(config)
@@ -132,4 +132,4 @@ if __name__ == '__main__':

print("CHECKING MINDRECORD FILES DONE!")
print("Start Eval!")
FasterRcnn_eval(mindrecord_file, args_opt.checkpoint_path, args_opt.ann_file)
fasterrcnn_eval(mindrecord_file, args_opt.checkpoint_path, args_opt.ann_file)

+ 4
- 3
model_zoo/official/cv/faster_rcnn/postprocess.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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
@@ -28,7 +28,8 @@ parser.add_argument("--ann_file", type=str, required=True, help="ann file.")
parser.add_argument("--img_path", type=str, required=True, help="image file path.")
args = parser.parse_args()

def get_eval_result(ann_file, img_path):
def get_eval_result(ann_file):
""" get evaluation result of faster rcnn"""
max_num = 128
result_path = "./result_Files/"

@@ -69,4 +70,4 @@ def get_eval_result(ann_file, img_path):
coco_eval(result_files, eval_types, dataset_coco, single_result=False)

if __name__ == '__main__':
get_eval_result(args.ann_file, args.img_path)
get_eval_result(args.ann_file)

+ 1
- 1
model_zoo/official/cv/faster_rcnn/train.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 3
- 3
model_zoo/official/cv/maskrcnn/eval.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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
@@ -39,7 +39,7 @@ args_opt = parser.parse_args()

context.set_context(mode=context.GRAPH_MODE, device_target="Ascend", device_id=args_opt.device_id)

def MaskRcnn_eval(dataset_path, ckpt_path, ann_file):
def maskrcnn_eval(dataset_path, ckpt_path, ann_file):
"""MaskRcnn evaluation."""
ds = create_maskrcnn_dataset(dataset_path, batch_size=config.test_batch_size, is_training=False)

@@ -129,4 +129,4 @@ if __name__ == '__main__':
print("IMAGE_DIR or ANNO_PATH not exits.")

print("Start Eval!")
MaskRcnn_eval(mindrecord_file, args_opt.checkpoint_path, args_opt.ann_file)
maskrcnn_eval(mindrecord_file, args_opt.checkpoint_path, args_opt.ann_file)

+ 6
- 5
model_zoo/official/cv/maskrcnn/postprocess.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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
@@ -29,11 +29,11 @@ parser.add_argument("--ann_file", type=str, required=True, help="ann file.")
parser.add_argument("--img_path", type=str, required=True, help="image file path.")
args = parser.parse_args()

def get_imgSize(file_name):
def get_img_size(file_name):
img = Image.open(file_name)
return img.size

def get_resizeRatio(img_size):
def get_resize_ratio(img_size):
org_width, org_height = img_size
resize_ratio = dst_width / org_width
if resize_ratio > dst_height / org_height:
@@ -42,6 +42,7 @@ def get_resizeRatio(img_size):
return resize_ratio

def get_eval_result(ann_file, img_path):
""" Get metrics result according to the annotation file and result file"""
max_num = 128
result_path = "./result_Files/"
outputs = []
@@ -52,8 +53,8 @@ def get_eval_result(ann_file, img_path):
for img_id in img_ids:
file_id = str(img_id).zfill(12)
file = img_path + "/" + file_id + ".jpg"
img_size = get_imgSize(file)
resize_ratio = get_resizeRatio(img_size)
img_size = get_img_size(file)
resize_ratio = get_resize_ratio(img_size)

img_metas = np.array([img_size[1], img_size[0]] + [resize_ratio, resize_ratio])



+ 1
- 1
model_zoo/official/cv/maskrcnn/train.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 3
- 3
model_zoo/official/cv/maskrcnn_mobilenetv1/eval.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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
@@ -39,7 +39,7 @@ args_opt = parser.parse_args()

context.set_context(mode=context.GRAPH_MODE, device_target="Ascend", device_id=args_opt.device_id)

def MaskRcnn_eval(dataset_path, ckpt_path, ann_file):
def maskrcnn_eval(dataset_path, ckpt_path, ann_file):
"""MaskRcnn evaluation."""
ds = create_maskrcnn_dataset(dataset_path, batch_size=config.test_batch_size, is_training=False)

@@ -131,4 +131,4 @@ if __name__ == '__main__':
print("IMAGE_DIR or ANNO_PATH not exits.")

print("Start Eval!")
MaskRcnn_eval(mindrecord_file, args_opt.checkpoint_path, args_opt.ann_file)
maskrcnn_eval(mindrecord_file, args_opt.checkpoint_path, args_opt.ann_file)

+ 1
- 1
model_zoo/official/cv/maskrcnn_mobilenetv1/train.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 3
- 3
model_zoo/official/cv/retinaface_resnet50/eval.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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
@@ -95,8 +95,8 @@ class DetectionEngine:
intersect_area = intersect_w * intersect_h
ovr = intersect_area / (areas[i] + areas[order[1:]] - intersect_area)
indexs = np.where(ovr <= threshold)[0]
order = order[indexs + 1]
indices = np.where(ovr <= threshold)[0]
order = order[indices + 1]
return reserved_boxes


+ 1
- 1
model_zoo/official/cv/retinaface_resnet50/scripts/run_distribute_gpu_train.sh View File

@@ -7,7 +7,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
model_zoo/official/cv/retinaface_resnet50/scripts/run_standalone_gpu_eval.sh View File

@@ -7,7 +7,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 2
- 2
model_zoo/official/cv/retinaface_resnet50/src/augmemtation.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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
@@ -170,7 +170,7 @@ def get_interp_method(interp, sizes=()):
Neighbors method. (used by default).
4: Lanczos interpolation over 8x8 pixel neighborhood.
9: Cubic for enlarge, area for shrink, bilinear for others
10: Random select from interpolation method metioned above.
10: Random select from interpolation method mentioned above.
Note:
When shrinking an image, it will generally look best with AREA-based
interpolation, whereas, when enlarging an image, it will generally look best


+ 1
- 1
model_zoo/official/cv/retinaface_resnet50/src/config.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
model_zoo/official/cv/retinaface_resnet50/src/dataset.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
model_zoo/official/cv/retinaface_resnet50/src/loss.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
model_zoo/official/cv/retinaface_resnet50/src/lr_schedule.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
model_zoo/official/cv/retinaface_resnet50/src/network.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
model_zoo/official/cv/retinaface_resnet50/src/utils.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
model_zoo/official/cv/retinaface_resnet50/train.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
model_zoo/official/cv/retinanet/eval.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
model_zoo/official/cv/retinanet/train.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
model_zoo/official/cv/ssd/eval.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
model_zoo/official/cv/ssd/postprocess.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
model_zoo/official/cv/ssd/train.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
model_zoo/official/cv/unet/eval.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
model_zoo/official/cv/unet/export.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
model_zoo/official/cv/unet/scripts/run_distribute_train.sh View File

@@ -7,7 +7,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
model_zoo/official/cv/unet/scripts/run_standalone_eval.sh View File

@@ -7,7 +7,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
model_zoo/official/cv/unet/scripts/run_standalone_train.sh View File

@@ -7,7 +7,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
model_zoo/official/cv/unet/src/config.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
model_zoo/official/cv/unet/src/data_loader.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
model_zoo/official/cv/unet/src/loss.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
model_zoo/official/cv/unet/src/unet_medical/__init__.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
model_zoo/official/cv/unet/src/unet_medical/unet_model.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
model_zoo/official/cv/unet/src/unet_medical/unet_parts.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
model_zoo/official/cv/unet/src/unet_nested/__init__.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
model_zoo/official/cv/unet/src/unet_nested/unet_model.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
model_zoo/official/cv/unet/src/unet_nested/unet_parts.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
model_zoo/official/cv/unet/src/utils.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
model_zoo/official/cv/unet/train.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
model_zoo/official/cv/yolov3_resnet18/eval.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
model_zoo/official/cv/yolov3_resnet18/train.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
model_zoo/research/cv/ssd_ghostnet/eval.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 9
- 3
model_zoo/research/cv/ssd_ghostnet/train.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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
@@ -32,7 +32,10 @@ from src.lr_schedule import get_lr
from src.init_params import init_net_param, filter_checkpoint_parameter


def main():
def get_args():
"""
Parse arguments
"""
parser = argparse.ArgumentParser(description="SSD training")
parser.add_argument("--only_create_dataset", type=ast.literal_eval, default=False,
help="If set it true, only create Mindrecord, default is False.")
@@ -47,7 +50,7 @@ def main():
parser.add_argument("--mode", type=str, default="sink",
help="Run sink mode or not, default is sink.")
parser.add_argument("--dataset", type=str, default="coco",
help="Dataset, defalut is coco.")
help="Dataset, default is coco.")
parser.add_argument("--epoch_size", type=int, default=500,
help="Epoch size, default is 500.")
parser.add_argument("--batch_size", type=int, default=32,
@@ -63,7 +66,10 @@ def main():
parser.add_argument("--filter_weight", type=ast.literal_eval, default=False,
help="Filter weight parameters, default is False.")
args_opt = parser.parse_args()
return args_opt

def main():
args_opt = get_args()
context.set_context(mode=context.GRAPH_MODE,
device_target="Ascend", device_id=args_opt.device_id)



+ 1
- 1
tests/st/model_zoo_tests/yolov3/test_yolov3.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


+ 1
- 1
tests/st/model_zoo_tests/yolov3_darknet53/test_yolov3_darknet53.py View File

@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# less required by applicable law or agreed to in writing, software
# 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


Loading…
Cancel
Save