snapcon2022:image-classification-game
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
snapcon2022:image-classification-game [2022/08/06 14:11] – ilgarrasulov001 | snapcon2022:image-classification-game [2023/01/05 14:38] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 10: | Line 10: | ||
Please open the link [[https:// | Please open the link [[https:// | ||
- | {{ : | + | {{ : |
===== Web camera Image in Snap! ===== | ===== Web camera Image in Snap! ===== | ||
Line 26: | Line 26: | ||
* Use ** connect to Jetson url ** block to connect Jetson. {{ : | * Use ** connect to Jetson url ** block to connect Jetson. {{ : | ||
<WRAP center round info 60%> \\ | <WRAP center round info 60%> \\ | ||
- | You need **ip address** of Nvidia Jetson. You can use // ifconfig // command | + | All participants |
</ | </ | ||
- | * Store the value of ** jetson_name ** in a variable. | + | * Store the value of ** jetson_name ** in a variable. {{ : |
* Store the value of ** connect to Jetson url ** block in a variable for later use. {{ : | * Store the value of ** connect to Jetson url ** block in a variable for later use. {{ : | ||
===== Response from classification | ===== Response from classification | ||
Line 64: | Line 64: | ||
Please open the link [[https:// | Please open the link [[https:// | ||
- | ===== Speech functionality | + | ===== Start Camera |
- | ===== Speech functionality ===== | + | |
- | ===== Speech functionality | + | Drag and drop the ** start video ** custom block to start using web camera. |
- | ===== Speech functionality | + | |
- | ===== Speech functionality | + | {{ : |
- | ===== Speech functionality | + | |
+ | ===== Connection to Jetson | ||
+ | |||
+ | Repeat the steps from Part 1 to connect to the Jetson Computer. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | |||
+ | ===== Game Initialization | ||
+ | Use ** When flag clicked ** , variable setting and our custom blocks for initializing the game | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | ===== Game process control blocks | ||
+ | In the game process we use ** when ** block to catch the click event from the stage and change the current page and broadcasting to tell the other blocks that game is starting. | ||
+ | {{ : | ||
+ | |||
+ | Also we added additional blocks to resume the game after it was stopped. | ||
+ | {{ : | ||
+ | |||
+ | ===== Main part: sending images to Jetson and having fun with our pets! :-) ===== | ||
+ | |||
+ | We use familiar ** when ** block to listen to the start event. Then the block for receiving classification data is used in connection with ** analyze ** block | ||
+ | {{ : | ||
+ | Inside ** analyze ** block we compare the class name with preset class names of food, that our pets consume, and broadcast to them. In case if the detected object is not suitable for any of them, we run ** speak ** block to pronounce the name of the object. | ||
+ | {{ : | ||
+ | |||
+ | In the script part of each sprite there are already blocks, responsible for handling their choice events. We use ** speak **, ** play sound **,** animate ** blocks to animate the sprites. | ||
+ | {{ : | ||
+ | |||
+ | <WRAP center round info 60% > | ||
+ | You can download full game from [[https:// | ||
snapcon2022/image-classification-game.1659787880.txt.gz · Last modified: 2023/01/05 14:38 (external edit)