dnth / yolov5-deepsparse-blogpost

By the end of this post, you will learn how to: Train a SOTA YOLOv5 model on your own data. Sparsify the model using SparseML quantization aware training, sparse transfer learning, and one-shot quantization. Export the sparsified model and run it using the DeepSparse engine at insane speeds. P/S: The end result - YOLOv5 on CPU at 180+ FPS using on
https://dicksonneoh.com/portfolio/supercharging_yolov5_180_fps_cpu/
53 stars 13 forks source link

AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor' #12

Open medioman22 opened 1 year ago

medioman22 commented 1 year ago

I'm getting this error AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'

when running the first inference example code

python annotate.py yolov5-deepsparse/yolov5s-sgd/weights/best.pt \ --source data/pexels-cottonbro-8717592.mp4 \ --engine torch \ --image-shape 416 416 \ --device cpu \ --conf-thres 0.7

seems related to https://github.com/ultralytics/yolov5/issues/6948#issuecomment-1065213047