Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
UltralyticsAssistant committed Jul 5, 2024
1 parent 2edd803 commit bdc46c5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from collections import defaultdict

import torch.nn as nn

from utils.utils import *


Expand Down
1 change: 1 addition & 0 deletions scoring/matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from collections import defaultdict

import numpy as np

from scoring.rectangle import Rectangle


Expand Down
3 changes: 2 additions & 1 deletion scoring/score.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@

import numpy as np
import scipy.io
from tqdm import tqdm

from scoring.matching import Matching
from scoring.rectangle import Rectangle
from tqdm import tqdm

"""
Scoring code to calculate per-class precision and mean average precision.
Expand Down
4 changes: 3 additions & 1 deletion utils/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,9 @@ def resize_square(img, height=416, color=(0, 0, 0)): # resizes a rectangular im
def random_affine(
img, targets=None, degrees=(-10, 10), translate=(0.1, 0.1), scale=(0.9, 1.1), shear=(-3, 3), borderValue=(0, 0, 0)
):
"""Performs random affine transformations on an image and its target annotations, including rotation, translation, scaling, and shearing."""
"""Performs random affine transformations on an image and its target annotations, including rotation, translation,
scaling, and shearing.
"""
# torchvision.transforms.RandomAffine(degrees=(-10, 10), translate=(.1, .1), scale=(.9, 1.1), shear=(-10, 10))
# https://medium.com/uruvideo/dataset-augmentation-with-random-homographies-a8f4b44830d4
border = 750
Expand Down

0 comments on commit bdc46c5

Please sign in to comment.