-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e00a760
Showing
46 changed files
with
2,927 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/config.local | ||
/tmp | ||
/cache |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Add patterns of files dvc should ignore, which could improve | ||
# the performance. Learn more at | ||
# https://dvc.org/doc/user-guide/dvcignore |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: CML | ||
on: [push] | ||
jobs: | ||
train-and-report: | ||
runs-on: ubuntu-latest | ||
container: docker://ghcr.io/iterative/cml:0-dvc2-base1 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: | | ||
pip install -r requirements.txt | ||
python main.py # create score.json | ||
# Create CML report | ||
cat score.json >> report.md | ||
# echo '![](./plot.png "Confusion Matrix")' >> report.md | ||
|
||
env: | ||
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
ml-environment/ | ||
artifacts/ | ||
data/ | ||
LOGS/ | ||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
cover/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
.pybuilder/ | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
# For a library or package, you might want to ignore these files since the code is | ||
# intended to run in multiple environments; otherwise, check them in: | ||
# .python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# poetry | ||
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. | ||
# This is especially recommended for binary packages to ensure reproducibility, and is more | ||
# commonly ignored for libraries. | ||
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control | ||
#poetry.lock | ||
|
||
# pdm | ||
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. | ||
#pdm.lock | ||
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it | ||
# in version control. | ||
# https://pdm.fming.dev/#use-with-ide | ||
.pdm.toml | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
# ml-environment | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
artifacts | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
# pytype static type analyzer | ||
.pytype/ | ||
|
||
# Cython debug symbols | ||
cython_debug/ | ||
|
||
# PyCharm | ||
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can | ||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore | ||
# and can be added to the global gitignore or merged into this file. For a more nuclear | ||
# option (not recommended) you can uncomment the following to ignore the entire idea folder. | ||
#.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 Aman Kumar | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# End-to-End-Image-Classification-MLOPS-implementation | ||
|
||
<img src="project-image.png"> | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
artifacts_root: artifacts | ||
|
||
data_ingestion: | ||
root_dir: data | ||
source_URL: https://github.com/Aman123lug/Data-storage-for-all-projects/raw/main/Chicken-fecal-images.zip | ||
local_data_file: artifacts/data_ingestion/data.zip | ||
unzip_dir: artifacts/data_ingestion | ||
|
||
prepare_base_model: | ||
root_dir: artifacts/prepare_base_model | ||
base_model_config: artifacts/prepare_base_model/base_model.h5 | ||
updated_base_model_config: artifacts/prepare_base_model/base_model_updated.h5 | ||
|
||
|
||
prepare_callbacks: | ||
root_dir: artifacts/prepare_callbacks | ||
tensorboard_root_log_dir: artifacts/prepare_callbacks/tensorboard_root_log_dir | ||
checkpoint_model_filepath: artifacts/prepare_callbacks/checkpoint_root_log_dir/model.h5 | ||
|
||
|
||
training: | ||
root_dir: artifacts/training | ||
train_model_path: artifacts/training/model.h5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
stages: | ||
data_ingestion: | ||
cmd: python src/cnnClassifier/pipline/stage_01_data_ingestion.py | ||
deps: | ||
- src/cnnClassifier/pipline/stage_01_data_ingestion.py | ||
- config/config.yaml | ||
outs: | ||
- data/Chicken-fecal-images | ||
|
||
prepare_base_model: | ||
cmd: python src/cnnClassifier/pipline/stage_02_prepare_base_model.py | ||
deps: | ||
- src/cnnClassifier/pipline/stage_02_prepare_base_model.py | ||
- config/config.yaml | ||
|
||
params: | ||
- IMAGE_SIZE | ||
- INCLUDE_TOP | ||
- CLASSES | ||
- WEIGHTS | ||
- LEARNING_RATE | ||
|
||
outs: | ||
- artifacts/prepare_base_model | ||
|
||
|
||
training: | ||
cmd: python src/cnnClassifier/pipline/stage_03_training.py | ||
deps: | ||
|
||
- src/cnnClassifier/pipline/stage_03_training.py | ||
- src/cnnClassifier/components/prepare_callbacks.py | ||
- config/config.yaml | ||
- data/Chicken-fecal-images | ||
- artifacts/prepare_base_model | ||
|
||
params: | ||
- EPOCH | ||
- BATCH_SIZE | ||
- IMAGE_SIZE | ||
- AUGMENTATION | ||
|
||
outs: | ||
- artifacts/training/model.h5 | ||
|
||
model_evaluation: | ||
cmd: python src/cnnClassifier/pipline/stage_04_evaluation.py | ||
deps: | ||
- src/cnnClassifier/pipline/stage_04_evaluation.py | ||
- config/config.yaml | ||
- data/Chicken-fecal-images | ||
- artifacts/training/model.h5 | ||
params: | ||
- IMAGE_SIZE | ||
- BATCH_SIZE | ||
metrics: | ||
- score.josn: | ||
cache: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
from src.cnnClassifier.loggerr import logger | ||
from src.cnnClassifier.pipline.stage_01_data_ingestion import DataIngestionTrainingPipeline | ||
from src.cnnClassifier.pipline.stage_02_prepare_base_model import PrepareBaseModelTrainingPipeline | ||
from src.cnnClassifier.pipline.stage_03_training import ModelTrainingPipeline | ||
from src.cnnClassifier.pipline.stage_04_evaluation import ModelEvaluation | ||
|
||
STAGE_NAME = "Data Ingestion" | ||
try: | ||
logger.info(f" <<<< stage {STAGE_NAME} <<<< started") | ||
data_ingestion = DataIngestionTrainingPipeline() | ||
data_ingestion.main() | ||
logger.info(f" <<<< stage {STAGE_NAME} >>>> completed !") | ||
|
||
except Exception as e: | ||
# logger.exception(e) | ||
raise e | ||
|
||
STAGE_NAME = "Prepare Base Model" | ||
try: | ||
logger.info(f" <<<< stage {STAGE_NAME} <<<< started") | ||
base_model = PrepareBaseModelTrainingPipeline() | ||
base_model.main() | ||
logger.info(f" <<<< stage {STAGE_NAME} >>>> completed !") | ||
|
||
except Exception as e: | ||
logger.exception(e) | ||
raise e | ||
|
||
|
||
STAGE_NAME = "Training" | ||
try: | ||
logger.info(f"<<<< stage {STAGE_NAME} started >>>>") | ||
train = ModelTrainingPipeline() | ||
train.main() | ||
logger.info(f"<<<< stage {STAGE_NAME} completed >>>>") | ||
|
||
except Exception as e: | ||
logger.exception(e) | ||
raise e | ||
|
||
|
||
STAGE_NAME = "Model Evaluation" | ||
try: | ||
logger.info(f"<<<< Stage {STAGE_NAME} started") | ||
evaluate = ModelEvaluation() | ||
evaluate.main() | ||
logger.info(f"<<<< stage {STAGE_NAME} completed >>>>") | ||
|
||
except Exception as e: | ||
logger.exception(e) | ||
raise e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
AUGMENTATION: True | ||
IMAGE_SIZE: [224, 224, 3] | ||
BATCH_SIZE: 16 | ||
INCLUDE_TOP: False | ||
EPOCH: 1 | ||
LEARNING_RATE: 0.01 | ||
CLASSES: 2 | ||
WEIGHTS: imagenet | ||
|
||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
scikit-learn | ||
tensorflow | ||
dvc | ||
pandas | ||
numpy | ||
notebook | ||
matplotlib | ||
seaborn | ||
python-box==6.0.2 | ||
pyYAML | ||
tqdm | ||
ensure==1.0.2 | ||
joblib | ||
spacy | ||
Flask | ||
Flask-Cors | ||
|
||
-e . |
Oops, something went wrong.