EVAL.SSD Error

Hi All,

I’m following the HELLO AI WORLD tutorial to build image detection models. I want to use eval.ssd to evaluate their performance but when I do I get an error that says:

magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, ‘\x08’.

Here is the full error code:

Traceback (most recent call last):
File “jetson-inference/python/training/detection/ssd/eval_ssd.py”, line 150, in
net.load(args.trained_model)
File “/home/james/jetson-inference/python/training/detection/ssd/vision/ssd/ssd.py”, line 135, in load
self.load_state_dict(torch.load(model, map_location=lambda storage, loc: storage))
File “/home/james/.local/lib/python3.6/site-packages/torch/serialization.py”, line 585, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File “/home/james/.local/lib/python3.6/site-packages/torch/serialization.py”, line 755, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, ‘\x08’.

Does anyone know how to fix this issue ?

Thanks

Hi @jeheesom, are you passing the path of one of your trained .pth checkpoints to the --trained_model argument of eval_ssd.py on the command line?

HI Dusty,

I was not and now can use eval.ssd with a .pth file instead.

Is there a way to get accuracy out or is it limited to prevision?

Thanks

James

@jeheesom I think the precision and recall that it computes using IoU are typical metrics for object detection models. However since it already does the IoU, you may be add additional code to it to compute the measurements you want. Here is where it has done that:

Here is another page about the different evaluation metrics for object detectors: