- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I was trying to get the "smart_classroom_sample" working.
According to the instructions here, the user needs to provide a set of face images as references for the person identification. Then the create_list.py script listed under \inference_engine\samples\smart_classroom_sample needs to be run to create a file called faces_gallery.json.
I observed that the *.json file was not created even though the script seemed top work as expected. When I debugged the script a bit more, I noticed that the json dump was not working due to a path error for some reason (I don't actually know why it does not work)
I modified the end of the script as follows which creates the json file in the same folder as the create_list.py script (which I think was the intention)
scriptFilePath = os.path.realpath(__file__) # this returns the full file path
scriptPath = os.path.dirname(os.path.abspath(scriptFilePath)) # this removes the file name from the path
with open(scriptPath + '\\faces_gallery.json', 'w') as outfile:
json.dump(objects, outfile)
I hope the above will be useful for anyone who came across the same problem.
Regards...
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Charaw,
There shouldn't be any issues with generating the files other than permissions on creation of the file. I've tested this in the root directory where sudo was needed and in the home directory where sudo wasn't needed and both test generated the .json file. What directory are you calling the create_list.py from?
Kind Regards,
Monique Jones
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Monique,
Thanks for your message. I am a Windows user therefore sudo does not apply in my particular case.
I tried to run the script via Windows command prompt (with and without admin privileges) while under \inference_engine\samples\smart_classroom_sample and this did not work. It appears that the json dump needs the absolute path to work.
Regards...
![](/skins/images/7B0AB6865064EAE32B30EC9A4E94B48A/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page