Fix model re-fuse() in inference loops (#466)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ayush Chaurasia <ayush.chaurarsia@gmail.com>
This commit is contained in:
Glenn Jocher
2023-01-18 20:32:36 +01:00
committed by GitHub
parent cc3c774bde
commit a86218b767
22 changed files with 135 additions and 66 deletions

View File

@ -28,10 +28,9 @@ names:
# Download script/URL (optional) ---------------------------------------------------------------------------------------
download: |
import json
from tqdm import tqdm
from utils.general import download, Path
from ultralytics.yolo.utils.downloads import download
from pathlib import Path
def argoverse2yolo(set):
labels = {}

View File

@ -32,8 +32,8 @@ names:
# Download script/URL (optional) ---------------------------------------------------------------------------------------
download: |
from utils.general import download, Path
from ultralytics.yolo.utils.downloads import download
from pathlib import Path
# Download
dir = Path(yaml['path']) # dataset root dir

View File

@ -386,7 +386,12 @@ names:
download: |
from tqdm import tqdm
from utils.general import Path, check_requirements, download, np, xyxy2xywhn
from ultralytics.yolo.utils.checks import check_requirements
from ultralytics.yolo.utils.downloads import download
from ultralytics.yolo.utils.ops import xyxy2xywhn
import numpy as np
from pathlib import Path
check_requirements(('pycocotools>=2.0',))
from pycocotools.coco import COCO

View File

@ -21,9 +21,14 @@ names:
# Download script/URL (optional) ---------------------------------------------------------------------------------------
download: |
import shutil
from tqdm import tqdm
from utils.general import np, pd, Path, download, xyxy2xywh
from pathlib import Path
import numpy as np
import pandas as pd
from tqdm import tqdm
from ultralytics.yolo.utils.downloads import download
from ultralytics.yolo.utils.ops import xyxy2xywh
# Download
dir = Path(yaml['path']) # dataset root dir
@ -50,4 +55,4 @@ download: |
for r in x[images == im]:
w, h = r[6], r[7] # image width, height
xywh = xyxy2xywh(np.array([[r[1] / w, r[2] / h, r[3] / w, r[4] / h]]))[0] # instance
f.write(f"{cls} {xywh[0]:.5f} {xywh[1]:.5f} {xywh[2]:.5f} {xywh[3]:.5f}\n") # write label
f.write(f"{cls} {xywh[0]:.5f} {xywh[1]:.5f} {xywh[2]:.5f} {xywh[3]:.5f}\n") # write label

View File

@ -48,8 +48,8 @@ download: |
import xml.etree.ElementTree as ET
from tqdm import tqdm
from utils.general import download, Path
from ultralytics.yolo.utils.downloads import download
from pathlib import Path
def convert_label(path, lb_path, year, image_id):
def convert_box(size, box):

View File

@ -29,7 +29,10 @@ names:
# Download script/URL (optional) ---------------------------------------------------------------------------------------
download: |
from utils.general import download, os, Path
import os
from pathlib import Path
from ultralytics.yolo.utils.downloads import download
def visdrone2yolo(dir):
from PIL import Image

View File

@ -99,7 +99,9 @@ names:
# Download script/URL (optional)
download: |
from utils.general import download, Path
from ultralytics.yoloutils.downloads import download
from pathlib import Path
# Download labels
segments = True # segment or box labels
dir = Path(yaml['path']) # dataset root dir

View File

@ -87,8 +87,8 @@ download: |
from PIL import Image
from tqdm import tqdm
from utils.dataloaders import autosplit
from utils.general import download, xyxy2xywhn
from ultralytics.yolo.data.dataloaders.v5loader import autosplit
from ultralytics.yolo.utils.ops import xyxy2xywhn
def convert_labels(fname=Path('xView/xView_train.geojson')):