Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added models/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file added models/__pycache__/common.cpython-311.pyc
Binary file not shown.
Binary file added models/__pycache__/experimental.cpython-311.pyc
Binary file not shown.
Binary file added models/__pycache__/yolo.cpython-311.pyc
Binary file not shown.
Binary file added utils/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file added utils/__pycache__/autoanchor.cpython-311.pyc
Binary file not shown.
Binary file added utils/__pycache__/datasets.cpython-311.pyc
Binary file not shown.
Binary file added utils/__pycache__/general.cpython-311.pyc
Binary file not shown.
Binary file added utils/__pycache__/google_utils.cpython-311.pyc
Binary file not shown.
Binary file added utils/__pycache__/loss.cpython-311.pyc
Binary file not shown.
Binary file added utils/__pycache__/metrics.cpython-311.pyc
Binary file not shown.
Binary file added utils/__pycache__/plots.cpython-311.pyc
Binary file not shown.
Binary file added utils/__pycache__/torch_utils.cpython-311.pyc
Binary file not shown.
4 changes: 2 additions & 2 deletions utils/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ def img2label_paths(img_paths):
self.label_files = img2label_paths(cache.keys()) # update

n = len(shapes) # number of images
bi = np.floor(np.arange(n) / batch_size).astype(np.int) # batch index
bi = np.floor(np.arange(n) / batch_size).astype(np.int64) # batch index
nb = bi[-1] + 1 # number of batches
self.batch = bi # batch index of image
self.n = n
Expand All @@ -436,7 +436,7 @@ def img2label_paths(img_paths):
elif mini > 1:
shapes[i] = [1, 1 / mini]

self.batch_shapes = np.ceil(np.array(shapes) * img_size / stride + pad).astype(np.int) * stride
self.batch_shapes = np.ceil(np.array(shapes) * img_size / stride + pad).astype(np.int64) * stride

# Check labels
create_datasubset, extract_bounding_boxes, labels_loaded = False, False, False
Expand Down
2 changes: 1 addition & 1 deletion utils/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def labels_to_class_weights(labels, nc=80):
return torch.Tensor()

labels = np.concatenate(labels, 0) # labels.shape = (866643, 5) for COCO
classes = labels[:, 0].astype(np.int) # labels = [class xywh]
classes = labels[:, 0].astype(np.int64) # labels = [class xywh]
weights = np.bincount(classes, minlength=nc) # occurrences per class

# Prepend gridpoint count (for uCE training)
Expand Down
2 changes: 1 addition & 1 deletion utils/loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def build_targets(p, targets, model):

# Append
a = t[:, 6].long() # anchor indices
indices.append((b, a, gj.clamp_(0, gain[3] - 1), gi.clamp_(0, gain[2] - 1))) # image, anchor, grid indices
indices.append((b, a, gj.clamp_(0, int(gain[3]) - 1), gi.clamp_(0, int(gain[2]) - 1))) # image, anchor, grid indices
tbox.append(torch.cat((gxy - gij, gwh), 1)) # box
anch.append(anchors[a]) # anchors
tcls.append(c) # class
Expand Down