the models in devolearn have different architectures, and different purposes. But it would be great if all of the models come under one single base class like:
InferenceEngine would contain some predefined (but overrideable) methods to:
Download model checkpoints from github source
Preprocess images for inference
Postprocess predictions for readability/saving
devolearn.IoPipeline would contain some standardized media tools for reading and writng videos/images (might use decord/imageio for videos and cv2 for images)
a docker based fastAPI endpoint could be created (only after the above objectives are complete). This would help us deploy the models into servers/webapps/GUIs
The picture attached below is the layout of how we want to see it ⬇️
If you have any suggestions/ideas, feel free to discuss below :)
Streamlit seems to be an amazing option for deploying python backends with a clean GUI. We should definitely explore possibilities of building a GUI with streamlit for devolearn
Currently devolearn uses a relatively simple testing suite i.e python3 setup.py test. But a much cleaner alternative would be to use pytest for testing and codecov for coverage reports.
Why use coverage reports ?
They help us see how much of the code is being tested after each push, this'll help us find the pieces of code that are important but remain untested.
Why pytest ?
From my own personal experience, python3 setup.py test crashes without an error message when the user tries to access a CUDA device (GPU) on the github actions runtime. This error would've been impossible to fix if I hadn't moved to using pytest (which showed me the proper error message).
@Mayukhdeb please add hacktoberfest topic to the repo in order to make this repo eligible for hacktober fest 2020.
Here are the updated rules: https://hacktoberfest.digitalocean.com/hacktoberfest-update
To validate PRs after October 3, 2020 this topic must be included in repository.
@Mayukhdeb In main.yml file whenever it was testing with python versions ,it was testing with previous versions of python 3.8 and 3.7 ,and most these versions are almost deprecated and most of the libraries which are installed through requirements.txt are latest version, which are not compatible with old version , this is causing some issues when we are testing .It needs to be changed ,I think so, and these should updated for new python version
Currently devolearn uses cv2 to load and run inference on images/videos. There are faster and cleaner alternatives like decord and imageio which can be used instead.
Devolearn requires torch==1.7, but I think it would also work with the latest versions of torch. Using the latets version of torch would make the installation much faster on google colab notebooks because the latest version of torch is already installed there.
The URL for the weights to the embryo segmentation model is most likely broken, throws an HTTP error.
arg mode = 'cpu' should be replaced with device = 'cpu'
optionally, we can also let the user decide the GPU ID like device = 'cuda:0'
move the run tests cell to the bottom
Note that this is a beginner friendly issue, all the changes are to be done on this notebook. Feel free to reply to this if you're willing to take this up.
The current model only allows us to predict on images by providing a path. We can extend the functionality and flexibility of out module by allowing numpy arrays as arguments to predict.
After uploading the test package and installing on a virtual env/google colab, the relative paths of the downloaded models are not directing to the package directory
Docstrings make our code much more usable and adds useful information which can be useful when debugging. Check out this link if you want to know more and generate docstrings for devolearn.
Devolearn was written with Pytorch 1.7.0. but it might as well work on most of the more the other Pytorch versions (like the one on colab). If that is true, then we might not need this long reinstallation on google colab every time we do pip install devolearn