diff --git a/model_zoo/official/cv/maskrcnn_mobilenetv1/src/dataset.py b/model_zoo/official/cv/maskrcnn_mobilenetv1/src/dataset.py index bb055bde2c0..ddc294b44f0 100644 --- a/model_zoo/official/cv/maskrcnn_mobilenetv1/src/dataset.py +++ b/model_zoo/official/cv/maskrcnn_mobilenetv1/src/dataset.py @@ -17,15 +17,15 @@ from __future__ import division import os +import mmcv +import cv2 import numpy as np from numpy import random - -import mmcv import mindspore.dataset as de import mindspore.dataset.vision.c_transforms as C from mindspore.mindrecord import FileWriter from src.config import config -import cv2 + def bbox_overlaps(bboxes1, bboxes2, mode='iou'): """Calculate the ious between each bbox of bboxes1 and bboxes2. diff --git a/model_zoo/official/cv/maskrcnn_mobilenetv1/src/util.py b/model_zoo/official/cv/maskrcnn_mobilenetv1/src/util.py index 996c62fde51..2a59f6d8d14 100644 --- a/model_zoo/official/cv/maskrcnn_mobilenetv1/src/util.py +++ b/model_zoo/official/cv/maskrcnn_mobilenetv1/src/util.py @@ -14,12 +14,11 @@ # ============================================================================ """coco eval for maskrcnn_mobilenetv1""" import json +import mmcv import numpy as np from pycocotools.coco import COCO from pycocotools.cocoeval import COCOeval from pycocotools import mask as maskUtils -import mmcv - from src.config import config _init_value = np.array(0.0) diff --git a/model_zoo/official/nlp/tinybert/src/gd_config.py b/model_zoo/official/nlp/tinybert/src/gd_config.py index a49630d6fe6..228b5a6b69d 100644 --- a/model_zoo/official/nlp/tinybert/src/gd_config.py +++ b/model_zoo/official/nlp/tinybert/src/gd_config.py @@ -15,8 +15,8 @@ """ network config setting, will be used in dataset.py, run_general_distill.py and run_task_distill.py """ -import mindspore.common.dtype as mstype from easydict import EasyDict as edict +import mindspore.common.dtype as mstype from .tinybert_model import BertConfig common_cfg = edict({ diff --git a/model_zoo/official/nlp/tinybert/src/td_config.py b/model_zoo/official/nlp/tinybert/src/td_config.py index 4dba7fe8be9..9c6dda69771 100644 --- a/model_zoo/official/nlp/tinybert/src/td_config.py +++ b/model_zoo/official/nlp/tinybert/src/td_config.py @@ -15,8 +15,8 @@ """config script for task distill""" -import mindspore.common.dtype as mstype from easydict import EasyDict as edict +import mindspore.common.dtype as mstype from .tinybert_model import BertConfig phase1_cfg = edict({