rzimmerdev commited on
Commit
46627d2
β€’
1 Parent(s): a0f925f

Final product

Browse files
Files changed (7) hide show
  1. Dockerfile +0 -3
  2. README.md +12 -27
  3. app.py +1 -1
  4. docs/README.md +27 -0
  5. main.py +3 -3
  6. src/demo.py +1 -1
  7. src/downloader.py +1 -1
Dockerfile DELETED
@@ -1,3 +0,0 @@
1
- FROM python
2
- WORKDIR .
3
- RUN pip install -r requirements.txt
 
 
 
 
README.md CHANGED
@@ -1,27 +1,12 @@
1
- # zero-to-hero
2
- Create and deploy to production a simple neural network for Computer Vision
3
-
4
-
5
- # Tools Used
6
- * JAX Library for computing gradients, performing tensor operations and scheming the segmentation model
7
- * Wandb for metrics and training tools
8
- * MLflow for deploying and compiling the model for production
9
- * Gradio for interactive user-experience platform within an online platform (Data-ICMC Website).
10
-
11
-
12
- ## Datasets to consider
13
- * [LabelMe 12 50k](https://www.kaggle.com/datasets/dschettler8845/labelme-12-50k)
14
- * [City-Scapes](https://www.cityscapes-dataset.com/dataset-overview/)
15
- * [CamVid](http://mi.eng.cam.ac.uk/research/projects/VideoRec/CamVid/)
16
-
17
-
18
- ## References
19
- * [DSNet-Fast](https://www.researchgate.net/figure/The-architecture-of-fast-dense-segmentation-network-DSNet-fast-The-encoder-is_fig1_347180093)
20
- * [DSNet](https://www.researchgate.net/figure/The-architecture-of-dense-segmentation-network-DSNet-The-encoder-is-a-fully-convolutional_fig1_347180092)
21
-
22
-
23
- # First Model
24
- The first model available and deployed considers a simple 2D image, taken from the MNIST Dataset. Reefer to [_High-Performance Neural Networks
25
- for Visual Object Classification_](https://arxiv.org/pdf/1102.0183.pdf) for further details on the dataset.
26
-
27
- The CI/CD process will use the default Github pipeline using the available [Github Actions features](https://github.blog/2022-02-02-build-ci-cd-pipeline-github-actions-four-steps/). The training process will use the MLFLow framework, to cather and track the necessary metrics and log accordingly. Reefer to the [docs](https://mlflow.org/docs/latest/quickstart.html) for further details.
 
1
+ ---
2
+ title: Lenet Mnist
3
+ emoji: πŸ“‰
4
+ colorFrom: purple
5
+ colorTo: red
6
+ sdk: gradio
7
+ sdk_version: 3.15.0
8
+ app_file: app.py
9
+ pinned: false
10
+ ---
11
+
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app.py CHANGED
@@ -1,3 +1,3 @@
1
  from src.demo import main
2
 
3
- main()
 
1
  from src.demo import main
2
 
3
+ main("cpu")
docs/README.md ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # zero-to-hero
2
+ Create and deploy to production a simple neural network for Computer Vision
3
+
4
+
5
+ # Tools Used
6
+ * JAX Library for computing gradients, performing tensor operations and scheming the segmentation model
7
+ * Wandb for metrics and training tools
8
+ * MLflow for deploying and compiling the model for production
9
+ * Gradio for interactive user-experience platform within an online platform (Data-ICMC Website).
10
+
11
+
12
+ ## Datasets to consider
13
+ * [LabelMe 12 50k](https://www.kaggle.com/datasets/dschettler8845/labelme-12-50k)
14
+ * [City-Scapes](https://www.cityscapes-dataset.com/dataset-overview/)
15
+ * [CamVid](http://mi.eng.cam.ac.uk/research/projects/VideoRec/CamVid/)
16
+
17
+
18
+ ## References
19
+ * [DSNet-Fast](https://www.researchgate.net/figure/The-architecture-of-fast-dense-segmentation-network-DSNet-fast-The-encoder-is_fig1_347180093)
20
+ * [DSNet](https://www.researchgate.net/figure/The-architecture-of-dense-segmentation-network-DSNet-The-encoder-is-a-fully-convolutional_fig1_347180092)
21
+
22
+
23
+ # First Model
24
+ The first model available and deployed considers a simple 2D image, taken from the MNIST Dataset. Reefer to [_High-Performance Neural Networks
25
+ for Visual Object Classification_](https://arxiv.org/pdf/1102.0183.pdf) for further details on the dataset.
26
+
27
+ The CI/CD process will use the default Github pipeline using the available [Github Actions features](https://github.blog/2022-02-02-build-ci-cd-pipeline-github-actions-four-steps/). The training process will use the MLFLow framework, to cather and track the necessary metrics and log accordingly. Reefer to the [docs](https://mlflow.org/docs/latest/quickstart.html) for further details.
main.py CHANGED
@@ -1,8 +1,8 @@
1
  import torch
2
 
3
- from models import CNN
4
- from dataset import DatasetMNIST, download_mnist
5
- from train import get_dataloaders, train_net_manually, train_net_lightning
6
 
7
 
8
  def main(device):
 
1
  import torch
2
 
3
+ from src.models import CNN
4
+ from src.dataset import DatasetMNIST, download_mnist
5
+ from src.train import get_dataloaders, train_net_manually, train_net_lightning
6
 
7
 
8
  def main(device):
src/demo.py CHANGED
@@ -12,7 +12,7 @@ def predict_gradio_canvas(x, net, device="cuda"):
12
 
13
 
14
  def main(device="cuda"):
15
- net = load_torch_net("../checkpoints/pytorch/version_1.pt")
16
 
17
  gr.Interface(fn=lambda x: predict_gradio_canvas(x, net, device),
18
  inputs="sketchpad",
 
12
 
13
 
14
  def main(device="cuda"):
15
+ net = load_torch_net("checkpoints/pytorch/version_1.pt")
16
 
17
  gr.Interface(fn=lambda x: predict_gradio_canvas(x, net, device),
18
  inputs="sketchpad",
src/downloader.py CHANGED
@@ -15,7 +15,7 @@ def download_dataset(name='cityscapes', path='downloads/downloads'):
15
  if name == 'cityscapes':
16
  download_cityscapes(path)
17
  elif name == "mnist":
18
- pass
19
  else:
20
  raise NotImplementedError
21
 
 
15
  if name == 'cityscapes':
16
  download_cityscapes(path)
17
  elif name == "mnist":
18
+ download_mnist(path)
19
  else:
20
  raise NotImplementedError
21