Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions fastdeploy/vision/evaluation/classify.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import numpy as np
import cv2
import os
import re
from tqdm import trange


def topk_accuracy(topk_list, label_list):
Expand All @@ -25,6 +23,9 @@ def topk_accuracy(topk_list, label_list):


def eval_classify(model, image_file_path, label_file_path, topk=5):
from tqdm import trange
import cv2

result_list = []
label_list = []
image_label_dict = {}
Expand Down
9 changes: 5 additions & 4 deletions fastdeploy/vision/evaluation/detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from tqdm import trange
import cv2
import numpy as np
from .utils import CocoDetection
from .utils import COCOMetric
import copy
import collections

Expand All @@ -27,6 +23,11 @@ def eval_detection(model,
conf_threshold=None,
nms_iou_threshold=None,
plot=False):
from .utils import CocoDetection
from .utils import COCOMetric
import cv2
from tqdm import trange

if conf_threshold is not None or nms_iou_threshold is not None:
assert conf_threshold is not None and nms_iou_threshold is not None, "The conf_threshold and nms_iou_threshold should be setted at the same time"
assert isinstance(conf_threshold, (
Expand Down
6 changes: 1 addition & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
opencv-python
tqdm
numpy
pycocotools
colorama
requests