Posting on behalf of student
-----------------------------------------------
"Hi there!
I am currently working on implementing the AI Sign Language Workshop (https://www.sciencebuddies.org/science- ... _detection).
For some reason whenever I get to part 6, where the code is supposed to read through the separate frames of the sign language video, it doesn't read the file directory appropriately. I tried changing the code around a lot, and it keeps reading it in a different way than how the previous code made the .npy file designation. I know i'm not explaining this the best. But iw as wondering if anyone has tried this workshop and could let me know what the problem is!
I have attached a screenshot of where the problem is.
These screenshots show the folder structure. I have one video in each.
Problem with Sign Language AI Project
Moderators: kgudger, bfinio, MadelineB, Moderators
-
amyCC
- Site Admin
- Posts: 398
- Joined: Wed Apr 01, 2020 4:02 pm
- Occupation: Moderator
- Project Question: *
- Project Due Date: *
- Project Status: Not applicable
-
amyCC
- Site Admin
- Posts: 398
- Joined: Wed Apr 01, 2020 4:02 pm
- Occupation: Moderator
- Project Question: *
- Project Due Date: *
- Project Status: Not applicable
Re: Problem with Sign Language AI Project
Hi - You note that you only have 1 video in each directory. Step 6b is set to loop through the 30 videos that you were to have added in Step 2 of the Setting Up Folders for Collection section (in the written directions).
The error shows that it is missing 1.npy -- because you only have 1 video (which was used in step 5 to create 0.npy in that folder).
If you look at the output of step 5 after you run it, it creates the individual frames for each video. Look at the numbers of the *.npy files created. Once you add a second test video, this will be even more clear.
For example, if I add three videos to my test folder, when I run 5a, I will get an error telling me it can't find 3.npy (which would be for the fourth video).... The code is set to iterate through all thirty video samples.
Changing the notebook to look at a smaller sample set, unfortunately, is not a single variable change. (The project isn't set up to allow you to easily change this to a smaller sample size, and the project doesn't provide directions for making that change in the code.) So you will need to set up the required test data for the model and then run it.
I think you will want to rerun the entire notebook from the beginning (deleting everything that was auto-created). You want to carefully go through the written directions as well as look at the collab instructions. The test_videos directory, for example, is one that will be auto-created, but it has an underscore in the name (_). Yours (from your screenshot) doesn't. You may have changed that in trying to troubleshoot, but to avoid any additional errors later, I would suggest clearing the folder and letting the code set it up again from scratch.
Amy
Science Buddies
The error shows that it is missing 1.npy -- because you only have 1 video (which was used in step 5 to create 0.npy in that folder).
If you look at the output of step 5 after you run it, it creates the individual frames for each video. Look at the numbers of the *.npy files created. Once you add a second test video, this will be even more clear.
For example, if I add three videos to my test folder, when I run 5a, I will get an error telling me it can't find 3.npy (which would be for the fourth video).... The code is set to iterate through all thirty video samples.
Changing the notebook to look at a smaller sample set, unfortunately, is not a single variable change. (The project isn't set up to allow you to easily change this to a smaller sample size, and the project doesn't provide directions for making that change in the code.) So you will need to set up the required test data for the model and then run it.
I think you will want to rerun the entire notebook from the beginning (deleting everything that was auto-created). You want to carefully go through the written directions as well as look at the collab instructions. The test_videos directory, for example, is one that will be auto-created, but it has an underscore in the name (_). Yours (from your screenshot) doesn't. You may have changed that in trying to troubleshoot, but to avoid any additional errors later, I would suggest clearing the folder and letting the code set it up again from scratch.
Amy
Science Buddies

