vardanagarwal / Proctoring-AI

Creating a software for automatic monitoring in online proctoring
MIT License
540 stars 329 forks source link

'Tensor' object cannot be interpreted as an integer #74

Open Maiotekiot opened 5 months ago

Maiotekiot commented 5 months ago

class_names = [c.strip() for c in open("models/classes.TXT").readlines()] boxes, scores, classes, nums = yolo(img) count=0 for i in range(nums[0]): >>>>>>>> ERROR LINE if int(classes[0][i] == 0): count +=1 if int(classes[0][i] == 67): print('Mobile Phone detected') if count == 0: print('No person detected') elif count > 1: print('More than one person detected')