File size: 42,617 Bytes
9968cfd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
2024-09-21 17:32:30,446 - mmdet - INFO - Environment info:
------------------------------------------------------------
sys.platform: linux
Python: 3.8.19 (default, Mar 20 2024, 19:58:24) [GCC 11.2.0]
CUDA available: True
GPU 0,1,2,3,4,5,6,7: NVIDIA RTX A5000
CUDA_HOME: /data/home/hanbo/cuda-11.6
NVCC: Cuda compilation tools, release 11.6, V11.6.55
GCC: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
PyTorch: 1.12.1+cu116
PyTorch compiling details: PyTorch built with:
  - GCC 9.3
  - C++ Version: 201402
  - Intel(R) Math Kernel Library Version 2020.0.0 Product Build 20191122 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v2.6.0 (Git Hash 52b5f107dd9cf10910aaa19cb47f3abf9b349815)
  - OpenMP 201511 (a.k.a. OpenMP 4.5)
  - LAPACK is enabled (usually provided by MKL)
  - NNPACK is enabled
  - CPU capability usage: AVX2
  - CUDA Runtime 11.6
  - NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86
  - CuDNN 8.3.2  (built against CUDA 11.5)
  - Magma 2.6.1
  - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.6, CUDNN_VERSION=8.3.2, CXX_COMPILER=/opt/rh/devtoolset-9/root/usr/bin/c++, CXX_FLAGS= -fabi-version=11 -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.12.1, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=OFF, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, USE_ROCM=OFF, 

TorchVision: 0.13.1+cu116
OpenCV: 4.10.0
MMCV: 1.7.2
MMCV Compiler: GCC 9.3
MMCV CUDA Compiler: 11.6
MMDetection: 2.28.2+d592e33
------------------------------------------------------------

2024-09-21 17:32:31,819 - mmdet - INFO - Distributed training: True
2024-09-21 17:32:33,172 - mmdet - INFO - Config:
norm_cfg = dict(
    type='BN',
    requires_grad=False,
    mean=[123.675, 116.28, 103.53],
    std=[1.0, 1.0, 1.0],
    to_rgb=True)
model = dict(
    type='FasterRCNNRelAfford',
    backbone=dict(
        type='mmdet.ResNet',
        depth=101,
        num_stages=3,
        strides=(1, 2, 2),
        dilations=(1, 1, 1),
        out_indices=(2, ),
        frozen_stages=1,
        norm_cfg=dict(type='BN', requires_grad=False),
        norm_eval=True,
        style='caffe',
        init_cfg=dict(
            type='Pretrained',
            checkpoint='open-mmlab://detectron2/resnet101_caffe')),
    rpn_head=dict(
        type='mmdet.RPNHead',
        in_channels=1024,
        feat_channels=1024,
        anchor_generator=dict(
            type='AnchorGenerator',
            scales=[8, 16, 32],
            ratios=[0.33, 0.5, 1.0, 2.0, 3.0],
            strides=[16]),
        bbox_coder=dict(
            type='DeltaXYWHBBoxCoder',
            target_means=[0.0, 0.0, 0.0, 0.0],
            target_stds=[1.0, 1.0, 1.0, 1.0]),
        loss_cls=dict(
            type='mmdet.CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
        loss_bbox=dict(type='mmdet.L1Loss', loss_weight=1.0)),
    roi_head=None,
    child_head=dict(
        type='invigorate.PairedRoIHead',
        shared_head=dict(
            type='invigorate.PairedResLayer',
            depth=50,
            stage=3,
            stride=1,
            style='caffe',
            norm_eval=False,
            share_weights=False),
        paired_roi_extractor=dict(
            type='invigorate.VMRNPairedRoIExtractor',
            roi_layer=dict(type='RoIPool', output_size=7),
            out_channels=1024,
            featmap_strides=[16]),
        relation_head=dict(
            type='invigorate.BBoxPairHead',
            with_avg_pool=True,
            roi_feat_size=7,
            in_channels=2048,
            num_relations=1,
            loss_cls=dict(
                type='mmdet.CrossEntropyLoss',
                use_sigmoid=False,
                loss_weight=1.0))),
    leaf_head=dict(
        type='mmdet.StandardRoIHead',
        shared_head=dict(
            type='mmdet.ResLayer',
            depth=50,
            stage=3,
            stride=1,
            style='caffe',
            norm_cfg=dict(type='BN', requires_grad=False),
            norm_eval=True),
        bbox_roi_extractor=dict(
            type='mmdet.SingleRoIExtractor',
            roi_layer=dict(type='RoIAlign', output_size=7, sampling_ratio=0),
            out_channels=1024,
            featmap_strides=[16]),
        bbox_head=dict(
            type='mmdet.BBoxHead',
            with_avg_pool=True,
            with_reg=False,
            roi_feat_size=7,
            in_channels=2048,
            num_classes=2,
            loss_cls=dict(
                type='mmdet.CrossEntropyLoss',
                use_sigmoid=False,
                loss_weight=1.0))),
    train_cfg=dict(
        rpn=dict(
            assigner=dict(
                type='MaxIoUAssigner',
                pos_iou_thr=0.7,
                neg_iou_thr=0.3,
                min_pos_iou=0.3,
                match_low_quality=True,
                ignore_iof_thr=-1),
            sampler=dict(
                type='RandomSampler',
                num=256,
                pos_fraction=0.5,
                neg_pos_ub=-1,
                add_gt_as_proposals=False),
            allowed_border=0,
            pos_weight=-1,
            debug=False),
        rpn_proposal=dict(
            nms_pre=12000,
            max_per_img=2000,
            nms=dict(type='nms', iou_threshold=0.7),
            min_bbox_size=0),
        rcnn=dict(
            assigner=dict(
                type='MaxIoUAssigner',
                pos_iou_thr=0.5,
                neg_iou_thr=0.5,
                min_pos_iou=0.5,
                match_low_quality=False,
                ignore_iof_thr=-1),
            sampler=dict(
                type='RandomSampler',
                num=256,
                pos_fraction=0.25,
                neg_pos_ub=-1,
                add_gt_as_proposals=True),
            pos_weight=-1,
            debug=False),
        child_head=dict(
            assigner=dict(
                type='MaxIoUAssigner',
                pos_iou_thr=0.7,
                neg_iou_thr=0.5,
                min_pos_iou=0.7,
                match_low_quality=False,
                ignore_iof_thr=-1),
            relation_sampler=dict(
                type='RandomRelationSampler',
                num=32,
                pos_fraction=0.5,
                cls_ratio_ub=1.0,
                add_gt_as_proposals=True,
                num_relation_cls=1,
                neg_id=0),
            pos_weight=-1,
            online_data=True,
            online_start_iteration=0),
        leaf_head=dict(
            assigner=dict(
                type='MaxIoUAssigner',
                pos_iou_thr=0.5,
                neg_iou_thr=0.5,
                min_pos_iou=0.5,
                match_low_quality=False,
                ignore_iof_thr=-1),
            sampler=dict(
                type='RandomSampler',
                num=64,
                pos_fraction=0.25,
                neg_pos_ub=3.0,
                add_gt_as_proposals=True),
            pos_weight=-1,
            debug=False)),
    test_cfg=dict(
        rpn=dict(
            nms_pre=6000,
            max_per_img=300,
            nms=dict(type='nms', iou_threshold=0.7),
            min_bbox_size=0),
        rcnn=dict(
            score_thr=0.05,
            nms=dict(type='nms', iou_threshold=0.3),
            max_per_img=100),
        child_head=dict(
            bbox_score_thr=0.5, verbose_relation=False, average_scores=False),
        leaf_head=dict(score_thr=0.5, nms=None, max_per_img=100)))
dataset_type = 'REGRADAffordDataset'
data_root = 'data/regrad/'
img_norm_cfg = dict(
    mean=[123.675, 116.28, 103.53], std=[1.0, 1.0, 1.0], to_rgb=True)
train_pipeline = [
    dict(type='LoadImageFromFile', to_float32=True),
    dict(
        type='LoadAnnotationsCustom',
        keys=['gt_bboxes', 'gt_labels', 'gt_relchilds', 'gt_relleaves']),
    dict(type='RandomFlip', flip_ratio=0.5),
    dict(type='PhotoMetricDistortion'),
    dict(
        type='RandomCrop', crop_type='random_keep', allow_negative_crop=False),
    dict(type='Expand', mean=[123.675, 116.28, 103.53], ratio_range=(1, 2)),
    dict(type='Resize', img_scale=(1000, 600), keep_ratio=True),
    dict(
        type='Normalize',
        mean=[123.675, 116.28, 103.53],
        std=[1.0, 1.0, 1.0],
        to_rgb=True),
    dict(type='Pad', size_divisor=32),
    dict(
        type='DefaultFormatBundleCustom',
        keys=['img', 'gt_bboxes', 'gt_labels', 'gt_relchilds',
              'gt_relleaves']),
    dict(
        type='Collect',
        keys=['img', 'gt_bboxes', 'gt_labels', 'gt_relchilds', 'gt_relleaves'])
]
test_pipeline = [
    dict(type='LoadImageFromFile'),
    dict(type='LoadRelationProposals'),
    dict(
        type='MultiScaleFlipAug',
        img_scale=(1000, 600),
        flip=False,
        transforms=[
            dict(type='Resize', keep_ratio=True),
            dict(
                type='Normalize',
                mean=[123.675, 116.28, 103.53],
                std=[1.0, 1.0, 1.0],
                to_rgb=True),
            dict(type='Pad', size_divisor=32),
            dict(type='ImageToTensor', keys=['img']),
            dict(type='Collect', keys=['img', 'relation_proposals'])
        ])
]
data = dict(
    train=dict(
        _delete_=True,
        type='ConcatDataset',
        datasets=[
            dict(
                type='REGRADAffordDataset',
                data_root='data/regrad/',
                meta_info_file='dataset_train_5k/meta_infos.json',
                ann_file='dataset_train_5k/objects.json',
                img_prefix='dataset_train_5k/RGBImages',
                seg_prefix='dataset_train_5k/SegmentationImages',
                depth_prefix='dataset_train_5k/DepthImages',
                pipeline=[
                    dict(type='LoadImageFromFile', to_float32=True),
                    dict(
                        type='LoadAnnotationsCustom',
                        keys=[
                            'gt_bboxes', 'gt_labels', 'gt_relchilds',
                            'gt_relleaves'
                        ]),
                    dict(type='RandomFlip', flip_ratio=0.5),
                    dict(type='PhotoMetricDistortion'),
                    dict(
                        type='RandomCrop',
                        crop_type='random_keep',
                        allow_negative_crop=False),
                    dict(type='Expand', mean=[123.675, 116.28, 103.53]),
                    dict(
                        type='Resize', img_scale=(1000, 600), keep_ratio=True),
                    dict(
                        type='Normalize',
                        mean=[123.675, 116.28, 103.53],
                        std=[1.0, 1.0, 1.0],
                        to_rgb=True),
                    dict(type='Pad', size_divisor=32),
                    dict(
                        type='DefaultFormatBundleCustom',
                        keys=[
                            'img', 'gt_bboxes', 'gt_labels', 'gt_relchilds',
                            'gt_relleaves'
                        ]),
                    dict(
                        type='Collect',
                        keys=[
                            'img', 'gt_bboxes', 'gt_labels', 'gt_relchilds',
                            'gt_relleaves'
                        ])
                ],
                min_pos_relation=1,
                class_agnostic=True),
            dict(
                type='MetaGraspNetAffordDataset',
                data_root='data/metagraspnet/sim/',
                meta_info_file='meta_infos_train.json',
                pipeline=[
                    dict(type='LoadImageFromFile', to_float32=True),
                    dict(
                        type='LoadAnnotationsCustom',
                        keys=[
                            'gt_bboxes', 'gt_labels', 'gt_relchilds',
                            'gt_relleaves'
                        ]),
                    dict(type='RandomFlip', flip_ratio=0.5),
                    dict(type='PhotoMetricDistortion'),
                    dict(
                        type='RandomCrop',
                        crop_type='random_keep',
                        allow_negative_crop=False),
                    dict(
                        type='Expand',
                        mean=[123.675, 116.28, 103.53],
                        ratio_range=(1, 2)),
                    dict(
                        type='Resize', img_scale=(1000, 600), keep_ratio=True),
                    dict(
                        type='Normalize',
                        mean=[123.675, 116.28, 103.53],
                        std=[1.0, 1.0, 1.0],
                        to_rgb=True),
                    dict(type='Pad', size_divisor=32),
                    dict(
                        type='DefaultFormatBundleCustom',
                        keys=[
                            'img', 'gt_bboxes', 'gt_labels', 'gt_relchilds',
                            'gt_relleaves'
                        ]),
                    dict(
                        type='Collect',
                        keys=[
                            'img', 'gt_bboxes', 'gt_labels', 'gt_relchilds',
                            'gt_relleaves'
                        ])
                ],
                min_pos_relation=1,
                class_agnostic=True),
            dict(
                type='VMRDAffordDataset',
                ann_file='data/vmrd/ImageSets/Main/trainval.txt',
                img_prefix='data/vmrd/',
                pipeline=[
                    dict(type='LoadImageFromFile', to_float32=True),
                    dict(
                        type='LoadAnnotationsCustom',
                        keys=[
                            'gt_bboxes', 'gt_labels', 'gt_relchilds',
                            'gt_relleaves'
                        ]),
                    dict(type='RandomFlip', flip_ratio=0.5),
                    dict(type='PhotoMetricDistortion'),
                    dict(type='Expand', mean=[123.675, 116.28, 103.53]),
                    dict(
                        type='Resize', img_scale=(1000, 600), keep_ratio=True),
                    dict(
                        type='Normalize',
                        mean=[123.675, 116.28, 103.53],
                        std=[1.0, 1.0, 1.0],
                        to_rgb=True),
                    dict(type='Pad', size_divisor=32),
                    dict(
                        type='DefaultFormatBundleCustom',
                        keys=[
                            'img', 'gt_bboxes', 'gt_labels', 'gt_relchilds',
                            'gt_relleaves'
                        ]),
                    dict(
                        type='Collect',
                        keys=[
                            'img', 'gt_bboxes', 'gt_labels', 'gt_relchilds',
                            'gt_relleaves'
                        ])
                ],
                class_agnostic=True),
            dict(
                type='VRDAffordDataset',
                data_root='data/vrd/',
                ann_file='sg_dataset/sg_train_annotations.json',
                img_prefix='sg_dataset/sg_train_images/',
                pipeline=[
                    dict(type='LoadImageFromFile', to_float32=True),
                    dict(
                        type='LoadAnnotationsCustom',
                        keys=[
                            'gt_bboxes', 'gt_labels', 'gt_relchilds',
                            'gt_relleaves'
                        ]),
                    dict(type='RandomFlip', flip_ratio=0.5),
                    dict(
                        type='Resize', img_scale=(1000, 600), keep_ratio=True),
                    dict(
                        type='Normalize',
                        mean=[123.675, 116.28, 103.53],
                        std=[1.0, 1.0, 1.0],
                        to_rgb=True),
                    dict(type='Pad', size_divisor=32),
                    dict(
                        type='DefaultFormatBundleCustom',
                        keys=[
                            'img', 'gt_bboxes', 'gt_labels', 'gt_relchilds',
                            'gt_relleaves'
                        ]),
                    dict(
                        type='Collect',
                        keys=[
                            'img', 'gt_bboxes', 'gt_labels', 'gt_relchilds',
                            'gt_relleaves'
                        ])
                ],
                class_agnostic=True),
            dict(
                type='VGAffordDataset',
                data_root='data/vg/downloads',
                ann_file='relationships.json',
                img_prefix='',
                pipeline=[
                    dict(type='LoadImageFromFile', to_float32=True),
                    dict(
                        type='LoadAnnotationsCustom',
                        keys=[
                            'gt_bboxes', 'gt_labels', 'gt_relchilds',
                            'gt_relleaves'
                        ]),
                    dict(type='RandomFlip', flip_ratio=0.5),
                    dict(
                        type='Resize', img_scale=(1000, 600), keep_ratio=True),
                    dict(
                        type='Normalize',
                        mean=[123.675, 116.28, 103.53],
                        std=[1.0, 1.0, 1.0],
                        to_rgb=True),
                    dict(type='Pad', size_divisor=32),
                    dict(
                        type='DefaultFormatBundleCustom',
                        keys=[
                            'img', 'gt_bboxes', 'gt_labels', 'gt_relchilds',
                            'gt_relleaves'
                        ]),
                    dict(
                        type='Collect',
                        keys=[
                            'img', 'gt_bboxes', 'gt_labels', 'gt_relchilds',
                            'gt_relleaves'
                        ])
                ],
                class_agnostic=True)
        ],
        separate_eval=True,
        class_agnostic=True),
    val=dict(
        _delete_=True,
        type='ConcatDataset',
        datasets=[
            dict(
                type='REGRADAffordDataset',
                data_root='data/regrad/',
                using_depth=False,
                using_gt_proposals=True,
                meta_info_file='dataset_seen_val_1k/meta_infos.json',
                ann_file='dataset_seen_val_1k/objects.json',
                img_prefix='dataset_seen_val_1k/RGBImages',
                seg_prefix='dataset_seen_val_1k/SegmentationImages',
                depth_prefix='dataset_seen_val_1k/DepthImages',
                test_mode=True,
                pipeline=[
                    dict(type='LoadImageFromFile'),
                    dict(type='LoadRelationProposals'),
                    dict(
                        type='MultiScaleFlipAug',
                        img_scale=(1000, 600),
                        flip=False,
                        transforms=[
                            dict(type='Resize', keep_ratio=True),
                            dict(
                                type='Normalize',
                                mean=[123.675, 116.28, 103.53],
                                std=[1.0, 1.0, 1.0],
                                to_rgb=True),
                            dict(type='Pad', size_divisor=32),
                            dict(type='ImageToTensor', keys=['img']),
                            dict(
                                type='Collect',
                                keys=['img', 'relation_proposals'])
                        ])
                ],
                class_agnostic=True,
                max_sample_num=1000),
            dict(
                type='VMRDAffordDataset',
                ann_file='data/vmrd/ImageSets/Main/test.txt',
                img_prefix='data/vmrd/',
                using_gt_proposals=True,
                pipeline=[
                    dict(type='LoadImageFromFile'),
                    dict(type='LoadRelationProposals'),
                    dict(
                        type='MultiScaleFlipAug',
                        img_scale=(1000, 600),
                        flip=False,
                        transforms=[
                            dict(type='Resize', keep_ratio=True),
                            dict(
                                type='Normalize',
                                mean=[123.675, 116.28, 103.53],
                                std=[1.0, 1.0, 1.0],
                                to_rgb=True),
                            dict(type='Pad', size_divisor=32),
                            dict(type='ImageToTensor', keys=['img']),
                            dict(
                                type='Collect',
                                keys=['img', 'relation_proposals'])
                        ])
                ],
                class_agnostic=True)
        ],
        separate_eval=True,
        class_agnostic=True),
    test=dict(
        _delete_=True,
        type='ConcatDataset',
        datasets=[
            dict(
                type='REGRADAffordDataset',
                data_root='data/regrad/',
                using_depth=False,
                using_gt_proposals=True,
                meta_info_file='dataset_seen_val_1k/meta_infos.json',
                ann_file='dataset_seen_val_1k/objects.json',
                img_prefix='dataset_seen_val_1k/RGBImages',
                seg_prefix='dataset_seen_val_1k/SegmentationImages',
                depth_prefix='dataset_seen_val_1k/DepthImages',
                test_mode=True,
                pipeline=[
                    dict(type='LoadImageFromFile'),
                    dict(type='LoadRelationProposals'),
                    dict(
                        type='MultiScaleFlipAug',
                        img_scale=(1000, 600),
                        flip=False,
                        transforms=[
                            dict(type='Resize', keep_ratio=True),
                            dict(
                                type='Normalize',
                                mean=[123.675, 116.28, 103.53],
                                std=[1.0, 1.0, 1.0],
                                to_rgb=True),
                            dict(type='Pad', size_divisor=32),
                            dict(type='ImageToTensor', keys=['img']),
                            dict(
                                type='Collect',
                                keys=['img', 'relation_proposals'])
                        ])
                ],
                class_agnostic=True,
                max_sample_num=1000),
            dict(
                type='VMRDAffordDataset',
                ann_file='data/vmrd/ImageSets/Main/test.txt',
                img_prefix='data/vmrd/',
                using_gt_proposals=True,
                pipeline=[
                    dict(type='LoadImageFromFile'),
                    dict(type='LoadRelationProposals'),
                    dict(
                        type='MultiScaleFlipAug',
                        img_scale=(1000, 600),
                        flip=False,
                        transforms=[
                            dict(type='Resize', keep_ratio=True),
                            dict(
                                type='Normalize',
                                mean=[123.675, 116.28, 103.53],
                                std=[1.0, 1.0, 1.0],
                                to_rgb=True),
                            dict(type='Pad', size_divisor=32),
                            dict(type='ImageToTensor', keys=['img']),
                            dict(
                                type='Collect',
                                keys=['img', 'relation_proposals'])
                        ])
                ],
                class_agnostic=True)
        ],
        separate_eval=True,
        class_agnostic=True),
    samples_per_gpu=4,
    workers_per_gpu=2)
evaluation = dict(interval=1, metric=['mAP', 'ImgAcc'])
optimizer = dict(type='SGD', lr=0.005, momentum=0.9, weight_decay=0.0001)
optimizer_config = dict(grad_clip=dict(max_norm=100, norm_type=2))
lr_config = dict(
    policy='step',
    warmup='linear',
    warmup_iters=4000,
    warmup_ratio=0.001,
    step=[12, 18])
runner = dict(type='EpochBasedRunner', max_epochs=20)
checkpoint_config = dict(interval=1, max_keep_ckpts=5)
log_config = dict(interval=50, hooks=[dict(type='TextLoggerHook')])
dist_params = dict(backend='nccl')
log_level = 'INFO'
load_from = None
resume_from = None
workflow = [('train', 1)]
opencv_num_threads = 0
mp_start_method = 'fork'
auto_scale_lr = dict(enable=False, base_batch_size=16)
mmdet = None
mmdet_root = '/data/home/hanbo/projects/cloud_services/service/vmrn/vmrn_models/mmdetection/mmdet'
test_with_object_detector = False
test_crop_config = (174, 79, 462, 372)
kinect_img_pipeline = [
    dict(type='LoadImageFromFile'),
    dict(type='LoadRelationProposals'),
    dict(
        type='FixedCrop',
        crop_type='absolute',
        top_left=(174, 79),
        bottom_right=(462, 372)),
    dict(
        type='MultiScaleFlipAug',
        img_scale=(1000, 600),
        flip=False,
        transforms=[
            dict(type='Resize', keep_ratio=True),
            dict(
                type='Normalize',
                mean=[123.675, 116.28, 103.53],
                std=[1.0, 1.0, 1.0],
                to_rgb=True),
            dict(type='Pad', size_divisor=32),
            dict(type='ImageToTensor', keys=['img']),
            dict(type='Collect', keys=['img', 'relation_proposals'])
        ])
]
seen_val_dataset = dict(
    type='REGRADAffordDataset',
    data_root='data/regrad/',
    using_depth=False,
    using_gt_proposals=True,
    meta_info_file='dataset_seen_val_1k/meta_infos.json',
    ann_file='dataset_seen_val_1k/objects.json',
    img_prefix='dataset_seen_val_1k/RGBImages',
    seg_prefix='dataset_seen_val_1k/SegmentationImages',
    depth_prefix='dataset_seen_val_1k/DepthImages',
    test_mode=True,
    pipeline=[
        dict(type='LoadImageFromFile'),
        dict(type='LoadRelationProposals'),
        dict(
            type='MultiScaleFlipAug',
            img_scale=(1000, 600),
            flip=False,
            transforms=[
                dict(type='Resize', keep_ratio=True),
                dict(
                    type='Normalize',
                    mean=[123.675, 116.28, 103.53],
                    std=[1.0, 1.0, 1.0],
                    to_rgb=True),
                dict(type='Pad', size_divisor=32),
                dict(type='ImageToTensor', keys=['img']),
                dict(type='Collect', keys=['img', 'relation_proposals'])
            ])
    ],
    class_agnostic=True,
    max_sample_num=1000)
unseen_val_dataset = dict(
    type='REGRADAffordDataset',
    data_root='data/regrad/',
    using_depth=False,
    using_gt_proposals=True,
    meta_info_file='dataset_unseen_val_1k/meta_infos.json',
    ann_file='dataset_unseen_val_1k/objects.json',
    img_prefix='dataset_unseen_val_1k/RGBImages',
    seg_prefix='dataset_unseen_val_1k/SegmentationImages',
    depth_prefix='dataset_unseen_val_1k/DepthImages',
    test_mode=True,
    pipeline=[
        dict(type='LoadImageFromFile'),
        dict(type='LoadRelationProposals'),
        dict(
            type='MultiScaleFlipAug',
            img_scale=(1000, 600),
            flip=False,
            transforms=[
                dict(type='Resize', keep_ratio=True),
                dict(
                    type='Normalize',
                    mean=[123.675, 116.28, 103.53],
                    std=[1.0, 1.0, 1.0],
                    to_rgb=True),
                dict(type='Pad', size_divisor=32),
                dict(type='ImageToTensor', keys=['img']),
                dict(type='Collect', keys=['img', 'relation_proposals'])
            ])
    ],
    class_agnostic=True,
    max_sample_num=1000)
real_val_dataset = dict(
    type='REGRADAffordDataset',
    data_root='data/regrad/',
    using_depth=False,
    using_gt_proposals=True,
    meta_info_file='real/meta_infos.json',
    ann_file='real/objects.json',
    img_prefix='real/RGBImages',
    img_suffix='png',
    depth_prefix='real/DepthImages',
    test_mode=True,
    test_gt_bbox_offset=(174, 79),
    pipeline=[
        dict(type='LoadImageFromFile'),
        dict(type='LoadRelationProposals'),
        dict(
            type='FixedCrop',
            crop_type='absolute',
            top_left=(174, 79),
            bottom_right=(462, 372)),
        dict(
            type='MultiScaleFlipAug',
            img_scale=(1000, 600),
            flip=False,
            transforms=[
                dict(type='Resize', keep_ratio=True),
                dict(
                    type='Normalize',
                    mean=[123.675, 116.28, 103.53],
                    std=[1.0, 1.0, 1.0],
                    to_rgb=True),
                dict(type='Pad', size_divisor=32),
                dict(type='ImageToTensor', keys=['img']),
                dict(type='Collect', keys=['img', 'relation_proposals'])
            ])
    ],
    class_agnostic=True)
regrad_datatype = 'REGRADAffordDataset'
regrad_root = 'data/regrad/'
vmrd_datatype = 'VMRDAffordDataset'
vmrd_root = 'data/vmrd/'
vmrd_train = dict(
    type='VMRDAffordDataset',
    ann_file='data/vmrd/ImageSets/Main/trainval.txt',
    img_prefix='data/vmrd/',
    pipeline=[
        dict(type='LoadImageFromFile', to_float32=True),
        dict(
            type='LoadAnnotationsCustom',
            keys=['gt_bboxes', 'gt_labels', 'gt_relchilds', 'gt_relleaves']),
        dict(type='RandomFlip', flip_ratio=0.5),
        dict(type='PhotoMetricDistortion'),
        dict(type='Expand', mean=[123.675, 116.28, 103.53]),
        dict(type='Resize', img_scale=(1000, 600), keep_ratio=True),
        dict(
            type='Normalize',
            mean=[123.675, 116.28, 103.53],
            std=[1.0, 1.0, 1.0],
            to_rgb=True),
        dict(type='Pad', size_divisor=32),
        dict(
            type='DefaultFormatBundleCustom',
            keys=[
                'img', 'gt_bboxes', 'gt_labels', 'gt_relchilds', 'gt_relleaves'
            ]),
        dict(
            type='Collect',
            keys=[
                'img', 'gt_bboxes', 'gt_labels', 'gt_relchilds', 'gt_relleaves'
            ])
    ],
    class_agnostic=True)
regrad_train = dict(
    type='REGRADAffordDataset',
    data_root='data/regrad/',
    meta_info_file='dataset_train_5k/meta_infos.json',
    ann_file='dataset_train_5k/objects.json',
    img_prefix='dataset_train_5k/RGBImages',
    seg_prefix='dataset_train_5k/SegmentationImages',
    depth_prefix='dataset_train_5k/DepthImages',
    pipeline=[
        dict(type='LoadImageFromFile', to_float32=True),
        dict(
            type='LoadAnnotationsCustom',
            keys=['gt_bboxes', 'gt_labels', 'gt_relchilds', 'gt_relleaves']),
        dict(type='RandomFlip', flip_ratio=0.5),
        dict(type='PhotoMetricDistortion'),
        dict(
            type='RandomCrop',
            crop_type='random_keep',
            allow_negative_crop=False),
        dict(type='Expand', mean=[123.675, 116.28, 103.53]),
        dict(type='Resize', img_scale=(1000, 600), keep_ratio=True),
        dict(
            type='Normalize',
            mean=[123.675, 116.28, 103.53],
            std=[1.0, 1.0, 1.0],
            to_rgb=True),
        dict(type='Pad', size_divisor=32),
        dict(
            type='DefaultFormatBundleCustom',
            keys=[
                'img', 'gt_bboxes', 'gt_labels', 'gt_relchilds', 'gt_relleaves'
            ]),
        dict(
            type='Collect',
            keys=[
                'img', 'gt_bboxes', 'gt_labels', 'gt_relchilds', 'gt_relleaves'
            ])
    ],
    min_pos_relation=1,
    class_agnostic=True)
metagraspnet_sim_train = dict(
    type='MetaGraspNetAffordDataset',
    data_root='data/metagraspnet/sim/',
    meta_info_file='meta_infos_train.json',
    pipeline=[
        dict(type='LoadImageFromFile', to_float32=True),
        dict(
            type='LoadAnnotationsCustom',
            keys=['gt_bboxes', 'gt_labels', 'gt_relchilds', 'gt_relleaves']),
        dict(type='RandomFlip', flip_ratio=0.5),
        dict(type='PhotoMetricDistortion'),
        dict(
            type='RandomCrop',
            crop_type='random_keep',
            allow_negative_crop=False),
        dict(
            type='Expand', mean=[123.675, 116.28, 103.53], ratio_range=(1, 2)),
        dict(type='Resize', img_scale=(1000, 600), keep_ratio=True),
        dict(
            type='Normalize',
            mean=[123.675, 116.28, 103.53],
            std=[1.0, 1.0, 1.0],
            to_rgb=True),
        dict(type='Pad', size_divisor=32),
        dict(
            type='DefaultFormatBundleCustom',
            keys=[
                'img', 'gt_bboxes', 'gt_labels', 'gt_relchilds', 'gt_relleaves'
            ]),
        dict(
            type='Collect',
            keys=[
                'img', 'gt_bboxes', 'gt_labels', 'gt_relchilds', 'gt_relleaves'
            ])
    ],
    min_pos_relation=1,
    class_agnostic=True)
vgvrd_train_pipeline = [
    dict(type='LoadImageFromFile', to_float32=True),
    dict(
        type='LoadAnnotationsCustom',
        keys=['gt_bboxes', 'gt_labels', 'gt_relchilds', 'gt_relleaves']),
    dict(type='RandomFlip', flip_ratio=0.5),
    dict(type='Resize', img_scale=(1000, 600), keep_ratio=True),
    dict(
        type='Normalize',
        mean=[123.675, 116.28, 103.53],
        std=[1.0, 1.0, 1.0],
        to_rgb=True),
    dict(type='Pad', size_divisor=32),
    dict(
        type='DefaultFormatBundleCustom',
        keys=['img', 'gt_bboxes', 'gt_labels', 'gt_relchilds',
              'gt_relleaves']),
    dict(
        type='Collect',
        keys=['img', 'gt_bboxes', 'gt_labels', 'gt_relchilds', 'gt_relleaves'])
]
vrd_train = dict(
    type='VRDAffordDataset',
    data_root='data/vrd/',
    ann_file='sg_dataset/sg_train_annotations.json',
    img_prefix='sg_dataset/sg_train_images/',
    pipeline=[
        dict(type='LoadImageFromFile', to_float32=True),
        dict(
            type='LoadAnnotationsCustom',
            keys=['gt_bboxes', 'gt_labels', 'gt_relchilds', 'gt_relleaves']),
        dict(type='RandomFlip', flip_ratio=0.5),
        dict(type='Resize', img_scale=(1000, 600), keep_ratio=True),
        dict(
            type='Normalize',
            mean=[123.675, 116.28, 103.53],
            std=[1.0, 1.0, 1.0],
            to_rgb=True),
        dict(type='Pad', size_divisor=32),
        dict(
            type='DefaultFormatBundleCustom',
            keys=[
                'img', 'gt_bboxes', 'gt_labels', 'gt_relchilds', 'gt_relleaves'
            ]),
        dict(
            type='Collect',
            keys=[
                'img', 'gt_bboxes', 'gt_labels', 'gt_relchilds', 'gt_relleaves'
            ])
    ],
    class_agnostic=True)
vg_train = dict(
    type='VGAffordDataset',
    data_root='data/vg/downloads',
    ann_file='relationships.json',
    img_prefix='',
    pipeline=[
        dict(type='LoadImageFromFile', to_float32=True),
        dict(
            type='LoadAnnotationsCustom',
            keys=['gt_bboxes', 'gt_labels', 'gt_relchilds', 'gt_relleaves']),
        dict(type='RandomFlip', flip_ratio=0.5),
        dict(type='Resize', img_scale=(1000, 600), keep_ratio=True),
        dict(
            type='Normalize',
            mean=[123.675, 116.28, 103.53],
            std=[1.0, 1.0, 1.0],
            to_rgb=True),
        dict(type='Pad', size_divisor=32),
        dict(
            type='DefaultFormatBundleCustom',
            keys=[
                'img', 'gt_bboxes', 'gt_labels', 'gt_relchilds', 'gt_relleaves'
            ]),
        dict(
            type='Collect',
            keys=[
                'img', 'gt_bboxes', 'gt_labels', 'gt_relchilds', 'gt_relleaves'
            ])
    ],
    class_agnostic=True)
real_test_pipeline = [
    dict(type='LoadImageFromFile'),
    dict(type='LoadRelationProposals'),
    dict(
        type='FixedCrop',
        crop_type='absolute',
        top_left=(174, 79),
        bottom_right=(462, 372)),
    dict(
        type='MultiScaleFlipAug',
        img_scale=(1000, 600),
        flip=False,
        transforms=[
            dict(type='Resize', keep_ratio=True),
            dict(
                type='Normalize',
                mean=[123.675, 116.28, 103.53],
                std=[1.0, 1.0, 1.0],
                to_rgb=True),
            dict(type='Pad', size_divisor=32),
            dict(type='ImageToTensor', keys=['img']),
            dict(type='Collect', keys=['img', 'relation_proposals'])
        ])
]
regrad_seen_val_dataset = dict(
    type='REGRADAffordDataset',
    data_root='data/regrad/',
    using_depth=False,
    using_gt_proposals=True,
    meta_info_file='dataset_seen_val_1k/meta_infos.json',
    ann_file='dataset_seen_val_1k/objects.json',
    img_prefix='dataset_seen_val_1k/RGBImages',
    seg_prefix='dataset_seen_val_1k/SegmentationImages',
    depth_prefix='dataset_seen_val_1k/DepthImages',
    test_mode=True,
    pipeline=[
        dict(type='LoadImageFromFile'),
        dict(type='LoadRelationProposals'),
        dict(
            type='MultiScaleFlipAug',
            img_scale=(1000, 600),
            flip=False,
            transforms=[
                dict(type='Resize', keep_ratio=True),
                dict(
                    type='Normalize',
                    mean=[123.675, 116.28, 103.53],
                    std=[1.0, 1.0, 1.0],
                    to_rgb=True),
                dict(type='Pad', size_divisor=32),
                dict(type='ImageToTensor', keys=['img']),
                dict(type='Collect', keys=['img', 'relation_proposals'])
            ])
    ],
    class_agnostic=True,
    max_sample_num=1000)
regrad_unseen_val_dataset = dict(
    type='REGRADAffordDataset',
    data_root='data/regrad/',
    using_depth=False,
    using_gt_proposals=True,
    meta_info_file='dataset_unseen_val_1k/meta_infos.json',
    ann_file='dataset_unseen_val_1k/objects.json',
    img_prefix='dataset_unseen_val_1k/RGBImages',
    seg_prefix='dataset_unseen_val_1k/SegmentationImages',
    depth_prefix='dataset_unseen_val_1k/DepthImages',
    test_mode=True,
    pipeline=[
        dict(type='LoadImageFromFile'),
        dict(type='LoadRelationProposals'),
        dict(
            type='MultiScaleFlipAug',
            img_scale=(1000, 600),
            flip=False,
            transforms=[
                dict(type='Resize', keep_ratio=True),
                dict(
                    type='Normalize',
                    mean=[123.675, 116.28, 103.53],
                    std=[1.0, 1.0, 1.0],
                    to_rgb=True),
                dict(type='Pad', size_divisor=32),
                dict(type='ImageToTensor', keys=['img']),
                dict(type='Collect', keys=['img', 'relation_proposals'])
            ])
    ],
    class_agnostic=True,
    max_sample_num=1000)
regrad_real_val_dataset = dict(
    type='REGRADAffordDataset',
    data_root='data/regrad/',
    using_depth=False,
    using_gt_proposals=True,
    meta_info_file='real/meta_infos.json',
    ann_file='real/objects.json',
    img_prefix='real/RGBImages',
    img_suffix='png',
    depth_prefix='real/DepthImages',
    test_mode=True,
    test_gt_bbox_offset=(174, 79),
    pipeline=[
        dict(type='LoadImageFromFile'),
        dict(type='LoadRelationProposals'),
        dict(
            type='FixedCrop',
            crop_type='absolute',
            top_left=(174, 79),
            bottom_right=(462, 372)),
        dict(
            type='MultiScaleFlipAug',
            img_scale=(1000, 600),
            flip=False,
            transforms=[
                dict(type='Resize', keep_ratio=True),
                dict(
                    type='Normalize',
                    mean=[123.675, 116.28, 103.53],
                    std=[1.0, 1.0, 1.0],
                    to_rgb=True),
                dict(type='Pad', size_divisor=32),
                dict(type='ImageToTensor', keys=['img']),
                dict(type='Collect', keys=['img', 'relation_proposals'])
            ])
    ],
    class_agnostic=True)
vmrd_val_dataset = dict(
    type='VMRDAffordDataset',
    ann_file='data/vmrd/ImageSets/Main/test.txt',
    img_prefix='data/vmrd/',
    using_gt_proposals=True,
    pipeline=[
        dict(type='LoadImageFromFile'),
        dict(type='LoadRelationProposals'),
        dict(
            type='MultiScaleFlipAug',
            img_scale=(1000, 600),
            flip=False,
            transforms=[
                dict(type='Resize', keep_ratio=True),
                dict(
                    type='Normalize',
                    mean=[123.675, 116.28, 103.53],
                    std=[1.0, 1.0, 1.0],
                    to_rgb=True),
                dict(type='Pad', size_divisor=32),
                dict(type='ImageToTensor', keys=['img']),
                dict(type='Collect', keys=['img', 'relation_proposals'])
            ])
    ],
    class_agnostic=True)
train_sampler = dict(
    type='DistributedWeightedSampler',
    weights=[0.1, 0.1, 0.05, 0.05, 0.7],
    sample_per_epoch=150000,
    shuffle=True)
work_dir = './work_dirs/relation_afford_r101_caffe_c4_1x_regrad_vmrd_metagraspnet_vrd_vg_class_agnostic'
gpu_ids = range(0, 8)