From 04aed2de10ec95c3d60970ae4d199172f1f13714 Mon Sep 17 00:00:00 2001 From: Msk142 Date: Thu, 22 Sep 2022 01:29:59 -0400 Subject: [PATCH 1/2] update --- .idea/PerceptionTutorials.iml | 12 ++ .idea/detectron2 | 1 + .../inspectionProfiles/profiles_settings.xml | 6 + .idea/misc.xml | 4 + .idea/modules.xml | 8 ++ .../shelved.patch | 19 +++ ...ebasing_at_9_21_22__10_46_PM__Changes_.xml | 4 + .idea/vcs.xml | 6 + .idea/workspace.xml | 117 +++++++++++++++ 08_2d_visulization/submissions/kim8210.ipynb | 136 ++++++++++++++++++ .../{ => submissions}/sample.jpg | Bin 11 files changed, 313 insertions(+) create mode 100644 .idea/PerceptionTutorials.iml create mode 160000 .idea/detectron2 create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/shelf/Uncommitted_changes_before_Rebasing_at_9_21_22,_10_46_PM_[Changes]/shelved.patch create mode 100644 .idea/shelf/Uncommitted_changes_before_Rebasing_at_9_21_22__10_46_PM__Changes_.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml create mode 100644 08_2d_visulization/submissions/kim8210.ipynb rename 08_2d_visulization/{ => submissions}/sample.jpg (100%) diff --git a/.idea/PerceptionTutorials.iml b/.idea/PerceptionTutorials.iml new file mode 100644 index 0000000..8b8c395 --- /dev/null +++ b/.idea/PerceptionTutorials.iml @@ -0,0 +1,12 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/detectron2 b/.idea/detectron2 new file mode 160000 index 0000000..0703e08 --- /dev/null +++ b/.idea/detectron2 @@ -0,0 +1 @@ +Subproject commit 0703e08a5f589f7503a3fbfce41309c80204eec8 diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..07fdad5 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..f54018a --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/shelf/Uncommitted_changes_before_Rebasing_at_9_21_22,_10_46_PM_[Changes]/shelved.patch b/.idea/shelf/Uncommitted_changes_before_Rebasing_at_9_21_22,_10_46_PM_[Changes]/shelved.patch new file mode 100644 index 0000000..bb66351 --- /dev/null +++ b/.idea/shelf/Uncommitted_changes_before_Rebasing_at_9_21_22,_10_46_PM_[Changes]/shelved.patch @@ -0,0 +1,19 @@ +Index: .idea/misc.xml +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP +<+>\n\n \n \n \n +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +diff --git a/.idea/misc.xml b/.idea/misc.xml +--- a/.idea/misc.xml (revision aeadcea2b703b74ed948be69aa550ef50723128f) ++++ b/.idea/misc.xml (date 1663272887287) +@@ -1,6 +1,4 @@ + + +- +- +- ++ + +\ No newline at end of file diff --git a/.idea/shelf/Uncommitted_changes_before_Rebasing_at_9_21_22__10_46_PM__Changes_.xml b/.idea/shelf/Uncommitted_changes_before_Rebasing_at_9_21_22__10_46_PM__Changes_.xml new file mode 100644 index 0000000..4f0ee57 --- /dev/null +++ b/.idea/shelf/Uncommitted_changes_before_Rebasing_at_9_21_22__10_46_PM__Changes_.xml @@ -0,0 +1,4 @@ + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..c946b04 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + { + "keyToString": { + "WebServerToolWindowFactoryState": "false", + "last_opened_file_path": "/Users/minsookim/Desktop/perception/PerceptionTutorials/08_2d_visulization/submissions", + "nodejs_package_manager_path": "npm" + } +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + $USER_HOME$/.subversion + + + + + 1663212157904 + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/08_2d_visulization/submissions/kim8210.ipynb b/08_2d_visulization/submissions/kim8210.ipynb new file mode 100644 index 0000000..0a1f6de --- /dev/null +++ b/08_2d_visulization/submissions/kim8210.ipynb @@ -0,0 +1,136 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "36786708-42e2-421b-847c-64a026c2e812", + "metadata": { + "pycharm": { + "name": "#%%\n", + "is_executing": true + } + }, + "outputs": [], + "source": [ + "from PIL import Image\n", + "import matplotlib.pyplot as plt\n", + "import cv2\n", + "import numpy as np " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "caaab820-0022-4a67-adf2-e5b8c2c56372", + "metadata": { + "pycharm": { + "is_executing": true, + "name": "#%%\n" + } + }, + "outputs": [], + "source": [ + "sample = Image.open(\"sample.jpg\")\n", + "plt.imshow(sample)\n", + "image = cv2.imread(\"sample.jpg\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "outputs": [], + "source": [ + "original = image.copy()\n", + "image = cv2.cvtColor(image, cv2.COLOR_BGR2HSV)\n", + "lower = np.array([0,50,50], dtype=\"uint8\")\n", + "upper = np.array([10,255,255], dtype=\"uint8\")\n", + "mask = cv2.inRange(image, lower, upper)\n", + "\n", + "cnts = cv2.findContours(mask, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)\n", + "cnts = cnts[0] if len(cnts) == 2 else cnts[1]\n", + "cv2.fillPoly(mask, cnts, (255,255,255))\n", + "result = cv2.bitwise_and(original,original,mask=mask)\n", + "\n", + "cv2.imread('mask', mask)\n", + "cv2.imread('result', result)\n", + "cv2.waitKey()\n", + "\n" + ], + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + } + }, + { + "cell_type": "code", + "execution_count": null, + "outputs": [], + "source": [], + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + } + }, + { + "cell_type": "code", + "execution_count": null, + "outputs": [], + "source": [], + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + } + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7e63a999", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "da5bb592", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "bb43bf38", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.7" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} \ No newline at end of file diff --git a/08_2d_visulization/sample.jpg b/08_2d_visulization/submissions/sample.jpg similarity index 100% rename from 08_2d_visulization/sample.jpg rename to 08_2d_visulization/submissions/sample.jpg From cc9538745c5a3eaa7f08b40c5fba1337e38d5ce9 Mon Sep 17 00:00:00 2001 From: Msk142 Date: Thu, 22 Sep 2022 01:31:22 -0400 Subject: [PATCH 2/2] learning vis2d --- .idea/workspace.xml | 6 ++---- 08_2d_visulization/submissions/kim8210.ipynb | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index c946b04..6d03cc0 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,9 +1,7 @@ - - - + diff --git a/08_2d_visulization/submissions/kim8210.ipynb b/08_2d_visulization/submissions/kim8210.ipynb index 0a1f6de..fe88b50 100644 --- a/08_2d_visulization/submissions/kim8210.ipynb +++ b/08_2d_visulization/submissions/kim8210.ipynb @@ -54,6 +54,7 @@ "cv2.imread('mask', mask)\n", "cv2.imread('result', result)\n", "cv2.waitKey()\n", + "#changed\n", "\n" ], "metadata": {