Skip to content

I have a probelm running inference.py -m demo #53

@LAWSSSS

Description

@LAWSSSS

I implemented this code to train a model of my own. My dataset only contains one label which is different from two labels in the original code. However, after I obtained a series of model files, whenever I try to run 'inference.py -m demo', I will encounter the following errors:

Traceback (most recent call last):
  File "inference_copy.py", line 191, in <module>
    generate_output(input_files, mode)
  File "inference_copy.py", line 161, in generate_output
    image = run_inference(image_orig, model, sess, mode, sign_map)
  File "inference_copy.py", line 75, in run_inference
    boxes = nms(y_pred_conf, y_pred_loc, prob)
  File "F:\Vehicle_Identification_Number\model.py", line 250, in nms
    iou = calc_iou(box[:4], other_box[:4])
  File "F:\Vehicle_Identification_Number\data_prep.py", line 32, in calc_iou
    iou = intersection / union
ZeroDivisionError: division by zero

It seems that there are some problems with NMS. But I don't know where goes wrong.
I changed the 'NUM_CLASSES' in the setting.py from 3 to 2(1 label + 1 background). Is there anything I have to modify in order to get my model working properly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions