⚡️An Easy-to-use and Fast Deep Learning Model Deployment Toolkit for ☁️Cloud 📱Mobile and 📹Edge. Including Image, Video, Text and Audio 20+ main stream scenarios and 150+ SOTA models with end-to-end optimization, multi-platform and multi-framework support.
0904 12:09:52.059001 1627 pb_stub.cc:402] Failed to process the request(s) for model 'det_postprocess_0', message: AttributeError: module 'numpy' has no attribute 'astype'
At:
/usr/local/lib/python3.8/dist-packages/numpy/__init__.py(284): __getattr__
/opt/tritonserver/FastDeploy/examples/vision/ocr/PP-OCR/serving/fastdeploy_serving/models/det_postprocess/1/model.py(197): execute
for index in range(len(image_list)):
if cls_labels[index] == 1 and cls_scores[
index] > self.cls_threshold:
image_list[index] = cv2.rotate(
image_list[index].astype(np.float32), 1)
#image_list[index] = np.astype(np.uint8)
image_list[index] = image_list[index].astype(np.uint8)
报错如下
我根据报错尝试查看了一下这个det_postprocess/1/model.py的代码,execute方法里就两处用到了astype。其中有一行代码我看着很奇怪,尝试改了下(倒数第二行改为了倒数第一行)。改了之后就能正常识别之前会报错的那批图片了。这应该算是一个BUG吧,但是我不懂python不知道我改得对不对,希望大佬确认一下