I can successfully run  yolov5   python detect.py  to carry out the test.
However, whenever I created another file, say,  myfile.py , and trying to packed it into a  class ,  device = select_device(opt.device)  will fail with this  ERROR  message:  munmap_chunk(): invalid pointer .
Please help…