-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adaptive learning #78
base: master
Are you sure you want to change the base?
Adaptive learning #78
Conversation
…arning updates the model
README.md
Outdated
@@ -182,6 +182,23 @@ docker build -f x86-openvino.Dockerfile -t "neuralet/smart-social-distancing:lat | |||
docker run -it -p HOST_PORT:8000 -v "$PWD/data":/repo/data -v "$PWD/config-x86-openvino.ini":/repo/config-x86-openvino.ini -v "$PWD/certificates/processor":/repo/certs -e TZ=`./timezone.sh` neuralet/smart-social-distancing:latest-x86_64_openvino | |||
``` | |||
|
|||
##### Run on AMD node with a connected Coral USB Accelerator with Adaptive Learning Support | |||
Currently Smart Social Distancing supports Adaptive Learning framework on X86 nodes with connected USB TPU. for more information about Adaptive Learning visit [this page](https://github.com/neuralet/neuralet/tree/master/applications/adaptive-learning) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently Smart Social Distancing supports Adaptive Learning framework on X86 nodes with connected USB TPU. for more information about Adaptive Learning visit [this page](https://github.com/neuralet/neuralet/tree/master/applications/adaptive-learning) | |
Currently Smart Social Distancing supports Adaptive Learning framework on X86 nodes with connected USB TPU. For more information about Adaptive Learning visit [this page](https://github.com/neuralet/neuralet/tree/master/applications/adaptive-learning) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
import threading | ||
|
||
|
||
class ConfigEngine: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we reuse the ConfigEngine from libs/ConfigEngine.py
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, thanks for suggestion. Done.
start_services_adaptive.bash
Outdated
|
||
bash /repo/sample_startup.bash $CONFIG & | ||
bash /repo/update_model.bash $CONFIG & | ||
#trap "echo exitting because the model name is not compatible with adaptive learning.>&2;kill $(jobs -p)" SIGUSR1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you can remove this comment with the if above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
update_model.bash
Outdated
fi | ||
|
||
|
||
response=$(curl 0.0.0.0:8000/process-video-cfg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This endpoint has recently been renamed to start-process-video
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
adaptive-learning/README.md
Outdated
### Clone Neuralet Repository | ||
Make sure you have the prerequisites and then clone this repository to your local system by running this command: | ||
``` | ||
git clone https://github.com/neuralet/neuralet.git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw you added several files for adaptive learning. Is it still necessary to clone from neuralet/neuralet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it was just the copy of the original README, I changed it and referred to the original one for more details.
README.md
Outdated
##### Run on AMD node with a connected Coral USB Accelerator with Adaptive Learning Support | ||
Currently Smart Social Distancing supports Adaptive Learning framework on X86 nodes with connected USB TPU. for more information about Adaptive Learning visit [this page](https://github.com/neuralet/neuralet/tree/master/applications/adaptive-learning) | ||
Important notes: | ||
1. you must install [Docker Compose](https://github.com/docker/compose) to be able to use Adaptive Learning. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. you must install [Docker Compose](https://github.com/docker/compose) to be able to use Adaptive Learning. | |
1. You must install [Docker Compose](https://github.com/docker/compose) to be able to use Adaptive Learning. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
README.md
Outdated
@@ -182,6 +182,23 @@ docker build -f x86-openvino.Dockerfile -t "neuralet/smart-social-distancing:lat | |||
docker run -it -p HOST_PORT:8000 -v "$PWD/data":/repo/data -v "$PWD/config-x86-openvino.ini":/repo/config-x86-openvino.ini -v "$PWD/certificates/processor":/repo/certs -e TZ=`./timezone.sh` neuralet/smart-social-distancing:latest-x86_64_openvino | |||
``` | |||
|
|||
##### Run on AMD node with a connected Coral USB Accelerator with Adaptive Learning Support | |||
Currently Smart Social Distancing supports Adaptive Learning framework on X86 nodes with connected USB TPU. for more information about Adaptive Learning visit [this page](https://github.com/neuralet/neuralet/tree/master/applications/adaptive-learning) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is https://github.com/neuralet/neuralet/tree/master/applications/adaptive-learning the same README than the one uploaded in adaptive-learning/README.md
, if so please link to the smart-social-distance one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I linked to the original code base in smart-social-distancing one since the original one is a general solution and smart-social-distancing is just a use case. Thanks.
config-coral.ini
Outdated
#wether repeat the video processing when video reached to its final frame or not. | ||
Repeat = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#wether repeat the video processing when video reached to its final frame or not. | |
Repeat = false | |
# Whether to loop the video processing when video reached to its final frame or not. | |
Repeat = false |
This config allows for starting all over the video once it's finished? Could we change the name of the config to something like LoopVideoFile
. Something that's clear that affects only when consuming a video file after it finishes. And not a camera
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, you are right. Done
libs/distancing.py
Outdated
@@ -296,6 +298,10 @@ def process_video(self, video_uri): | |||
frame_num += 1 | |||
if frame_num % 100 == 1: | |||
logger.info(f'processed frame {frame_num} for {video_uri}') | |||
if self.repeat == 'true' and frame_num % total_frames == 0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that the repeat parameter should be a boolean and init it using the function get_boolean
from the config_engine
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Done.
add Adaptive Learning support for USB TPU.
for more information about Adaptive Learning visit here