From 994cc54429cdf2b89ea055e6ceb0ad05ed676acc Mon Sep 17 00:00:00 2001 From: "Miguel Xochicale, PhD" Date: Thu, 9 Nov 2023 15:22:44 +0000 Subject: [PATCH] 23 - test converted jpg to video (#25) # Addressing #23 ### Description A few sentences describing the changes proposed in this pull request. ## Type of change Please delete options accordingly to the description. - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update ### Checklist - [ ] I have read the [`CONTRIBUTING`](https://github.com/CONTRIBUTING.rst) docs and have a developer setup (especially important are `pre-commit`and `pytest`) - [ ] My code is properly tested - [ ] My code follows the style guidelines - [ ] My code does not contain unused elements. If so, I documented why it needs to. - [ ] My changes generate no new warnings - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] This pull request is ready to be reviewed - [ ] My branch is up-to-date with master (with use of rebase if needed) - [ ] If the PR is ready and there are multiple commits, I have [squashed them and force-pushed](https://www.w3docs.com/snippets/git/how-to-combine-multiple-commits-into-one-with-3-steps.html#force-pushing-commits-7) --- data/models/README.md | 16 ++++++++++++---- data/polyp-dataset/README.md | 7 +++++-- program/day-one/README.md | 10 ++++++++++ 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/data/models/README.md b/data/models/README.md index eb7fb59..a16ba9b 100644 --- a/data/models/README.md +++ b/data/models/README.md @@ -1,15 +1,22 @@ -# Data +# Models ## `onnx` models ### Trained models -ColonSegNet-07112023-2359.onnx (20MB or 20,067,028) Model was create with > colon_seg_net_test.ipynb Open In Colab +| Model (Size) | Download | Notebook | +| -- |-- | -- | +| ColonSegNet-07112023-2359.onnx (20MB or 20,067,028) | [:link:](TOADD) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1s-eKu6QjaV54jva_ylG1VxwCj1B8nwJ3) | +| Add Your model (copy and paste this line) | [:link:](TOADD) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/TOADD) | + + +### Examples to download models in your local machine +* ColonSegNet-07112023-2359.onnx ``` wget https://raw.githubusercontent.com/SciKit-Surgery/cmicHACKS2/main/data/ColonSegNet-07112023-2359.onnx ``` -### Original model +* Original model ``` wget --content-disposition 'https://api.ngc.nvidia.com/v2/resources/org/nvidia/team/clara-holoscan/holoscan_colonoscopy_sample_data/20230222/files?redirect=true&path=colon.onnx' -O colon.onnx ``` @@ -17,7 +24,8 @@ wget --content-disposition 'https://api.ngc.nvidia.com/v2/resources/org/nvidia/t ``` wget --content-disposition 'https://api.ngc.nvidia.com/v2/resources/org/nvidia/team/clara-holoscan/holoscan_colonoscopy_sample_data/20230222/files?redirect=true&path=colon_exam_720x576.mp4' -O colon_exam_720x576.mp4 ``` -* References + +## References https://catalog.ngc.nvidia.com/orgs/nvidia/teams/clara-holoscan/resources/holoscan_colonoscopy_sample_data/files diff --git a/data/polyp-dataset/README.md b/data/polyp-dataset/README.md index 7e63b27..1084a57 100644 --- a/data/polyp-dataset/README.md +++ b/data/polyp-dataset/README.md @@ -1,16 +1,19 @@ # Kvasir-SEG dataset > The Kvasir-SEG dataset (size 46.2 MB) contains 1000 polyp images and their corresponding ground truth from the Kvasir Dataset v2. The resolution of the images contained in Kvasir-SEG varies from 332x487 to 1920x1072 pixels. The images and its corresponding masks are stored in two separate folders with the same filename. The image files are encoded using JPEG compression, and online browsing is facilitated. The bounding box (coordinate points) for the corresponding images are stored in a JSON file. https://datasets.simula.no/downloads/kvasir-seg.zip + ``` wget https://datasets.simula.no/downloads/kvasir-seg.zip #(45M) +unzip kvasir-seg.zip +rm kvasir-seg.zip ``` ## Converting images to video - ``` cd data/polyp-dataset/Kvasir-SEG/images -ffmpeg -framerate 1 -pattern_type glob -i 'ck*.jpg' -c:v libx264 ../../out.mp4 +ffmpeg -framerate 1 -pattern_type glob -i 'Kvasir-SEG/images/ck*.jpg' -c:v libx264 out.mp4 ``` +## References https://stackoverflow.com/questions/22965569/convert-from-jpg-to-mp4-by-ffmpeg diff --git a/program/day-one/README.md b/program/day-one/README.md index bc0096a..fb0f45b 100644 --- a/program/day-one/README.md +++ b/program/day-one/README.md @@ -22,6 +22,15 @@ git clone git@github.com:SciKit-Surgery/cmicHACKS2.git ##using password-protec E --> F[Close Bug Issue] ``` +4. Rebasing your branch with the latest changes of main +``` +git checkout main +git pull origin main +git checkout RB +git rebase main +git push --force origin RB +``` + ## 13:00 - 15:00 > Get familiar with your data > Get familiar with your data (download data, label data, etc.) @@ -42,6 +51,7 @@ https://datasets.simula.no/downloads/kvasir-seg.zip ![fig](ml-pipeline.png) * Train segmentation models > [colon_seg_net_train.ipynb](colon_seg_net_train.ipynb) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1s-eKu6QjaV54jva_ylG1VxwCj1B8nwJ3) +* Add your model and notebook [here](../../data/models/README.md#onnx-models) ## References