Standardize license headers in Python files (#18696)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
3620a07ed7
commit
deb87d8ce3
165 changed files with 169 additions and 169 deletions
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
from .fastsam import FastSAM
|
||||
from .nas import NAS
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
from .model import FastSAM
|
||||
from .predict import FastSAMPredictor
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
import torch
|
||||
from PIL import Image
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
|
||||
def adjust_bboxes_to_image_border(boxes, image_shape, threshold=20):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
from ultralytics.models.yolo.segment import SegmentationValidator
|
||||
from ultralytics.utils.metrics import SegmentMetrics
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
from .model import NAS
|
||||
from .predict import NASPredictor
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
"""
|
||||
YOLO-NAS model interface.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
import torch
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
import torch
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
from .model import RTDETR
|
||||
from .predict import RTDETRPredictor
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
"""
|
||||
Interface for Baidu's RT-DETR, a Vision Transformer-based real-time object detector. RT-DETR offers real-time
|
||||
performance and high accuracy, excelling in accelerated backends like CUDA with TensorRT. It features an efficient
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
import torch
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
from copy import copy
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
import torch
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
from .model import SAM
|
||||
from .predict import Predictor, SAM2Predictor, SAM2VideoPredictor
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
import math
|
||||
from itertools import product
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
# All rights reserved.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
"""
|
||||
SAM model interface.
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
import copy
|
||||
import math
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
from typing import List, Optional, Tuple, Type
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
from typing import List, Optional, Tuple, Type
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
import copy
|
||||
from typing import Optional
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
# All rights reserved.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
# --------------------------------------------------------
|
||||
# TinyViT Model Architecture
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
import math
|
||||
from typing import Tuple, Type
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
from typing import Tuple
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
"""
|
||||
Generate predictions using the Segment Anything Model (SAM).
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
import torch
|
||||
import torch.nn as nn
|
||||
|
|
@ -243,13 +243,11 @@ class DETRLoss(nn.Module):
|
|||
if len(gt_bboxes):
|
||||
gt_scores[idx] = bbox_iou(pred_bboxes.detach(), gt_bboxes, xywh=True).squeeze(-1)
|
||||
|
||||
loss = {
|
||||
return {
|
||||
**self._get_loss_class(pred_scores, targets, gt_scores, len(gt_bboxes), postfix),
|
||||
**self._get_loss_bbox(pred_bboxes, gt_bboxes, postfix),
|
||||
# **(self._get_loss_mask(masks, gt_mask, match_indices, postfix) if masks is not None and gt_mask is not None else {})
|
||||
}
|
||||
# if masks is not None and gt_mask is not None:
|
||||
# loss.update(self._get_loss_mask(masks, gt_mask, match_indices, postfix))
|
||||
return loss
|
||||
|
||||
def forward(self, pred_bboxes, pred_scores, batch, postfix="", **kwargs):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
import torch
|
||||
import torch.nn as nn
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
from ultralytics.models.yolo import classify, detect, obb, pose, segment, world
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
from ultralytics.models.yolo.classify.predict import ClassificationPredictor
|
||||
from ultralytics.models.yolo.classify.train import ClassificationTrainer
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
import cv2
|
||||
import torch
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
from copy import copy
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
import torch
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
from .predict import DetectionPredictor
|
||||
from .train import DetectionTrainer
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
from ultralytics.engine.predictor import BasePredictor
|
||||
from ultralytics.engine.results import Results
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
import math
|
||||
import random
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
from .predict import OBBPredictor
|
||||
from .train import OBBTrainer
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
import torch
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
from copy import copy
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
from .predict import PosePredictor
|
||||
from .train import PoseTrainer
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
from ultralytics.engine.results import Results
|
||||
from ultralytics.models.yolo.detect.predict import DetectionPredictor
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
from copy import copy
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
from .predict import SegmentationPredictor
|
||||
from .train import SegmentationTrainer
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
from ultralytics.engine.results import Results
|
||||
from ultralytics.models.yolo.detect.predict import DetectionPredictor
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
from copy import copy
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
from multiprocessing.pool import ThreadPool
|
||||
from pathlib import Path
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
from .train import WorldTrainer
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
import itertools
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
from ultralytics.data import YOLOConcatDataset, build_grounding, build_yolo_dataset
|
||||
from ultralytics.data.utils import check_det_dataset
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue