mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-07 01:22:59 +08:00
Fix requirements (#59)
* Fix bug in ppyoloe * fix ppyoloe output format * remove some requirements * fix conflicts
This commit is contained in:
@@ -12,10 +12,8 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import cv2
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
from tqdm import trange
|
|
||||||
|
|
||||||
|
|
||||||
def topk_accuracy(topk_list, label_list):
|
def topk_accuracy(topk_list, label_list):
|
||||||
@@ -25,6 +23,9 @@ def topk_accuracy(topk_list, label_list):
|
|||||||
|
|
||||||
|
|
||||||
def eval_classify(model, image_file_path, label_file_path, topk=5):
|
def eval_classify(model, image_file_path, label_file_path, topk=5):
|
||||||
|
from tqdm import trange
|
||||||
|
import cv2
|
||||||
|
|
||||||
result_list = []
|
result_list = []
|
||||||
label_list = []
|
label_list = []
|
||||||
image_label_dict = {}
|
image_label_dict = {}
|
||||||
|
@@ -12,11 +12,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from tqdm import trange
|
|
||||||
import cv2
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from .utils import CocoDetection
|
|
||||||
from .utils import COCOMetric
|
|
||||||
import copy
|
import copy
|
||||||
import collections
|
import collections
|
||||||
|
|
||||||
@@ -27,6 +23,11 @@ def eval_detection(model,
|
|||||||
conf_threshold=None,
|
conf_threshold=None,
|
||||||
nms_iou_threshold=None,
|
nms_iou_threshold=None,
|
||||||
plot=False):
|
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:
|
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 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, (
|
assert isinstance(conf_threshold, (
|
||||||
|
@@ -1,5 +1 @@
|
|||||||
opencv-python
|
requests
|
||||||
tqdm
|
|
||||||
numpy
|
|
||||||
pycocotools
|
|
||||||
colorama
|
|
||||||
|
Reference in New Issue
Block a user