├── .gitignore ├── LICENSE ├── Makefile ├── README.md ├── config.py ├── data └── stanford_filtered │ └── README.md ├── dataloaders ├── __init__.py ├── blob.py ├── image_transforms.py └── visual_genome.py ├── lib ├── __init__.py ├── draw_rectangles │ ├── draw_rectangles.c │ ├── draw_rectangles.pyx │ └── setup.py ├── evaluation │ ├── __init__.py │ ├── sg_eval.py │ ├── sg_eval_all_rel_cates.py │ ├── sg_eval_slow.py │ └── test_sg_eval.py ├── fpn │ ├── anchor_targets.py │ ├── box_intersections_cpu │ │ ├── bbox.c │ │ ├── bbox.pyx │ │ └── setup.py │ ├── box_utils.py │ ├── generate_anchors.py │ ├── make.sh │ ├── nms │ │ ├── Makefile │ │ ├── build.py │ │ ├── functions │ │ │ └── nms.py │ │ └── src │ │ │ ├── cuda │ │ │ ├── Makefile │ │ │ ├── nms_kernel.cu │ │ │ └── nms_kernel.h │ │ │ ├── nms_cuda.c │ │ │ └── nms_cuda.h │ ├── proposal_assignments │ │ ├── proposal_assignments_det.py │ │ ├── proposal_assignments_gtbox.py │ │ ├── proposal_assignments_postnms.py │ │ ├── proposal_assignments_rel.py │ │ └── rel_assignments.py │ └── roi_align │ │ ├── Makefile │ │ ├── __init__.py │ │ ├── _ext │ │ ├── __init__.py │ │ └── roi_align │ │ │ └── __init__.py │ │ ├── build.py │ │ ├── functions │ │ ├── __init__.py │ │ └── roi_align.py │ │ ├── modules │ │ ├── __init__.py │ │ └── roi_align.py │ │ └── src │ │ ├── cuda │ │ ├── Makefile │ │ ├── roi_align_kernel.cu │ │ └── roi_align_kernel.h │ │ ├── roi_align_cuda.c │ │ └── roi_align_cuda.h ├── get_union_boxes.py ├── ggnn.py ├── kern_model.py ├── object_detector.py ├── pytorch_misc.py ├── resnet.py └── surgery.py ├── models ├── eval_rels.py ├── train_detector.py └── train_rels.py ├── prior_matrices └── generate_knowledge.py └── scripts ├── eval_kern_predcls.sh ├── eval_kern_sgcls.sh ├── eval_kern_sgdet.sh ├── pretrain_detector.sh ├── train_kern_predcls.sh ├── train_kern_sgcls.sh └── train_kern_sgdet.sh /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/.gitignore -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/LICENSE -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/Makefile -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/README.md -------------------------------------------------------------------------------- /config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/config.py -------------------------------------------------------------------------------- /data/stanford_filtered/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/data/stanford_filtered/README.md -------------------------------------------------------------------------------- /dataloaders/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dataloaders/blob.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/dataloaders/blob.py -------------------------------------------------------------------------------- /dataloaders/image_transforms.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/dataloaders/image_transforms.py -------------------------------------------------------------------------------- /dataloaders/visual_genome.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/dataloaders/visual_genome.py -------------------------------------------------------------------------------- /lib/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/draw_rectangles/draw_rectangles.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/draw_rectangles/draw_rectangles.c -------------------------------------------------------------------------------- /lib/draw_rectangles/draw_rectangles.pyx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/draw_rectangles/draw_rectangles.pyx -------------------------------------------------------------------------------- /lib/draw_rectangles/setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/draw_rectangles/setup.py -------------------------------------------------------------------------------- /lib/evaluation/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/evaluation/sg_eval.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/evaluation/sg_eval.py -------------------------------------------------------------------------------- /lib/evaluation/sg_eval_all_rel_cates.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/evaluation/sg_eval_all_rel_cates.py -------------------------------------------------------------------------------- /lib/evaluation/sg_eval_slow.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/evaluation/sg_eval_slow.py -------------------------------------------------------------------------------- /lib/evaluation/test_sg_eval.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/evaluation/test_sg_eval.py -------------------------------------------------------------------------------- /lib/fpn/anchor_targets.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/fpn/anchor_targets.py -------------------------------------------------------------------------------- /lib/fpn/box_intersections_cpu/bbox.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/fpn/box_intersections_cpu/bbox.c -------------------------------------------------------------------------------- /lib/fpn/box_intersections_cpu/bbox.pyx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/fpn/box_intersections_cpu/bbox.pyx -------------------------------------------------------------------------------- /lib/fpn/box_intersections_cpu/setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/fpn/box_intersections_cpu/setup.py -------------------------------------------------------------------------------- /lib/fpn/box_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/fpn/box_utils.py -------------------------------------------------------------------------------- /lib/fpn/generate_anchors.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/fpn/generate_anchors.py -------------------------------------------------------------------------------- /lib/fpn/make.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/fpn/make.sh -------------------------------------------------------------------------------- /lib/fpn/nms/Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/fpn/nms/Makefile -------------------------------------------------------------------------------- /lib/fpn/nms/build.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/fpn/nms/build.py -------------------------------------------------------------------------------- /lib/fpn/nms/functions/nms.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/fpn/nms/functions/nms.py -------------------------------------------------------------------------------- /lib/fpn/nms/src/cuda/Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/fpn/nms/src/cuda/Makefile -------------------------------------------------------------------------------- /lib/fpn/nms/src/cuda/nms_kernel.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/fpn/nms/src/cuda/nms_kernel.cu -------------------------------------------------------------------------------- /lib/fpn/nms/src/cuda/nms_kernel.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/fpn/nms/src/cuda/nms_kernel.h -------------------------------------------------------------------------------- /lib/fpn/nms/src/nms_cuda.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/fpn/nms/src/nms_cuda.c -------------------------------------------------------------------------------- /lib/fpn/nms/src/nms_cuda.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/fpn/nms/src/nms_cuda.h -------------------------------------------------------------------------------- /lib/fpn/proposal_assignments/proposal_assignments_det.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/fpn/proposal_assignments/proposal_assignments_det.py -------------------------------------------------------------------------------- /lib/fpn/proposal_assignments/proposal_assignments_gtbox.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/fpn/proposal_assignments/proposal_assignments_gtbox.py -------------------------------------------------------------------------------- /lib/fpn/proposal_assignments/proposal_assignments_postnms.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/fpn/proposal_assignments/proposal_assignments_postnms.py -------------------------------------------------------------------------------- /lib/fpn/proposal_assignments/proposal_assignments_rel.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/fpn/proposal_assignments/proposal_assignments_rel.py -------------------------------------------------------------------------------- /lib/fpn/proposal_assignments/rel_assignments.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/fpn/proposal_assignments/rel_assignments.py -------------------------------------------------------------------------------- /lib/fpn/roi_align/Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/fpn/roi_align/Makefile -------------------------------------------------------------------------------- /lib/fpn/roi_align/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/fpn/roi_align/_ext/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/fpn/roi_align/_ext/roi_align/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/fpn/roi_align/_ext/roi_align/__init__.py -------------------------------------------------------------------------------- /lib/fpn/roi_align/build.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/fpn/roi_align/build.py -------------------------------------------------------------------------------- /lib/fpn/roi_align/functions/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/fpn/roi_align/functions/roi_align.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/fpn/roi_align/functions/roi_align.py -------------------------------------------------------------------------------- /lib/fpn/roi_align/modules/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/fpn/roi_align/modules/roi_align.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/fpn/roi_align/modules/roi_align.py -------------------------------------------------------------------------------- /lib/fpn/roi_align/src/cuda/Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/fpn/roi_align/src/cuda/Makefile -------------------------------------------------------------------------------- /lib/fpn/roi_align/src/cuda/roi_align_kernel.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/fpn/roi_align/src/cuda/roi_align_kernel.cu -------------------------------------------------------------------------------- /lib/fpn/roi_align/src/cuda/roi_align_kernel.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/fpn/roi_align/src/cuda/roi_align_kernel.h -------------------------------------------------------------------------------- /lib/fpn/roi_align/src/roi_align_cuda.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/fpn/roi_align/src/roi_align_cuda.c -------------------------------------------------------------------------------- /lib/fpn/roi_align/src/roi_align_cuda.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/fpn/roi_align/src/roi_align_cuda.h -------------------------------------------------------------------------------- /lib/get_union_boxes.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/get_union_boxes.py -------------------------------------------------------------------------------- /lib/ggnn.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/ggnn.py -------------------------------------------------------------------------------- /lib/kern_model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/kern_model.py -------------------------------------------------------------------------------- /lib/object_detector.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/object_detector.py -------------------------------------------------------------------------------- /lib/pytorch_misc.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/pytorch_misc.py -------------------------------------------------------------------------------- /lib/resnet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/resnet.py -------------------------------------------------------------------------------- /lib/surgery.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/lib/surgery.py -------------------------------------------------------------------------------- /models/eval_rels.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/models/eval_rels.py -------------------------------------------------------------------------------- /models/train_detector.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/models/train_detector.py -------------------------------------------------------------------------------- /models/train_rels.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/models/train_rels.py -------------------------------------------------------------------------------- /prior_matrices/generate_knowledge.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/prior_matrices/generate_knowledge.py -------------------------------------------------------------------------------- /scripts/eval_kern_predcls.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/scripts/eval_kern_predcls.sh -------------------------------------------------------------------------------- /scripts/eval_kern_sgcls.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/scripts/eval_kern_sgcls.sh -------------------------------------------------------------------------------- /scripts/eval_kern_sgdet.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/scripts/eval_kern_sgdet.sh -------------------------------------------------------------------------------- /scripts/pretrain_detector.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/scripts/pretrain_detector.sh -------------------------------------------------------------------------------- /scripts/train_kern_predcls.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/scripts/train_kern_predcls.sh -------------------------------------------------------------------------------- /scripts/train_kern_sgcls.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/scripts/train_kern_sgcls.sh -------------------------------------------------------------------------------- /scripts/train_kern_sgdet.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCPLab-SYSU/KERN/HEAD/scripts/train_kern_sgdet.sh --------------------------------------------------------------------------------