Skip to content

Adaptive learning#78

Open
alpha-carinae29 wants to merge 17 commits intogalliot-us:masterfrom
alpha-carinae29:adaptive-learning
Open

Adaptive learning#78
alpha-carinae29 wants to merge 17 commits intogalliot-us:masterfrom
alpha-carinae29:adaptive-learning

Conversation

@alpha-carinae29
Copy link
Copy Markdown
Contributor

add Adaptive Learning support for USB TPU.
for more information about Adaptive Learning visit here

Comment thread 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)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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)

Copy link
Copy Markdown
Contributor Author

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:
Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Contributor Author

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.

Comment thread 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
Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread update_model.bash Outdated
fi


response=$(curl 0.0.0.0:8000/process-video-cfg)
Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

Comment thread 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
Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Contributor Author

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.

Comment thread 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.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread 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)
Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
Contributor Author

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.

Comment thread config-coral.ini Outdated
Comment on lines +46 to +47
#wether repeat the video processing when video reached to its final frame or not.
Repeat = false
Copy link
Copy Markdown
Collaborator

@renzodgc renzodgc Nov 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#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

Copy link
Copy Markdown
Contributor Author

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

Comment thread libs/distancing.py Outdated
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:
Copy link
Copy Markdown
Collaborator

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants