Tryag File Manager
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
paip
/
script
/
lpr
/
detectron2_LPR
/
Or
Select Your Path :
Upload File :
New :
File
Dir
//paip/script/lpr/detectron2_LPR/Untitled0.ipynb
{"cells":[{"cell_type":"code","execution_count":1,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":20908,"status":"ok","timestamp":1653613371107,"user":{"displayName":"조한별","userId":"01444879122726041884"},"user_tz":-540},"id":"QIOMfrEN13PP","outputId":"dd1e1913-5ba8-4856-de59-6762a21548db"},"outputs":[{"output_type":"stream","name":"stdout","text":["Mounted at /content/drive\n"]}],"source":["from google.colab import drive\n","drive.mount('/content/drive')"]},{"cell_type":"code","execution_count":3,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":281,"status":"ok","timestamp":1653613449922,"user":{"displayName":"조한별","userId":"01444879122726041884"},"user_tz":-540},"id":"lxKPmSld2BCQ","outputId":"925ef277-42bd-4ae5-a1b7-2d86280dc1df"},"outputs":[{"output_type":"stream","name":"stdout","text":["/content/drive/MyDrive/LPR/detectron2_SRM_LPD\n","/content/drive/MyDrive/LPR/detectron2_SRM_LPD\n"]}],"source":["%cd /content/drive/MyDrive/LPR/detectron2_SRM_LPD\n","!pwd"]},{"cell_type":"code","execution_count":8,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":128779,"status":"ok","timestamp":1653615136663,"user":{"displayName":"조한별","userId":"01444879122726041884"},"user_tz":-540},"id":"QV-zAa0_24q-","outputId":"22a0594b-4c41-416a-dfb1-fed6b4ae40e4"},"outputs":[{"output_type":"stream","name":"stdout","text":["Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n","Looking in links: https://download.pytorch.org/whl/torch_stable.html\n","Collecting torch==1.10.1+cu102\n"," Downloading https://download.pytorch.org/whl/cu102/torch-1.10.1%2Bcu102-cp37-cp37m-linux_x86_64.whl (881.9 MB)\n","\u001b[K |██████████████████████████████▎ | 834.1 MB 1.3 MB/s eta 0:00:36tcmalloc: large alloc 1147494400 bytes == 0x3a344000 @ 0x7fe6a5a21615 0x592b76 0x4df71e 0x59afff 0x515655 0x549576 0x593fce 0x548ae9 0x51566f 0x549576 0x593fce 0x548ae9 0x5127f1 0x598e3b 0x511f68 0x598e3b 0x511f68 0x598e3b 0x511f68 0x4bc98a 0x532e76 0x594b72 0x515600 0x549576 0x593fce 0x548ae9 0x5127f1 0x549576 0x593fce 0x5118f8 0x593dd7\n","\u001b[K |████████████████████████████████| 881.9 MB 13 kB/s \n","\u001b[?25hCollecting torchvision==0.11.2+cu102\n"," Downloading https://download.pytorch.org/whl/cu102/torchvision-0.11.2%2Bcu102-cp37-cp37m-linux_x86_64.whl (23.2 MB)\n","\u001b[K |████████████████████████████████| 23.2 MB 1.3 MB/s \n","\u001b[?25hCollecting torchaudio==0.10.1\n"," Downloading https://download.pytorch.org/whl/rocm4.1/torchaudio-0.10.1%2Brocm4.1-cp37-cp37m-linux_x86_64.whl (2.7 MB)\n","\u001b[K |████████████████████████████████| 2.7 MB 39.0 MB/s \n","\u001b[?25hRequirement already satisfied: typing-extensions in /usr/local/lib/python3.7/dist-packages (from torch==1.10.1+cu102) (4.2.0)\n","Requirement already satisfied: pillow!=8.3.0,>=5.3.0 in /usr/local/lib/python3.7/dist-packages (from torchvision==0.11.2+cu102) (7.1.2)\n","Requirement already satisfied: numpy in /usr/local/lib/python3.7/dist-packages (from torchvision==0.11.2+cu102) (1.21.6)\n","Installing collected packages: torch, torchvision, torchaudio\n"," Attempting uninstall: torch\n"," Found existing installation: torch 1.11.0+cu113\n"," Uninstalling torch-1.11.0+cu113:\n"," Successfully uninstalled torch-1.11.0+cu113\n"," Attempting uninstall: torchvision\n"," Found existing installation: torchvision 0.12.0+cu113\n"," Uninstalling torchvision-0.12.0+cu113:\n"," Successfully uninstalled torchvision-0.12.0+cu113\n"," Attempting uninstall: torchaudio\n"," Found existing installation: torchaudio 0.11.0+cu113\n"," Uninstalling torchaudio-0.11.0+cu113:\n"," Successfully uninstalled torchaudio-0.11.0+cu113\n","\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n","torchtext 0.12.0 requires torch==1.11.0, but you have torch 1.10.1+cu102 which is incompatible.\u001b[0m\n","Successfully installed torch-1.10.1+cu102 torchaudio-0.10.1+rocm4.1 torchvision-0.11.2+cu102\n"]}],"source":["!pip3 install torch==1.10.1+cu102 torchvision==0.11.2+cu102 torchaudio==0.10.1 -f https://download.pytorch.org/whl/torch_stable.html"]},{"cell_type":"code","execution_count":6,"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":1000},"executionInfo":{"elapsed":15349,"status":"ok","timestamp":1653614993592,"user":{"displayName":"조한별","userId":"01444879122726041884"},"user_tz":-540},"id":"Cf6yd33X2OCN","outputId":"9008fdcd-c9e7-4795-df8c-606ca5de0198"},"outputs":[{"output_type":"stream","name":"stdout","text":["Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n","Looking in links: https://dl.fbaipublicfiles.com/detectron2/wheels/cu102/torch1.10/index.html\n","Collecting detectron2\n"," Downloading https://dl.fbaipublicfiles.com/detectron2/wheels/cu102/torch1.10/detectron2-0.6%2Bcu102-cp37-cp37m-linux_x86_64.whl (6.5 MB)\n","\u001b[K |████████████████████████████████| 6.5 MB 1.8 MB/s \n","\u001b[?25hRequirement already satisfied: cloudpickle in /usr/local/lib/python3.7/dist-packages (from detectron2) (1.3.0)\n","Requirement already satisfied: tabulate in /usr/local/lib/python3.7/dist-packages (from detectron2) (0.8.9)\n","Requirement already satisfied: future in /usr/local/lib/python3.7/dist-packages (from detectron2) (0.16.0)\n","Collecting yacs>=0.1.8\n"," Downloading yacs-0.1.8-py3-none-any.whl (14 kB)\n","Requirement already satisfied: tensorboard in /usr/local/lib/python3.7/dist-packages (from detectron2) (2.8.0)\n","Requirement already satisfied: pydot in /usr/local/lib/python3.7/dist-packages (from detectron2) (1.3.0)\n","Requirement already satisfied: tqdm>4.29.0 in /usr/local/lib/python3.7/dist-packages (from detectron2) (4.64.0)\n","Requirement already satisfied: matplotlib in /usr/local/lib/python3.7/dist-packages (from detectron2) (3.2.2)\n","Collecting omegaconf>=2.1\n"," Downloading omegaconf-2.2.1-py3-none-any.whl (78 kB)\n","\u001b[K |████████████████████████████████| 78 kB 5.3 MB/s \n","\u001b[?25hCollecting hydra-core>=1.1\n"," Downloading hydra_core-1.2.0-py3-none-any.whl (151 kB)\n","\u001b[K |████████████████████████████████| 151 kB 48.6 MB/s \n","\u001b[?25hCollecting black==21.4b2\n"," Downloading black-21.4b2-py3-none-any.whl (130 kB)\n","\u001b[K |████████████████████████████████| 130 kB 61.8 MB/s \n","\u001b[?25hCollecting iopath<0.1.10,>=0.1.7\n"," Downloading iopath-0.1.9-py3-none-any.whl (27 kB)\n","Requirement already satisfied: pycocotools>=2.0.2 in /usr/local/lib/python3.7/dist-packages (from detectron2) (2.0.4)\n","Collecting fvcore<0.1.6,>=0.1.5\n"," Downloading fvcore-0.1.5.post20220512.tar.gz (50 kB)\n","\u001b[K |████████████████████████████████| 50 kB 8.1 MB/s \n","\u001b[?25hRequirement already satisfied: Pillow>=7.1 in /usr/local/lib/python3.7/dist-packages (from detectron2) (7.1.2)\n","Requirement already satisfied: termcolor>=1.1 in /usr/local/lib/python3.7/dist-packages (from detectron2) (1.1.0)\n","Requirement already satisfied: appdirs in /usr/local/lib/python3.7/dist-packages (from black==21.4b2->detectron2) (1.4.4)\n","Collecting mypy-extensions>=0.4.3\n"," Downloading mypy_extensions-0.4.3-py2.py3-none-any.whl (4.5 kB)\n","Requirement already satisfied: typing-extensions>=3.7.4 in /usr/local/lib/python3.7/dist-packages (from black==21.4b2->detectron2) (4.2.0)\n","Collecting regex>=2020.1.8\n"," Downloading regex-2022.4.24-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (749 kB)\n","\u001b[K |████████████████████████████████| 749 kB 52.4 MB/s \n","\u001b[?25hCollecting typed-ast>=1.4.2\n"," Downloading typed_ast-1.5.4-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (843 kB)\n","\u001b[K |████████████████████████████████| 843 kB 51.8 MB/s \n","\u001b[?25hRequirement already satisfied: click>=7.1.2 in /usr/local/lib/python3.7/dist-packages (from black==21.4b2->detectron2) (7.1.2)\n","Collecting pathspec<1,>=0.8.1\n"," Downloading pathspec-0.9.0-py2.py3-none-any.whl (31 kB)\n","Collecting toml>=0.10.1\n"," Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB)\n","Requirement already satisfied: numpy in /usr/local/lib/python3.7/dist-packages (from fvcore<0.1.6,>=0.1.5->detectron2) (1.21.6)\n","Collecting pyyaml>=5.1\n"," Downloading PyYAML-6.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (596 kB)\n","\u001b[K |████████████████████████████████| 596 kB 53.6 MB/s \n","\u001b[?25hCollecting antlr4-python3-runtime==4.9.*\n"," Downloading antlr4-python3-runtime-4.9.3.tar.gz (117 kB)\n","\u001b[K |████████████████████████████████| 117 kB 71.5 MB/s \n","\u001b[?25hRequirement already satisfied: importlib-resources in /usr/local/lib/python3.7/dist-packages (from hydra-core>=1.1->detectron2) (5.7.1)\n","Requirement already satisfied: packaging in /usr/local/lib/python3.7/dist-packages (from hydra-core>=1.1->detectron2) (21.3)\n","Collecting portalocker\n"," Downloading portalocker-2.4.0-py2.py3-none-any.whl (16 kB)\n","Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.7/dist-packages (from matplotlib->detectron2) (0.11.0)\n","Requirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib->detectron2) (2.8.2)\n","Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib->detectron2) (3.0.9)\n","Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib->detectron2) (1.4.2)\n","Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.7/dist-packages (from python-dateutil>=2.1->matplotlib->detectron2) (1.15.0)\n","Requirement already satisfied: zipp>=3.1.0 in /usr/local/lib/python3.7/dist-packages (from importlib-resources->hydra-core>=1.1->detectron2) (3.8.0)\n","Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in /usr/local/lib/python3.7/dist-packages (from tensorboard->detectron2) (1.8.1)\n","Requirement already satisfied: requests<3,>=2.21.0 in /usr/local/lib/python3.7/dist-packages (from tensorboard->detectron2) (2.23.0)\n","Requirement already satisfied: protobuf>=3.6.0 in /usr/local/lib/python3.7/dist-packages (from tensorboard->detectron2) (3.17.3)\n","Requirement already satisfied: tensorboard-data-server<0.7.0,>=0.6.0 in /usr/local/lib/python3.7/dist-packages (from tensorboard->detectron2) (0.6.1)\n","Requirement already satisfied: grpcio>=1.24.3 in /usr/local/lib/python3.7/dist-packages (from tensorboard->detectron2) (1.46.1)\n","Requirement already satisfied: wheel>=0.26 in /usr/local/lib/python3.7/dist-packages (from tensorboard->detectron2) (0.37.1)\n","Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.7/dist-packages (from tensorboard->detectron2) (3.3.7)\n","Requirement already satisfied: absl-py>=0.4 in /usr/local/lib/python3.7/dist-packages (from tensorboard->detectron2) (1.0.0)\n","Requirement already satisfied: werkzeug>=0.11.15 in /usr/local/lib/python3.7/dist-packages (from tensorboard->detectron2) (1.0.1)\n","Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in /usr/local/lib/python3.7/dist-packages (from tensorboard->detectron2) (0.4.6)\n","Requirement already satisfied: setuptools>=41.0.0 in /usr/local/lib/python3.7/dist-packages (from tensorboard->detectron2) (57.4.0)\n","Requirement already satisfied: google-auth<3,>=1.6.3 in /usr/local/lib/python3.7/dist-packages (from tensorboard->detectron2) (1.35.0)\n","Requirement already satisfied: cachetools<5.0,>=2.0.0 in /usr/local/lib/python3.7/dist-packages (from google-auth<3,>=1.6.3->tensorboard->detectron2) (4.2.4)\n","Requirement already satisfied: rsa<5,>=3.1.4 in /usr/local/lib/python3.7/dist-packages (from google-auth<3,>=1.6.3->tensorboard->detectron2) (4.8)\n","Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/local/lib/python3.7/dist-packages (from google-auth<3,>=1.6.3->tensorboard->detectron2) (0.2.8)\n","Requirement already satisfied: requests-oauthlib>=0.7.0 in /usr/local/lib/python3.7/dist-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard->detectron2) (1.3.1)\n","Requirement already satisfied: importlib-metadata>=4.4 in /usr/local/lib/python3.7/dist-packages (from markdown>=2.6.8->tensorboard->detectron2) (4.11.3)\n","Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /usr/local/lib/python3.7/dist-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard->detectron2) (0.4.8)\n","Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests<3,>=2.21.0->tensorboard->detectron2) (2022.5.18.1)\n","Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests<3,>=2.21.0->tensorboard->detectron2) (2.10)\n","Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests<3,>=2.21.0->tensorboard->detectron2) (1.24.3)\n","Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests<3,>=2.21.0->tensorboard->detectron2) (3.0.4)\n","Requirement already satisfied: oauthlib>=3.0.0 in /usr/local/lib/python3.7/dist-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard->detectron2) (3.2.0)\n","Building wheels for collected packages: fvcore, antlr4-python3-runtime\n"," Building wheel for fvcore (setup.py) ... \u001b[?25l\u001b[?25hdone\n"," Created wheel for fvcore: filename=fvcore-0.1.5.post20220512-py3-none-any.whl size=61288 sha256=7adc802500ec3fb0804c9eacc82359e5e8810265d32acd4152d94e05c42527cc\n"," Stored in directory: /root/.cache/pip/wheels/68/20/f9/a11a0dd63f4c13678b2a5ec488e48078756505c7777b75b29e\n"," Building wheel for antlr4-python3-runtime (setup.py) ... \u001b[?25l\u001b[?25hdone\n"," Created wheel for antlr4-python3-runtime: filename=antlr4_python3_runtime-4.9.3-py3-none-any.whl size=144575 sha256=aa23d5574ae9921e4b46f8ceb8a09a7b77d5ce1f886fd3a22470531bc4495d8b\n"," Stored in directory: /root/.cache/pip/wheels/8b/8d/53/2af8772d9aec614e3fc65e53d4a993ad73c61daa8bbd85a873\n","Successfully built fvcore antlr4-python3-runtime\n","Installing collected packages: pyyaml, portalocker, antlr4-python3-runtime, yacs, typed-ast, toml, regex, pathspec, omegaconf, mypy-extensions, iopath, hydra-core, fvcore, black, detectron2\n"," Attempting uninstall: pyyaml\n"," Found existing installation: PyYAML 3.13\n"," Uninstalling PyYAML-3.13:\n"," Successfully uninstalled PyYAML-3.13\n"," Attempting uninstall: regex\n"," Found existing installation: regex 2019.12.20\n"," Uninstalling regex-2019.12.20:\n"," Successfully uninstalled regex-2019.12.20\n","Successfully installed antlr4-python3-runtime-4.9.3 black-21.4b2 detectron2-0.6+cu102 fvcore-0.1.5.post20220512 hydra-core-1.2.0 iopath-0.1.9 mypy-extensions-0.4.3 omegaconf-2.2.1 pathspec-0.9.0 portalocker-2.4.0 pyyaml-6.0 regex-2022.4.24 toml-0.10.2 typed-ast-1.5.4 yacs-0.1.8\n"]},{"output_type":"display_data","data":{"application/vnd.colab-display-data+json":{"pip_warning":{"packages":["pydevd_plugins"]}}},"metadata":{}}],"source":["!pip3 install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu102/torch1.10/index.html"]},{"cell_type":"code","execution_count":34,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":56346,"status":"ok","timestamp":1653634240041,"user":{"displayName":"조한별","userId":"01444879122726041884"},"user_tz":-540},"id":"EaSRE7JzTcNh","outputId":"fa7a4b0f-f461-445b-93e4-7a41d61b8a5d"},"outputs":[{"output_type":"stream","name":"stdout","text":["Starting to detect license plate \n","image name = ./demo_image2/NPR_G79517481_20220520130101808_MOTION_DETECTION.jpg\n","Complete save file\n","\n","image name = ./demo_image2/NPR_G79517481_20220520125836262_MOTION_DETECTION.jpg\n","Complete save file\n","\n","image name = ./demo_image2/NPR_G79517481_20220520130056410_MOTION_DETECTION.jpg\n","Complete save file\n","\n","image name = ./demo_image2/NPR_G79517481_20220520125847091_MOTION_DETECTION.jpg\n","./demo_image2/NPR_G79517481_20220520125847091_MOTION_DETECTION.jpg No Detecting LPD\n","\n","image name = ./demo_image2/NPR_G79517481_20220520130107335_MOTION_DETECTION.jpg\n","Complete save file\n","\n","image name = ./demo_image2/NPR_G79517481_20220520125841693_MOTION_DETECTION.jpg\n","Complete save file\n","\n","image name = ./demo_image2/NPR_G79517481_20220520130112865_MOTION_DETECTION.jpg\n","Complete save file\n","\n"]}],"source":["!python detectron2_lpr_inference.py"]},{"cell_type":"code","execution_count":10,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":11030,"status":"ok","timestamp":1653616210972,"user":{"displayName":"조한별","userId":"01444879122726041884"},"user_tz":-540},"id":"lB8E4nOGTcye","outputId":"08d9f4f1-378e-42c0-b606-d4de4d242089"},"outputs":[{"output_type":"stream","name":"stdout","text":["No SequenceModeling module specified\n","loading pretrained model from ./weight/lpr_weight/TPS-ResNet-None-CTC-Seed504-9599.pth\n","/usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py:481: UserWarning: This DataLoader will create 4 worker processes in total. Our suggested max number of worker in current system is 2, which is smaller than what this DataLoader is going to create. Please be aware that excessive worker creation might get DataLoader running slow or even freeze, lower the worker number to avoid potential slowness/freeze if necessary.\n"," cpuset_checked))\n","--------------------------------------------------------------------------------\n","image_path \tpredicted_labels \tconfidence score\n","--------------------------------------------------------------------------------\n","./LPD_test/save_crop/2222.jpg\t62소2993 \t0.3885\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503142232325_MOTION_DETECTION.jpg\t4937974 \t0.2464\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503142248089_MOTION_DETECTION.jpg\t383도7193 \t0.8959\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503142253356_MOTION_DETECTION.jpg\t42오4273 \t0.1204\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503142531853_MOTION_DETECTION.jpg\t서울32바3004 \t0.3563\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503143845669_MOTION_DETECTION.jpg\t04주1484 \t0.7174\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503143850896_MOTION_DETECTION.jpg\t57수0873 \t0.8970\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503143917253_MOTION_DETECTION.jpg\t서0959 \t0.0382\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503143922485_MOTION_DETECTION.jpg\t380 \t0.4016\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503144052048_MOTION_DETECTION.jpg\t13무2982 \t0.9806\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503144102812_MOTION_DETECTION.jpg\t486소0352 \t0.1254\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503144108043_MOTION_DETECTION.jpg\t21라9560 \t0.5927\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503144617085_MOTION_DETECTION.jpg\t60러7053 \t0.9574\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503144622320_MOTION_DETECTION.jpg\t23호6090 \t0.5657\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503144627581_MOTION_DETECTION.jpg\t02고6683 \t0.6855\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503144632812_MOTION_DETECTION.jpg\t38두9437 \t0.1856\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503144641113_MOTION_DETECTION.jpg\t37바217 \t0.0990\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503144733821_MOTION_DETECTION.jpg\t204223 \t0.3601\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503145817402_MOTION_DETECTION.jpg\t4바34 \t0.0496\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503145854280_MOTION_DETECTION.jpg\t4기08258 \t0.0132\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503145910043_MOTION_DETECTION.jpg\t810 \t0.0449\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503145941529_MOTION_DETECTION.jpg\t4기9머3450 \t0.3642\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503150003452_MOTION_DETECTION.jpg\t3어6944 \t0.5632\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503150127632_MOTION_DETECTION.jpg\t32무7079 \t0.5013\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503150302682_MOTION_DETECTION.jpg\t21 \t0.1934\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503150406524_MOTION_DETECTION.jpg\t810 \t0.2604\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503150708752_MOTION_DETECTION.jpg\t북8858 \t0.2337\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503150719245_MOTION_DETECTION.jpg\t기58 \t0.4267\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503150724479_MOTION_DETECTION.jpg\t천울88 \t0.1662\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503151201204_MOTION_DETECTION.jpg\t28389 \t0.1391\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503151238155_MOTION_DETECTION.jpg\t기9457 \t0.0866\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503154219767_MOTION_DETECTION.jpg\t천382 \t0.1140\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503154225036_MOTION_DETECTION.jpg\t181도5548 \t0.2256\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503154230296_MOTION_DETECTION.jpg\t333바5370 \t0.3009\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503154401326_MOTION_DETECTION.jpg\t33아6292 \t0.3147\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503154540886_MOTION_DETECTION.jpg\t04조2809 \t0.9516\n","./LPD_test/save_crop/plate_NPR_G79517481_20220520130112865_MOTION_DETECTION.jpg\t980 \t0.0859\n","./LPD_test/save_crop/scanned11.jpg\t62소2993 \t0.9795\n"]}],"source":["!python recog_demo.py # --image_folder ./LPD_test/save_crop --saved_model ./output/TPS-ResNet-BiLSTM-CTC_Best1.pth --Transformation TPS --FeatureExtraction ResNet --SequenceModeling None --Prediction CTC"]},{"cell_type":"markdown","metadata":{"id":"gxsV7q4LajvT"},"source":[""]},{"cell_type":"code","execution_count":46,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":299238,"status":"ok","timestamp":1653641693947,"user":{"displayName":"조한별","userId":"01444879122726041884"},"user_tz":-540},"id":"Eb6dHjgDe5z-","outputId":"e9cb2091-a755-470f-ce88-7125968d1546"},"outputs":[{"output_type":"stream","name":"stdout","text":["No SequenceModeling module specified\n","loading pretrained model from ./weight/lpr_weight/TPS-ResNet-None-CTC-Seed504-9599.pth\n","Starting to detect license plate \n","image name = ./demo_image/NPR_G79517481_20220503144622320_MOTION_DETECTION.jpg\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503144617085_MOTION_DETECTION.jpg\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503144102812_MOTION_DETECTION.jpg\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503144108043_MOTION_DETECTION.jpg\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503144052048_MOTION_DETECTION.jpg\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503143922485_MOTION_DETECTION.jpg\n","1 more box detected. will get best scored box\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503143917253_MOTION_DETECTION.jpg\n","1 more box detected. will get best scored box\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503142531853_MOTION_DETECTION.jpg\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503143850896_MOTION_DETECTION.jpg\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503143845669_MOTION_DETECTION.jpg\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503142253356_MOTION_DETECTION.jpg\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503154401326_MOTION_DETECTION.jpg\n","1 more box detected. will get best scored box\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503142248089_MOTION_DETECTION.jpg\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503154230296_MOTION_DETECTION.jpg\n","1 more box detected. will get best scored box\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503154540886_MOTION_DETECTION.jpg\n","1 more box detected. will get best scored box\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503142232325_MOTION_DETECTION.jpg\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503154219767_MOTION_DETECTION.jpg\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503154225036_MOTION_DETECTION.jpg\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503151259209_MOTION_DETECTION.jpg\n","./demo_image/NPR_G79517481_20220503151259209_MOTION_DETECTION.jpg No Detecting LPD\n","\n","image name = ./demo_image/NPR_G79517481_20220503151222256_MOTION_DETECTION.jpg\n","./demo_image/NPR_G79517481_20220503151222256_MOTION_DETECTION.jpg No Detecting LPD\n","\n","image name = ./demo_image/NPR_G79517481_20220503151238155_MOTION_DETECTION.jpg\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503151201204_MOTION_DETECTION.jpg\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503151145504_MOTION_DETECTION.jpg\n","./demo_image/NPR_G79517481_20220503151145504_MOTION_DETECTION.jpg No Detecting LPD\n","\n","image name = ./demo_image/NPR_G79517481_20220503150719245_MOTION_DETECTION.jpg\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503150724479_MOTION_DETECTION.jpg\n","1 more box detected. will get best scored box\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503150708752_MOTION_DETECTION.jpg\n","1 more box detected. will get best scored box\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503150406524_MOTION_DETECTION.jpg\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503150302682_MOTION_DETECTION.jpg\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503150127632_MOTION_DETECTION.jpg\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503150003452_MOTION_DETECTION.jpg\n","1 more box detected. will get best scored box\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503145941529_MOTION_DETECTION.jpg\n","1 more box detected. will get best scored box\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503145817402_MOTION_DETECTION.jpg\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503145910043_MOTION_DETECTION.jpg\n","1 more box detected. will get best scored box\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503145854280_MOTION_DETECTION.jpg\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503144733821_MOTION_DETECTION.jpg\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503144641113_MOTION_DETECTION.jpg\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503144632812_MOTION_DETECTION.jpg\n","Complete save file\n","\n","image name = ./demo_image/NPR_G79517481_20220503144627581_MOTION_DETECTION.jpg\n","Complete save file\n","\n","번호Detection 시간 : 287.82433 sec\n","--------------------------------------------------------------------------------\n","image_path \tpredicted_labels \tconfidence score\n","--------------------------------------------------------------------------------\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503142232325_MOTION_DETECTION.jpg\t149하7924 \t0.7272\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503142248089_MOTION_DETECTION.jpg\t383도7193 \t0.6439\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503142253356_MOTION_DETECTION.jpg\t42오4273 \t0.6487\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503142531853_MOTION_DETECTION.jpg\t서울32바3004 \t0.2797\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503143845669_MOTION_DETECTION.jpg\t04루3484 \t0.3111\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503143850896_MOTION_DETECTION.jpg\t57수0873 \t0.6000\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503143917253_MOTION_DETECTION.jpg\t344수9659 \t0.7273\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503143922485_MOTION_DETECTION.jpg\t천580 \t0.0572\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503144052048_MOTION_DETECTION.jpg\t13무2982 \t0.4175\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503144102812_MOTION_DETECTION.jpg\t86로0352 \t0.5826\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503144108043_MOTION_DETECTION.jpg\t2189560 \t0.7467\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503144617085_MOTION_DETECTION.jpg\t60러7053 \t0.4868\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503144622320_MOTION_DETECTION.jpg\t23호6090 \t0.5840\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503144627581_MOTION_DETECTION.jpg\t02고6683 \t0.3670\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503144632812_MOTION_DETECTION.jpg\t338두9437 \t0.9999\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503144641113_MOTION_DETECTION.jpg\t31자2117 \t0.4323\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503144733821_MOTION_DETECTION.jpg\t4다4223 \t0.9597\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503145817402_MOTION_DETECTION.jpg\t120로2668 \t0.7645\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503145854280_MOTION_DETECTION.jpg\t3천7루2571 \t0.0226\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503145910043_MOTION_DETECTION.jpg\t411 \t0.1664\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503145941529_MOTION_DETECTION.jpg\t49머3450 \t0.3607\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503150003452_MOTION_DETECTION.jpg\t30루6944 \t0.9847\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503150127632_MOTION_DETECTION.jpg\t32무7079 \t0.9850\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503150302682_MOTION_DETECTION.jpg\t41 \t0.2201\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503150406524_MOTION_DETECTION.jpg\t4 \t0.1228\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503150708752_MOTION_DETECTION.jpg\t58모8516 \t0.9720\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503150719245_MOTION_DETECTION.jpg\t3기98 \t0.1322\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503150724479_MOTION_DETECTION.jpg\t850585 \t0.8260\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503151201204_MOTION_DETECTION.jpg\t22도5288 \t0.9177\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503151238155_MOTION_DETECTION.jpg\t809소560 \t0.4322\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503154219767_MOTION_DETECTION.jpg\t인천22 \t0.0665\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503154225036_MOTION_DETECTION.jpg\t181도6548 \t0.6451\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503154230296_MOTION_DETECTION.jpg\t333라5370 \t0.2881\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503154401326_MOTION_DETECTION.jpg\t33하6292 \t0.7833\n","./LPD_test/save_crop/plate_NPR_G79517481_20220503154540886_MOTION_DETECTION.jpg\t04조2809 \t0.5675\n","번호Recog 시간 : 5.84839 sec\n"]}],"source":["!python main.py"]},{"cell_type":"code","execution_count":null,"metadata":{"id":"K0FaiiZxe70U"},"outputs":[],"source":[""]}],"metadata":{"colab":{"name":"Untitled0.ipynb","provenance":[],"authorship_tag":"ABX9TyO4f9kJhS93l+ixEckXHFfr"},"kernelspec":{"display_name":"Python 3","name":"python3"},"language_info":{"name":"python"}},"nbformat":4,"nbformat_minor":0}