KaihuaTang / Scene-Graph-Benchmark.pytorch

A new codebase for popular Scene Graph Generation methods (2020). Visualization & Scene Graph Extraction on custom images/datasets are provided. It's also a PyTorch implementation of paper “Unbiased Scene Graph Generation from Biased Training CVPR 2020”
MIT License
1.03k stars 228 forks source link

Detect Scene Graphs on My Custom Images #181

Closed F-Yuan303 closed 1 year ago

F-Yuan303 commented 1 year ago

❓ Questions and Help

Hi , I tried to Detect Scene Graphs on My Own Images using the command below:

CUDA_VISIBLE_DEVICES=0 python -m torch.distributed.launch --master_port 10027 --nproc_per_node=1 tools/relation_test_net.py --config-file "configs/e2e_relation_X_101_32_8_FPN_1x.yaml" MODEL.ROI_RELATION_HEAD.USE_GT_BOX False MODEL.ROI_RELATION_HEAD.USE_GT_OBJECT_LABEL False MODEL.ROI_RELATION_HEAD.PREDICTOR CausalAnalysisPredictor MODEL.ROI_RELATION_HEAD.CAUSAL.EFFECT_TYPE TDE MODEL.ROI_RELATION_HEAD.CAUSAL.FUSION_TYPE sum MODEL.ROI_RELATION_HEAD.CAUSAL.CONTEXT_LAYER motifs TEST.IMS_PER_BATCH 1 DTYPE "float16" GLOVE_DIR /data/fyuan/Scene-Graph-Benchmark/custom_file/glove MODEL.PRETRAINED_DETECTOR_CKPT /data/fyuan/Scene-Graph-Benchmark/custom_file/upload_causal_motif_sgdet OUTPUT_DIR /data/fyuan/Scene-Graph-Benchmark/custom_file/upload_causal_motif_sgdet
TEST.CUSTUM_EVAL True TEST.CUSTUM_PATH /data/fyuan/Scene-Graph-Benchmark/custom_file/custom_images DETECTED_SGG_DIR /data/fyuan/Scene-Graph-Benchmark/custom_file/jsonfiles

but i encounter the error " FileNotFoundError: [Errno 2] No such file or directory: '/home/kaihua/checkpoints/upload_causal_motif_sgdet/model_0028000.pth' "

i found that : " last_saved /home/kaihua/checkpoints/upload_causal_motif_sgdet/model_0028000.pth 2022-08-16 10:24:54,173 maskrcnn_benchmark.utils.checkpoint INFO: Loading checkpoint from /home/kaihua/checkpoints/upload_causal_motif_sgdet/model_0028000.pth " the last saved path didn't change, I've rummaged through the code and couldn't solve the problem, I'd appreciate if anyone could help me with this.