mirror of
https://github.com/THU-MIG/yolov10.git
synced 2025-05-24 14:44:21 +08:00
Model
typehints Docker fix (#8306)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
e4a62f99f7
commit
7f0d5ef9d7
2
.github/workflows/ci.yaml
vendored
2
.github/workflows/ci.yaml
vendored
@ -113,7 +113,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip wheel
|
python -m pip install --upgrade pip wheel
|
||||||
pip install -e ".[export]" "coverage[toml]" --extra-index-url https://download.pytorch.org/whl/cpu
|
pip install -e ".[export]" "coverage[toml]" --extra-index-url https://download.pytorch.org/whl/cpu
|
||||||
yolo export format=tflite imgsz=32 || true
|
# yolo export format=tflite imgsz=32 || true
|
||||||
- name: Check environment
|
- name: Check environment
|
||||||
run: |
|
run: |
|
||||||
yolo checks
|
yolo checks
|
||||||
|
@ -33,7 +33,8 @@ RUN python3 -m pip install --upgrade pip wheel
|
|||||||
RUN pip install --no-cache -e ".[export]" albumentations comet pycocotools
|
RUN pip install --no-cache -e ".[export]" albumentations comet pycocotools
|
||||||
|
|
||||||
# Run exports to AutoInstall packages
|
# Run exports to AutoInstall packages
|
||||||
RUN yolo export model=tmp/yolov8n.pt format=edgetpu imgsz=32
|
# Edge TPU export fails the first time so is run twice here
|
||||||
|
RUN yolo export model=tmp/yolov8n.pt format=edgetpu imgsz=32 || yolo export model=tmp/yolov8n.pt format=edgetpu imgsz=32
|
||||||
RUN yolo export model=tmp/yolov8n.pt format=ncnn imgsz=32
|
RUN yolo export model=tmp/yolov8n.pt format=ncnn imgsz=32
|
||||||
# Requires <= Python 3.10, bug with paddlepaddle==2.5.0 https://github.com/PaddlePaddle/X2Paddle/issues/991
|
# Requires <= Python 3.10, bug with paddlepaddle==2.5.0 https://github.com/PaddlePaddle/X2Paddle/issues/991
|
||||||
RUN pip install --no-cache paddlepaddle>=2.6.0 x2paddle
|
RUN pip install --no-cache paddlepaddle>=2.6.0 x2paddle
|
||||||
|
@ -716,7 +716,7 @@ class Exporter:
|
|||||||
import tensorflow as tf # noqa
|
import tensorflow as tf # noqa
|
||||||
check_requirements(
|
check_requirements(
|
||||||
(
|
(
|
||||||
"onnx",
|
"onnx>=1.12.0",
|
||||||
"onnx2tf>=1.15.4,<=1.17.5",
|
"onnx2tf>=1.15.4,<=1.17.5",
|
||||||
"sng4onnx>=1.0.1",
|
"sng4onnx>=1.0.1",
|
||||||
"onnxsim>=0.4.33",
|
"onnxsim>=0.4.33",
|
||||||
|
@ -5,7 +5,6 @@ import sys
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Union
|
from typing import Union
|
||||||
|
|
||||||
import PIL
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import torch
|
import torch
|
||||||
|
|
||||||
@ -146,7 +145,7 @@ class Model(nn.Module):
|
|||||||
|
|
||||||
def __call__(
|
def __call__(
|
||||||
self,
|
self,
|
||||||
source: Union[str, Path, int, list, tuple, PIL.Image.Image, np.ndarray, torch.Tensor] = None,
|
source: Union[str, Path, int, list, tuple, np.ndarray, torch.Tensor] = None,
|
||||||
stream: bool = False,
|
stream: bool = False,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
) -> list:
|
) -> list:
|
||||||
@ -345,7 +344,7 @@ class Model(nn.Module):
|
|||||||
|
|
||||||
def embed(
|
def embed(
|
||||||
self,
|
self,
|
||||||
source: Union[str, Path, int, list, tuple, PIL.Image.Image, np.ndarray, torch.Tensor] = None,
|
source: Union[str, Path, int, list, tuple, np.ndarray, torch.Tensor] = None,
|
||||||
stream: bool = False,
|
stream: bool = False,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
) -> list:
|
) -> list:
|
||||||
@ -373,7 +372,7 @@ class Model(nn.Module):
|
|||||||
|
|
||||||
def predict(
|
def predict(
|
||||||
self,
|
self,
|
||||||
source: Union[str, Path, int, list, tuple, PIL.Image.Image, np.ndarray, torch.Tensor] = None,
|
source: Union[str, Path, int, list, tuple, np.ndarray, torch.Tensor] = None,
|
||||||
stream: bool = False,
|
stream: bool = False,
|
||||||
predictor=None,
|
predictor=None,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
@ -431,7 +430,7 @@ class Model(nn.Module):
|
|||||||
|
|
||||||
def track(
|
def track(
|
||||||
self,
|
self,
|
||||||
source: Union[str, Path, int, list, tuple, PIL.Image.Image, np.ndarray, torch.Tensor] = None,
|
source: Union[str, Path, int, list, tuple, np.ndarray, torch.Tensor] = None,
|
||||||
stream: bool = False,
|
stream: bool = False,
|
||||||
persist: bool = False,
|
persist: bool = False,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user