Spaces:
Sleeping
Sleeping
Update lib/models/YOLOP.py
Browse files- lib/models/YOLOP.py +1 -16
lib/models/YOLOP.py
CHANGED
|
@@ -14,7 +14,7 @@ sys.path.append(os.getcwd())
|
|
| 14 |
from lib.models.common import Conv, SPP, Bottleneck, BottleneckCSP, Focus, Concat, Detect, SharpenConv
|
| 15 |
from torch.nn import Upsample
|
| 16 |
#from lib.utils import check_anchor_order
|
| 17 |
-
from lib.core.evaluate import SegmentationMetric
|
| 18 |
#from lib.utils.utils import time_synchronized
|
| 19 |
|
| 20 |
def check_anchor_order(m):
|
|
@@ -545,18 +545,3 @@ def get_net(cfg, **kwargs):
|
|
| 545 |
m_block_cfg = YOLOP
|
| 546 |
model = MCnet(m_block_cfg, **kwargs)
|
| 547 |
return model
|
| 548 |
-
|
| 549 |
-
|
| 550 |
-
if __name__ == "__main__":
|
| 551 |
-
from torch.utils.tensorboard import SummaryWriter
|
| 552 |
-
model = get_net(False)
|
| 553 |
-
input_ = torch.randn((1, 3, 256, 256))
|
| 554 |
-
gt_ = torch.rand((1, 2, 256, 256))
|
| 555 |
-
metric = SegmentationMetric(2)
|
| 556 |
-
model_out,SAD_out = model(input_)
|
| 557 |
-
detects, dring_area_seg, lane_line_seg = model_out
|
| 558 |
-
Da_fmap, LL_fmap = SAD_out
|
| 559 |
-
for det in detects:
|
| 560 |
-
print(det.shape)
|
| 561 |
-
print(dring_area_seg.shape)
|
| 562 |
-
print(lane_line_seg.shape)
|
|
|
|
| 14 |
from lib.models.common import Conv, SPP, Bottleneck, BottleneckCSP, Focus, Concat, Detect, SharpenConv
|
| 15 |
from torch.nn import Upsample
|
| 16 |
#from lib.utils import check_anchor_order
|
| 17 |
+
#from lib.core.evaluate import SegmentationMetric
|
| 18 |
#from lib.utils.utils import time_synchronized
|
| 19 |
|
| 20 |
def check_anchor_order(m):
|
|
|
|
| 545 |
m_block_cfg = YOLOP
|
| 546 |
model = MCnet(m_block_cfg, **kwargs)
|
| 547 |
return model
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|