When using ultralytics/yolov5, the following error occurred.

AttributeError:'Detections'objecthasnoattribute'imgs'

As mentioned in the following issue, this appears to be caused by an API change.

https://github.com/robmarkcole/yolov5-flask/issues/23

As one example, the error was resolved by rewriting the program as follows.

r#d#dreeeesnfofnueldlwgoirrdorreteufeeleersttstdsteIpouuGuud=musslrelrIat.htnttnmmg_pusIsgoedat.Im.Id(itismarm=errhlaageale..vgengg(s=eree(deeiuxm(.re.tml"itsoerfI)tssraps(rmstteveu)oa)aseenlmg#:t((_(taeioodfsr(icuui")rrn"ttr{:aefpp=oyseuufu(urtt"trle__{petnddoussciiutu)errt_l))pdt:uistr._}id/miigrms}a[/g0"e])0).jpg")

I hope this is helpful for those experiencing the same issue.