Getting error in face recognition project

In the video , the variable “face_section” is declared in the " for "loop. But it is being used outside the loop. As expected i’am getting error of variable undefined. Please resolve this. I even copy pasted the entire code from github for this project. But still I’am getting that error .

Hey @i_sushant, yes you are right, declare face_section = np.zeros((100,100,3)) outside the for loop and than your code will run fine. Also you may use try and except. So its completely upto you, i have told you both ways.

Hope this resolved your doubt. :blush:
Great job done. Happy Learning :sunny:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.