JosephKJ/OWOD

No unknown target is found when the trained model is used for inference

Closed this issue · 1 comments

Hi, Thanks for your excellent work!
When I used the weights downloaded from google drive to infer my custom dataset, I visualized the detection results and found that the first 20 categories of objects were detected, but the next 60 categories of objects and unknown objects were not detected.
I'm not sure if my config file is wrong or if the energy file is missing.
Here's my config file (I have placed my custom dataset in the corresponding directory of voc_coco_2007_test):

OUTPUT_DIR: "./output/t1"
MODEL:
  META_ARCHITECTURE: "GeneralizedRCNN"
  WEIGHTS: "output/t1/model_final.pth"
  RPN:
    PRE_NMS_TOPK_TEST: 6000
    POST_NMS_TOPK_TEST: 1000
  ROI_HEADS:
    #    NUM_CLASSES: 2 # 0~79 Known class; 80 -> Unknown; 81 -> Background.
    NUM_CLASSES: 81
    NAME: "Res5ROIHeads"
    POSITIVE_FRACTION: 0.25
    NMS_THRESH_TEST: 0.2
    SCORE_THRESH_TEST: 0.7
  MASK_ON: False
  RESNETS:
    DEPTH: 50
DATASETS:
  TRAIN: ("voc_coco_2007_test",)
  TEST: ("voc_coco_2007_test",)
SOLVER:
  IMS_PER_BATCH: 6
  BASE_LR: 0.01
  STEPS: (12000, 16000)
  MAX_ITER: 500
TEST:
  EXPECTED_RESULTS: []
VERSION: 2
OWOD:
  PREV_INTRODUCED_CLS: 20
  CUR_INTRODUCED_CLS: 0
  COMPUTE_ENERGY: False
  ENABLE_CLUSTERING: False
  ENERGY_SAVE_PATH: 'energy'
  SKIP_TRAINING_WHILE_EVAL: True
  ENABLE_CLUSTERING: False
  TEMPERATURE: 1.5
  FEATURE_STORE_SAVE_PATH: 'feature_store'
CUDNN_BENCHMARK: True

And my run command:

python tools/train_net.py --num-gpus 1 --config-file ./output/t1/t1_test.yaml --eval-only

When I run the command, the system displays the following message:

Energy distribution is not found at ./output/t1/energy_dist_20.pkl

Thanks!

You need to first generate the Energy distribution using the *_val yaml files.