EasyCV
EasyCV copied to clipboard
refactor detection predictor
Motivation
The use of unified DetectionPredictor for detection test and predictor.
For example:
- for detection test
model_path = '.pth'
config_path = '.py'
img = './demo.jpg'
out_file = './result.jpg'
detector = DetectionPredictor(model_path, config_path)
output = detector.predict(img)
detector.visualize(img, output, out_file=out_file)
- for detection predictor
model_path = '.pth'
# config_path = '.py' # remove config_path
img = './demo.jpg'
out_file = './result.jpg'
detector = DetectionPredictor(model_path)
output = detector.predict(img)
detector.visualize(img, output, out_file=out_file)