After using YOLOv5 to train the object, use the detect.py file to identify it.
Open the detect.py file and set defaul=0
Wrong
if 'youtube.com/' in url or 'youtu.be/' in url: # if source is YouTube video TypeError: argument of type 'int' is not iterable
solution
Replace url with str(url)
if 'youtube.com/' in str(url) or 'youtu.be/' in str(url): # if source is YouTube video
success