diff --git a/configs/coco/pvt_v2_b0.yaml b/configs/coco/pvt_v2_b0.yaml index 7920c06..24edefe 100644 --- a/configs/coco/pvt_v2_b0.yaml +++ b/configs/coco/pvt_v2_b0.yaml @@ -1,4 +1,4 @@ -_BASE_: "../Base-YoloV7.yaml" +_BASE_: "../Base-YOLOv7.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" MASK_ON: False diff --git a/configs/taco/darknet53.yaml b/configs/taco/darknet53.yaml index 66a4601..a22d549 100644 --- a/configs/taco/darknet53.yaml +++ b/configs/taco/darknet53.yaml @@ -1,4 +1,4 @@ -_BASE_: "../Base-YoloV7.yaml" +_BASE_: "../Base-YOLOv7.yaml" MODEL: WEIGHTS: "" MASK_ON: False diff --git a/configs/taco/r50.yaml b/configs/taco/r50.yaml index 3ce5bf1..055027e 100644 --- a/configs/taco/r50.yaml +++ b/configs/taco/r50.yaml @@ -1,4 +1,4 @@ -_BASE_: "../Base-YoloV7.yaml" +_BASE_: "../Base-YOLOv7.yaml" MODEL: META_ARCHITECTURE: "YOLOV7" WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" diff --git a/configs/tl/cspdarknet.yaml b/configs/tl/cspdarknet.yaml index 6d8ad03..34860a9 100644 --- a/configs/tl/cspdarknet.yaml +++ b/configs/tl/cspdarknet.yaml @@ -1,4 +1,4 @@ -_BASE_: "../Base-YoloV7.yaml" +_BASE_: "../Base-YOLOv7.yaml" MODEL: WEIGHTS: "" MASK_ON: False diff --git a/configs/tl/darknet53.yaml b/configs/tl/darknet53.yaml index 0651459..9dd5e7f 100644 --- a/configs/tl/darknet53.yaml +++ b/configs/tl/darknet53.yaml @@ -1,4 +1,4 @@ -_BASE_: "../Base-YoloV7.yaml" +_BASE_: "../Base-YOLOv7.yaml" MODEL: WEIGHTS: "" MASK_ON: False diff --git a/configs/tl/r50.yaml b/configs/tl/r50.yaml index 6c76096..d5b6ccf 100644 --- a/configs/tl/r50.yaml +++ b/configs/tl/r50.yaml @@ -1,4 +1,4 @@ -_BASE_: "../Base-YoloV7.yaml" +_BASE_: "../Base-YOLOv7.yaml" MODEL: META_ARCHITECTURE: "YOLOV7" WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" diff --git a/configs/tl/res2net_bifpn.yaml b/configs/tl/res2net_bifpn.yaml index 771ab8f..aa1c081 100644 --- a/configs/tl/res2net_bifpn.yaml +++ b/configs/tl/res2net_bifpn.yaml @@ -1,5 +1,5 @@ -_BASE_: "../Base-YoloV7.yaml" +_BASE_: "../Base-YOLOv7.yaml" MODEL: META_ARCHITECTURE: "YOLOV7" WEIGHTS: "weights/r2_50.pkl" diff --git a/configs/tl/res2net_fpn.yaml b/configs/tl/res2net_fpn.yaml index 33c8bca..8dc424d 100644 --- a/configs/tl/res2net_fpn.yaml +++ b/configs/tl/res2net_fpn.yaml @@ -1,4 +1,4 @@ -_BASE_: "../Base-YoloV7.yaml" +_BASE_: "../Base-YOLOv7.yaml" MODEL: META_ARCHITECTURE: "YOLOV7" # WEIGHTS: "weights/r2_50.pkl" diff --git a/configs/tl/x_s_pafpn_1gpu.yaml b/configs/tl/x_s_pafpn_1gpu.yaml index 96eba42..ab008b2 100644 --- a/configs/tl/x_s_pafpn_1gpu.yaml +++ b/configs/tl/x_s_pafpn_1gpu.yaml @@ -1,4 +1,4 @@ -_BASE_: "../Base-YoloV7.yaml" +_BASE_: "../Base-YOLOv7.yaml" MODEL: WEIGHTS: "" MASK_ON: False diff --git a/configs/visdrone/r2_50_1gpu.yaml b/configs/visdrone/r2_50_1gpu.yaml index d98ddb0..e654645 100644 --- a/configs/visdrone/r2_50_1gpu.yaml +++ b/configs/visdrone/r2_50_1gpu.yaml @@ -1,4 +1,4 @@ -_BASE_: "../Base-YoloV7.yaml" +_BASE_: "../Base-YOLOv7.yaml" MODEL: META_ARCHITECTURE: "YOLOV7" WEIGHTS: "" diff --git a/configs/voc/darknet53_1gpu.yaml b/configs/voc/darknet53_1gpu.yaml index 0ba3700..25432ff 100644 --- a/configs/voc/darknet53_1gpu.yaml +++ b/configs/voc/darknet53_1gpu.yaml @@ -1,4 +1,4 @@ -_BASE_: "../Base-YoloV7.yaml" +_BASE_: "../Base-YOLOv7.yaml" MODEL: META_ARCHITECTURE: "YOLOV7" WEIGHTS: "" diff --git a/configs/voc/x_s_pafpn_1gpu.yaml b/configs/voc/x_s_pafpn_1gpu.yaml index a74d88a..746db7a 100644 --- a/configs/voc/x_s_pafpn_1gpu.yaml +++ b/configs/voc/x_s_pafpn_1gpu.yaml @@ -1,4 +1,4 @@ -_BASE_: "../Base-YoloV7.yaml" +_BASE_: "../Base-YOLOv7.yaml" MODEL: WEIGHTS: "" MASK_ON: False diff --git a/configs/wearmask/r50_bifpn.yaml b/configs/wearmask/r50_bifpn.yaml index 69b3700..7dd0e42 100644 --- a/configs/wearmask/r50_bifpn.yaml +++ b/configs/wearmask/r50_bifpn.yaml @@ -1,4 +1,4 @@ -_BASE_: "../Base-YoloV7.yaml" +_BASE_: "../Base-YOLOv7.yaml" MODEL: META_ARCHITECTURE: "YOLOV7" WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" diff --git a/yolov7/modeling/backbone/layers/wrappers.py b/yolov7/modeling/backbone/layers/wrappers.py index d45acc6..c96ed1a 100644 --- a/yolov7/modeling/backbone/layers/wrappers.py +++ b/yolov7/modeling/backbone/layers/wrappers.py @@ -262,7 +262,7 @@ def conv2d_forward(self, input, weight): input = F.pad(input, expanded_padding, mode='circular') elif self.padding_mode == 'dynamic_same': - ih, iw = x.size()[-2:] + ih, iw = input.size()[-2:] kh, kw = self.weight.size()[-2:] sh, sw = self.stride oh, ow = math.ceil(ih / sh), math.ceil(iw / sw) diff --git a/yolov7/utils/boxes.py b/yolov7/utils/boxes.py index 6d9d3f2..9539e9c 100644 --- a/yolov7/utils/boxes.py +++ b/yolov7/utils/boxes.py @@ -1,21 +1,15 @@ -import numpy as np - -import torch -import torchvision - -import torch -import torch.nn as nn import math import numpy as np from enum import IntEnum, unique from typing import List, Tuple, Union +from pycocotools import mask as coco_mask + import torch -from torch import device -from torchvision.ops.boxes import nms, box_area -import cv2 -import torch.utils.data import torchvision -from pycocotools import mask as coco_mask +import torch.nn as nn +import torch.utils.data +from torchvision.ops.boxes import box_area + _RawBoxType = Union[List[float], Tuple[float, ...], torch.Tensor, np.ndarray]