File size: 509 Bytes
2dcf762
c197dad
 
 
2cec8f9
c197dad
2dcf762
2cec8f9
2dcf762
 
2cec8f9
2dcf762
c197dad
 
 
2dcf762
 
2cec8f9
c68a924
c197dad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from config import model
from mmcv import Config
from mmdet.models import build_detector
import torch

def main():
    print(f"Model type: {model['type']}")

    detector = build_detector(model, train_cfg=model.get('train_cfg'), test_cfg=model.get('test_cfg'))
    detector.eval()

    print(detector)

    dummy_input = torch.randn(1, 3, 800, 1333)
    with torch.no_grad():
        output = detector.forward_dummy(dummy_input)
        print("Forward output:", output)

if __name__ == "__main__":
    main()