Raised This Month: $12 Target: $400
 3% 

Module: ANN Forward Utilities (Deep Learning & AI Related)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Scrooge2029
Junior Member
Join Date: Dec 2020
Old 01-04-2021 , 06:18   Module: ANN Forward Utilities (Deep Learning & AI Related)
Reply With Quote #1

Description:
Artificial Neural Network, or ANN for short, is a sort of models used by supervised algorithm called Deep Learning, which is being used to classify or predict the label of given data, this module implemented parts of ANN forwarding utilities.

Weights Format:
XML (exported from PyTorch (trained) weights by layers.

Implemented Layer Types:
Batch Normalization
Dense (Full Connection)
Convolution
Flattern
Pooling
Softmax


https://github.com/AlucardNosferatu/.../Forward%40CPP

This module is still under construction, now the loading function has been tested (see the attached png). I used a INI (in the attached zip file) to make loading more convenient, what's more, a pretrained Model for recognizing Hand Gestures based on sEMG was used in test.
Files in Test.zip should be placed in addons/amxmodx/data/models/Test/, which corresponds to what was wrote in the SMA script:
Code:
load_model("Test/Test.ini")
Attached Thumbnails
Click image for larger version

Name:	QQ图片20210104185659.png
Views:	207
Size:	13.3 KB
ID:	186124  
Attached Files
File Type: zip Test.zip (6.34 MB, 133 views)

Last edited by Scrooge2029; 01-04-2021 at 06:31. Reason: Revision
Scrooge2029 is offline
Scrooge2029
Junior Member
Join Date: Dec 2020
Old 01-04-2021 , 06:28   Re: Module: ANN Forward Utilities
Reply With Quote #2

https://forums.alliedmods.net/showthread.php?t=310446

This is a previous work-of-art done with pawn scripts, I am not sure wether it implemented Convolution or BatchNormalization or not, but still, for simple classification, that INC is more suitable and easy to understand.

Last edited by Scrooge2029; 01-04-2021 at 06:34. Reason: Revision
Scrooge2029 is offline
Shooting King
RAAASENGAN
Join Date: Mar 2012
Location: India
Old 01-04-2021 , 14:55   Re: Module: ANN Forward Utilities (Deep Learning & AI Related)
Reply With Quote #3

Nice initiative !!
__________________
As every time said, don't ever UNDERESTIMATE me.

Donate - Here
Shooting King is offline
Scrooge2029
Junior Member
Join Date: Dec 2020
Old 01-05-2021 , 04:45   Re: Module: ANN Forward Utilities (Deep Learning & AI Related)
Reply With Quote #4

Quote:
Originally Posted by Shooting King View Post
Nice initiative !!
Thx! Your words greatly inspired me!

I have completed the test of prediction based on fake data (generated by the SMA script) and pretrained model (in the attached zip) and pushed all commits to the GitHub.

Now I decide to make a ANN enhanced bot plugin as a demostration of this module, what hinder me is that I don't know how to collect data of terrain and obstacles around a bot in a certain radius of range, which are used to predict movement actions should be taken to transport bots to the destination in the range.

My current idea was inspire by laser radars used in SLAM robots, the laser emitter rotates and scan through the area, get coordinates of endpoints hit by the laser, and form a "Points Cloud" with these coordinates, the "Points Cloud" could be used to extract matrices and tensors for DL purpose, and I found the trace_line function from engine.inc, I think it may be abled to be applied like a laser radar...?

This figure shows the "Points Cloud" collected by a laser radar:

Has anyone have other thoughts or experience about this? If you can share me some info about this, I will be very very appreciate it!!!

Last edited by Scrooge2029; 01-05-2021 at 05:44. Reason: Revision
Scrooge2029 is offline
Shooting King
RAAASENGAN
Join Date: Mar 2012
Location: India
Old 01-05-2021 , 08:11   Re: Module: ANN Forward Utilities (Deep Learning & AI Related)
Reply With Quote #5

Quote:
Originally Posted by Scrooge2029 View Post
Thx! Your words greatly inspired me!

I have completed the test of prediction based on fake data (generated by the SMA script) and pretrained model (in the attached zip) and pushed all commits to the GitHub.

Now I decide to make a ANN enhanced bot plugin as a demostration of this module, what hinder me is that I don't know how to collect data of terrain and obstacles around a bot in a certain radius of range, which are used to predict movement actions should be taken to transport bots to the destination in the range.

My current idea was inspire by laser radars used in SLAM robots, the laser emitter rotates and scan through the area, get coordinates of endpoints hit by the laser, and form a "Points Cloud" with these coordinates, the "Points Cloud" could be used to extract matrices and tensors for DL purpose, and I found the trace_line function from engine.inc, I think it may be abled to be applied like a laser radar...?

This figure shows the "Points Cloud" collected by a laser radar:

Has anyone have other thoughts or experience about this? If you can share me some info about this, I will be very very appreciate it!!!
HL has an Engine function to TraceSpehere (hull?) which you can use that instead of traceline (or) you can make a Invisible entity arround the bot and hook its Touch, i guess
__________________
As every time said, don't ever UNDERESTIMATE me.

Donate - Here
Shooting King is offline
Scrooge2029
Junior Member
Join Date: Dec 2020
Old 01-06-2021 , 05:02   Re: Module: ANN Forward Utilities (Deep Learning & AI Related)
Reply With Quote #6

Quote:
Originally Posted by Shooting King View Post
HL has an Engine function to TraceSpehere (hull?) which you can use that instead of traceline (or) you can make a Invisible entity arround the bot and hook its Touch, i guess
Thanks! But I've change my mind to make an easier demostration, maybe the BOT will be implemented someday, but currently I found myself being lack of knowledges and skills required to make the BOT, sorry!

Currently I am working on a RestTimeToSurvive Estimator, of which the progress has been push to 35%, I will post that plugs on Code Snippets section once I finished.







Update:
1.Now the module supports Sigmoid layer
2.Output was fix for 2D matrices
3.Add weights exporter for Dense layers in tf.keras.Model
https://github.com/AlucardNosferatu/.../BOT/DLDemo.py

Last edited by Scrooge2029; 01-06-2021 at 05:06. Reason: Revision
Scrooge2029 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:56.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode