mirror of
https://github.com/NanjingForestryUniversity/supermachine--tomato-passion_fruit.git
synced 2025-11-09 06:44:02 +00:00
fix:修复在20240627test4中的classifier.py的analyze_tomato函数中white_defect的函数忘记传递两个阈值量的错误;修复analyze_tomato函数中的叶片实例分割存在的问题,解决由于变量污染引起的分割错误;
18 lines
365 B
Python
18 lines
365 B
Python
# Ultralytics YOLOv5 🚀, AGPL-3.0 license
|
|
"""Perform test request."""
|
|
|
|
import pprint
|
|
|
|
import requests
|
|
|
|
DETECTION_URL = "http://localhost:5000/v1/object-detection/yolov5s"
|
|
IMAGE = "zidane.jpg"
|
|
|
|
# Read image
|
|
with open(IMAGE, "rb") as f:
|
|
image_data = f.read()
|
|
|
|
response = requests.post(DETECTION_URL, files={"image": image_data}).json()
|
|
|
|
pprint.pprint(response)
|