Skip to content
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

feat: fall-detect initialization #14

Merged
merged 49 commits into from
Jun 14, 2021
Merged

feat: fall-detect initialization #14

merged 49 commits into from
Jun 14, 2021

Conversation

bhavikapanara
Copy link
Contributor

@bhavikapanara bhavikapanara commented Apr 21, 2021

This PR is initialization of stand-alone fall detect python package

Run python file for fall-detection: python3 demo-fall-detection.py

To test fall-detection using the command line for 2 images:
python3 demo-fall-detection-cmd.py --image_1 Images/fall_img_1.png --image_2 Images/fall_img_2.png

To test fall-detection using the command line for 3 images:
python3 demo-fall-detection-cmd.py --image_1 Images/fall_img_1.png --image_2 Images/fall_img_2.png --image_3 Images/fall_img_3.png

Use Demo.ipynb jupyter-notebook for the experiment.

@commit-lint
Copy link

commit-lint bot commented Apr 21, 2021

Contributors

bhavikapanara

Commit-Lint commands

You can trigger Commit-Lint actions by commenting on this PR:

  • @Commit-Lint merge patch will merge dependabot PR on "patch" versions (X.X.Y - Y change)
  • @Commit-Lint merge minor will merge dependabot PR on "minor" versions (X.Y.Y - Y change)
  • @Commit-Lint merge major will merge dependabot PR on "major" versions (Y.Y.Y - Y change)
  • @Commit-Lint merge disable will desactivate merge dependabot PR
  • @Commit-Lint review will approve dependabot PR
  • @Commit-Lint stop review will stop approve dependabot PR

@bhavikapanara bhavikapanara requested a review from ivelin April 22, 2021 18:08
@ivelin ivelin marked this pull request as draft April 23, 2021 19:10
Copy link

@ivelin ivelin left a comment

Choose a reason for hiding this comment

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

@bhavikapanara you've copied virtually all the code from the ambianic-edge repo. This is not at all the goal here.

Please remove all files and refactor fall detection classes as needed. If there is any code that is not directly involved in the fall detection algorithm, then it does not belong in this repo.

You should also have a very clear plan and design how ambianic-edge will import and use the fall-detection python package.

Please prepare a design document so we can align on high level goals. I usually use diagrams.net for design diagrams but you can use any similar tool that you like.

@bhavikapanara
Copy link
Contributor Author

@bhavikapanara you've copied virtually all the code from the ambianic-edge repo. This is not at all the goal here.

Please remove all files and refactor fall detection classes as needed. If there is any code that is not directly involved in the fall detection algorithm, then it does not belong in this repo.

You should also have a very clear plan and design how ambianic-edge will import and use the fall-detection python package.

Please prepare a design document so we can align on high level goals. I usually use diagrams.net for design diagrams but you can use any similar tool that you like.

@ivelin Yes...I have tried to consider the only code that is directly involved in fall detection. However, again I will recheck it and refactor fall detection classes if require.

And, Will prepare the design document and get back to you.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@bhavikapanara bhavikapanara marked this pull request as ready for review April 30, 2021 06:34
Copy link

@ivelin ivelin left a comment

Choose a reason for hiding this comment

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

@bhavikapanara this looks better.

There is only one file that seems unnecessary: .peerjsrc

Can you please share your forked repo for this PR with CI passing so I can see what the master repo would look like after merge?

.peerjsrc Outdated Show resolved Hide resolved
@ivelin
Copy link

ivelin commented May 3, 2021

@bhavikapanara I don't see a README.md for the repo. Why was it deleted?

Copy link

@ivelin ivelin left a comment

Choose a reason for hiding this comment

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

@bhavikapanara commented on a few more areas that need work.

LICENSE Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
@bhavikapanara
Copy link
Contributor Author

@bhavikapanara I don't see a README.md for the repo. Why was it deleted?

Ohh...by mistake it deleted. you can see it in the next update.

@bhavikapanara
Copy link
Contributor Author

@bhavikapanara commented on a few more areas that need work.

tried to cover all comments in the latest update...Please review it and let me know if I missed anything.

@bhavikapanara bhavikapanara requested a review from ivelin May 5, 2021 17:00
Copy link

@ivelin ivelin left a comment

Choose a reason for hiding this comment

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

@bhavikapanara nice progress.

Next, lets work on the following items:

  • port fall detector tests from edge to this repo
  • write a github action with the following jobs:
    • build
    • run tests
    • run semantic release to push a pypi package as needed

You can borrow most of the steps from the peerjs-python github action.

The semantic release section is now available via more compact github action plugin that we use in the edge CI.

@bhavikapanara bhavikapanara requested a review from ivelin May 18, 2021 18:13
Copy link

@ivelin ivelin left a comment

Choose a reason for hiding this comment

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

Some work remains on dependency cleanup and common code reuse between repos.

requirements.txt Outdated Show resolved Hide resolved
requirements.txt Outdated
numpy>=1.16.2
oauthlib>=2.1.0
Pillow>=5.4.1
pyOpenSSL>=19.0.0
Copy link

Choose a reason for hiding this comment

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

@bhavikapanara are you sure we need pyopenSSL?

Copy link

Choose a reason for hiding this comment

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

@bhavikapanara take a look at tools that help clean up requirements.txt
https://pypi.org/project/pip-check-reqs/

src/pipeline/tf_detect.py Outdated Show resolved Hide resolved
@bhavikapanara bhavikapanara requested a review from ivelin May 26, 2021 15:20
Copy link

@ivelin ivelin left a comment

Choose a reason for hiding this comment

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

See additional comments.

Please comment how you think about using this standalone library in ambianic-edge. What is the API that will be used by edge for this model and potentially other standalone AI models?

src/setup.cfg Outdated
[metadata]
name = ambianic-fall-detection
version = 1.0.0
author = Ivelin Ivanov
Copy link

Choose a reason for hiding this comment

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

@bhavikapanara add your name to the authors list

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

requirements.txt Outdated
oauthlib>=2.1.0
Pillow>=5.4.1
PyYAML>=5.1.2
requests>=2.25
Copy link

Choose a reason for hiding this comment

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

@bhavikapanara do we need requests, requests-oauthlib, responses, simplejson, oauthlib, matplotlib, h5py, gast, appdirs, absl-py ?

Please do a thorough cleanup to ensure there are no unused packages in requirements.txt.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@bhavikapanara
Copy link
Contributor Author

bhavikapanara commented Jun 2, 2021

See additional comments.

Please comment how you think about using this standalone library in ambianic-edge. What is the API that will be used by edge for this model and potentially other standalone AI models?

we can use the Fall_prediction method (exist in fall_prediction.py) with pipeline image 2 or 3. Similar to the demo example demo-fall-detection.py. I think this is one way to call this fall-detect stand-alone package in ambianic-edge.

@ivelin Please guide me if any other good method that we can implement.

@ivelin
Copy link

ivelin commented Jun 2, 2021 via email

@bhavikapanara
Copy link
Contributor Author

bhavikapanara commented Jun 5, 2021

after brainstorming with the goal I found one possible way to integrate an ambianic-edge with the fall-detect module.

We can directly attach an ambianic-edge pipeline with a fall-detect module and call the fall_detection process on the receive_next_sample() method of PipeElement

def receive_next_sample(self, **sample):

Here is an example to call fall-detect module: Link

@bhavikapanara bhavikapanara requested a review from ivelin June 7, 2021 11:53
@ivelin
Copy link

ivelin commented Jun 8, 2021

after brainstorming with the goal I found one possible way to integrate an ambianic-edge with the fall-detect module.

We can directly attach an ambianic-edge pipeline with a fall-detect module and call the fall_detection process on the receive_next_sample() method of PipeElement

def receive_next_sample(self, **sample):

Here is an example to call fall-detect module: Link

Yes, that seems like a sensible approach.

Copy link

@ivelin ivelin left a comment

Choose a reason for hiding this comment

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

@bhavikapanara I don't see codecoverage reporting in the CI.

@bhavikapanara bhavikapanara requested a review from ivelin June 14, 2021 18:09
Copy link

@ivelin ivelin left a comment

Choose a reason for hiding this comment

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

@bhavikapanara
OK, let's give it a shot. Please be on standby for potential issues we have not caught in the review process.

@ivelin ivelin merged commit 6e439aa into ambianic:main Jun 14, 2021
@bhavikapanara
Copy link
Contributor Author

@bhavikapanara
OK, let's give it a shot. Please be on standby for potential issues we have not caught in the review process.

yes...sure @ivelin
Thanks

github-actions bot pushed a commit that referenced this pull request Oct 3, 2021
# 1.0.0 (2021-10-03)

### Bug Fixes

* python setup files ([#23](#23)) ([41ee60d](41ee60d))

### Features

* add MoveNet and PoseNet notebooks for experiment ([916271e](916271e))
* add plot title for video seq ([db3d7c2](db3d7c2))
* add tflite model training and inference ([#33](#33)) ([3e7658c](3e7658c))
* add video samples to notebook ([702b334](702b334))
* fall detect pypi publishing ([#32](#32)) ([87f1751](87f1751))
* fall-detect initialization ([6e439aa](6e439aa)), closes [#14](#14)

### Performance Improvements

* [ImgBot] Optimize images ([#19](#19)) ([a489885](a489885))
@github-actions
Copy link

github-actions bot commented Oct 3, 2021

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants