{"id":11626,"date":"2021-05-10T15:30:42","date_gmt":"2021-05-10T11:00:42","guid":{"rendered":"https:\/\/shahaab-co.com\/mag\/?p=11626"},"modified":"2024-11-29T18:36:56","modified_gmt":"2024-11-29T15:06:56","slug":"mask-r-cnn-instance-segmentation-with-pytorch","status":"publish","type":"post","link":"https:\/\/shahaab-co.com\/mag\/edu\/deep-learning\/mask-r-cnn-instance-segmentation-with-pytorch\/","title":{"rendered":"\u0622\u0645\u0648\u0632\u0634 PyTorch \u0628\u0631\u0627\u06cc \u0645\u0628\u062a\u062f\u06cc\u0627\u0646 &#8211; \u0646\u0627\u062d\u06cc\u0647 \u0628\u0646\u062f\u06cc \u0646\u0645\u0648\u0646\u0647 \u0628\u0627 Mask R-CNN"},"content":{"rendered":"<p style=\"text-align: justify\">\u062f\u0631 \u0622\u062e\u0631\u06cc\u0646 \u067e\u0633\u062a \u0627\u0632 \u0645\u062c\u0645\u0648\u0639\u0647 PyTorch \u0628\u0631\u0627\u06cc \u0645\u0628\u062a\u062f\u06cc\u0627\u0646 \u060c \u0645\u0627 \u062f\u0631 \u0645\u0648\u0631\u062f \u062a\u0626\u0648\u0631\u06cc Mask R-CNN \u0648 \u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u06cc\u06a9 \u0645\u062f\u0644 Mask R-CNN \u0627\u0632 \u0642\u0628\u0644 \u0622\u0645\u0648\u0632\u0634 \u062f\u06cc\u062f\u0647 \u062f\u0631 PyTorch \u0628\u062d\u062b \u062e\u0648\u0627\u0647\u06cc\u0645 \u06a9\u0631\u062f.<\/p>\n\n\n<div class=\"wp-block-rank-math-toc-block\"><div id=\"ez-toc-container\" class=\"ez-toc-v2_0_76 counter-hierarchy ez-toc-counter-rtl ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">\u0622\u0646\u0686\u0647 \u062f\u0631 \u0627\u06cc\u0646 \u0645\u0637\u0644\u0628 \u062e\u0648\u0627\u0647\u06cc\u0645 \u062e\u0648\u0627\u0646\u062f :<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #0044bf;color:#0044bf\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #0044bf;color:#0044bf\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/shahaab-co.com\/mag\/edu\/deep-learning\/mask-r-cnn-instance-segmentation-with-pytorch\/#%D9%81%D9%87%D8%B1%D8%B3%D8%AA_%D9%85%D8%B7%D8%A7%D9%84%D8%A8\" >\u0641\u0647\u0631\u0633\u062a \u0645\u0637\u0627\u0644\u0628<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/shahaab-co.com\/mag\/edu\/deep-learning\/mask-r-cnn-instance-segmentation-with-pytorch\/#%DB%B1-_%D9%86%D8%A7%D8%AD%DB%8C%D9%87_%D8%A8%D9%86%D8%AF%DB%8C_%D9%85%D8%B9%D9%86%D8%A7%DB%8C%DB%8C_%D8%8C_%D8%AA%D8%B4%D8%AE%DB%8C%D8%B5_%D8%A7%D8%B4%DB%8C%D8%A7_%D9%88_%D9%86%D8%A7%D8%AD%DB%8C%D9%87_%D8%A8%D9%86%D8%AF%DB%8C_%D9%86%D9%85%D9%88%D9%86%D9%87\" >\u06f1- \u0646\u0627\u062d\u06cc\u0647 \u0628\u0646\u062f\u06cc \u0645\u0639\u0646\u0627\u06cc\u06cc \u060c \u062a\u0634\u062e\u06cc\u0635 \u0627\u0634\u06cc\u0627 \u0648 \u0646\u0627\u062d\u06cc\u0647 \u0628\u0646\u062f\u06cc \u0646\u0645\u0648\u0646\u0647<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/shahaab-co.com\/mag\/edu\/deep-learning\/mask-r-cnn-instance-segmentation-with-pytorch\/#%DB%B1-%DB%B1_%D9%85%D8%B9%D9%85%D8%A7%D8%B1%DB%8C_Mask_R-CNN\" >\u06f1-\u06f1 \u0645\u0639\u0645\u0627\u0631\u06cc Mask R-CNN<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/shahaab-co.com\/mag\/edu\/deep-learning\/mask-r-cnn-instance-segmentation-with-pytorch\/#%DB%B2-_%DA%A9%D8%AF_%D9%86%D9%88%DB%8C%D8%B3%DB%8C_Mask_R-CNN_%D8%A8%D8%A7_PyTorch\" >\u06f2- \u06a9\u062f \u0646\u0648\u06cc\u0633\u06cc Mask R-CNN \u0628\u0627 PyTorch<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/shahaab-co.com\/mag\/edu\/deep-learning\/mask-r-cnn-instance-segmentation-with-pytorch\/#%DB%B1-%DB%B2_%D9%88%D8%B1%D9%88%D8%AF%DB%8C_%D9%88_%D8%AE%D8%B1%D9%88%D8%AC%DB%8C\" >\u06f1-\u06f2 \u0648\u0631\u0648\u062f\u06cc \u0648 \u062e\u0631\u0648\u062c\u06cc<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/shahaab-co.com\/mag\/edu\/deep-learning\/mask-r-cnn-instance-segmentation-with-pytorch\/#%DB%B2-%DB%B2_%D9%85%D8%AF%D9%84_%D8%A7%D8%B2_%D9%82%D8%A8%D9%84_%D8%A2%D9%85%D9%88%D8%B2%D8%B4_%D8%AF%DB%8C%D8%AF%D9%87\" >\u06f2-\u06f2 \u0645\u062f\u0644 \u0627\u0632 \u0642\u0628\u0644 \u0622\u0645\u0648\u0632\u0634 \u062f\u06cc\u062f\u0647<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/shahaab-co.com\/mag\/edu\/deep-learning\/mask-r-cnn-instance-segmentation-with-pytorch\/#%DB%B3-%DB%B2_%D9%BE%DB%8C%D8%B4_%D8%A8%DB%8C%D9%86%DB%8C_%D9%85%D8%AF%D9%84\" >\u06f3-\u06f2 \u067e\u06cc\u0634 \u0628\u06cc\u0646\u06cc \u0645\u062f\u0644<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/shahaab-co.com\/mag\/edu\/deep-learning\/mask-r-cnn-instance-segmentation-with-pytorch\/#%DB%B4-%DB%B2_%D8%AE%D8%B7_%D9%84%D9%88%D9%84%D9%87_%D8%A8%D8%B1%D8%A7%DB%8C_%D9%86%D8%A7%D8%AD%DB%8C%D9%87_%D8%A8%D9%86%D8%AF%DB%8C_%D9%85%D8%B9%D9%86%D8%A7%DB%8C%DB%8C\" >\u06f4-\u06f2 \u062e\u0637 \u0644\u0648\u0644\u0647 \u0628\u0631\u0627\u06cc \u0646\u0627\u062d\u06cc\u0647 \u0628\u0646\u062f\u06cc \u0645\u0639\u0646\u0627\u06cc\u06cc<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/shahaab-co.com\/mag\/edu\/deep-learning\/mask-r-cnn-instance-segmentation-with-pytorch\/#%DB%B5-%DB%B2_%D8%A7%D8%B3%D8%AA%D9%86%D8%A8%D8%A7%D8%B7\" >\u06f5-\u06f2 \u0627\u0633\u062a\u0646\u0628\u0627\u0637<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/shahaab-co.com\/mag\/edu\/deep-learning\/mask-r-cnn-instance-segmentation-with-pytorch\/#%DB%B3-_%D8%B9%D9%85%D9%84%DA%A9%D8%B1%D8%AF_Faster_R-CNN_%D8%AF%D8%B1_%D9%85%D9%82%D8%A7%D8%A8%D9%84_Mask_R-CNN\" >\u06f3- \u0639\u0645\u0644\u06a9\u0631\u062f Faster R-CNN \u062f\u0631 \u0645\u0642\u0627\u0628\u0644 Mask R-CNN<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/shahaab-co.com\/mag\/edu\/deep-learning\/mask-r-cnn-instance-segmentation-with-pytorch\/#%DB%B1-%DB%B3_%D9%85%D9%82%D8%A7%DB%8C%D8%B3%D9%87_%D8%B2%D9%85%D8%A7%D9%86_%D8%A7%D8%B3%D8%AA%D9%86%D8%A8%D8%A7%D8%B7_%D9%85%D8%AF%D9%84_%D8%AF%D8%B1_CPU_%D9%88_GPU\" >\u06f1-\u06f3 \u0645\u0642\u0627\u06cc\u0633\u0647 \u0632\u0645\u0627\u0646 \u0627\u0633\u062a\u0646\u0628\u0627\u0637 \u0645\u062f\u0644 \u062f\u0631 CPU \u0648 GPU<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/shahaab-co.com\/mag\/edu\/deep-learning\/mask-r-cnn-instance-segmentation-with-pytorch\/#%DB%B2-%DB%B3_%D8%A7%D9%84%D8%B2%D8%A7%D9%85%D8%A7%D8%AA_%D8%AD%D8%A7%D9%81%D8%B8%D9%87_%D9%85%D8%AF%D9%84_%D9%87%D8%A7\" >\u06f2-\u06f3 \u0627\u0644\u0632\u0627\u0645\u0627\u062a \u062d\u0627\u0641\u0638\u0647 \u0645\u062f\u0644 \u0647\u0627<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"%D9%81%D9%87%D8%B1%D8%B3%D8%AA_%D9%85%D8%B7%D8%A7%D9%84%D8%A8\"><\/span>\u0641\u0647\u0631\u0633\u062a \u0645\u0637\u0627\u0644\u0628<span class=\"ez-toc-section-end\"><\/span><\/h2><nav><ul><li><a href=\"#h-1\" >\u06f1- \u0646\u0627\u062d\u06cc\u0647 \u0628\u0646\u062f\u06cc \u0645\u0639\u0646\u0627\u06cc\u06cc \u060c \u062a\u0634\u062e\u06cc\u0635 \u0627\u0634\u06cc\u0627 \u0648 \u0646\u0627\u062d\u06cc\u0647 \u0628\u0646\u062f\u06cc \u0646\u0645\u0648\u0646\u0647<\/a><ul><li><a href=\"#h-1-1-mask-r-cnn\" >\u06f1-\u06f1 \u0645\u0639\u0645\u0627\u0631\u06cc Mask R-CNN<\/a><\/li><\/ul><\/li><li><a href=\"#h-2-mask-r-cnn-pytorch\" >2- \u06a9\u062f \u0646\u0648\u06cc\u0633\u06cc Mask R-CNN \u0628\u0627 PyTorch<\/a><ul><li><a href=\"#h-1-2\" >1-2 \u0648\u0631\u0648\u062f\u06cc \u0648 \u062e\u0631\u0648\u062c\u06cc<\/a><\/li><li><a href=\"#h-2-2\" >\u06f2-\u06f2 \u0645\u062f\u0644 \u0627\u0632 \u0642\u0628\u0644 \u0622\u0645\u0648\u0632\u0634 \u062f\u06cc\u062f\u0647<\/a><\/li><li><a href=\"#h-3-2\" >\u06f3-\u06f2 \u067e\u06cc\u0634 \u0628\u06cc\u0646\u06cc \u0645\u062f\u0644<\/a><\/li><li><a href=\"#h-4-2\" >\u06f4-\u06f2 \u062e\u0637 \u0644\u0648\u0644\u0647 \u0628\u0631\u0627\u06cc \u0646\u0627\u062d\u06cc\u0647 \u0628\u0646\u062f\u06cc \u0645\u0639\u0646\u0627\u06cc\u06cc<\/a><\/li><li><a href=\"#h-5-2\" >\u06f5-\u06f2 \u0627\u0633\u062a\u0646\u0628\u0627\u0637<\/a><\/li><\/ul><\/li><li><a href=\"#h-3-faster-r-cnn-mask-r-cnn\" >\u06f3- \u0639\u0645\u0644\u06a9\u0631\u062f Faster R-CNN \u062f\u0631 \u0645\u0642\u0627\u0628\u0644 Mask R-CNN<\/a><ul><li><a href=\"#h-1-3-cpu-gpu\" >1-3 \u0645\u0642\u0627\u06cc\u0633\u0647 \u0632\u0645\u0627\u0646 \u0627\u0633\u062a\u0646\u0628\u0627\u0637 \u0645\u062f\u0644 \u062f\u0631 CPU \u0648 GPU<\/a><\/li><li><a href=\"#h-2-3\" >2-3 \u0627\u0644\u0632\u0627\u0645\u0627\u062a \u062d\u0627\u0641\u0638\u0647 \u0645\u062f\u0644 \u0647\u0627<\/a><\/li><\/ul><\/li><\/nav><\/ul><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-1\"><span class=\"ez-toc-section\" id=\"%DB%B1-_%D9%86%D8%A7%D8%AD%DB%8C%D9%87_%D8%A8%D9%86%D8%AF%DB%8C_%D9%85%D8%B9%D9%86%D8%A7%DB%8C%DB%8C_%D8%8C_%D8%AA%D8%B4%D8%AE%DB%8C%D8%B5_%D8%A7%D8%B4%DB%8C%D8%A7_%D9%88_%D9%86%D8%A7%D8%AD%DB%8C%D9%87_%D8%A8%D9%86%D8%AF%DB%8C_%D9%86%D9%85%D9%88%D9%86%D9%87\"><\/span><strong>\u06f1- \u0646\u0627\u062d\u06cc\u0647 \u0628\u0646\u062f\u06cc \u0645\u0639\u0646\u0627\u06cc\u06cc \u060c \u062a\u0634\u062e\u06cc\u0635 \u0627\u0634\u06cc\u0627 \u0648 \u0646\u0627\u062d\u06cc\u0647 \u0628\u0646\u062f\u06cc \u0646\u0645\u0648\u0646\u0647<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n<p style=\"text-align: justify;\">\u0645\u0627 \u062a\u0627\u06a9\u0646\u0648\u0646 \u062f\u0631 \u0642\u0633\u0645\u062a \u0647\u0627\u06cc \u067e\u06cc\u0634\u06cc\u0646 \u0627\u06cc\u0646 \u0645\u062c\u0645\u0648\u0639\u0647 \u0622\u0645\u0648\u0632\u0634\u06cc \u060c \u0628\u0647 \u0645\u0648\u0627\u0631\u062f \u0632\u06cc\u0631 \u067e\u0631\u062f\u0627\u062e\u062a\u06cc\u0645 :<\/p>\n<ol style=\"text-align: justify;\">\n<li><a href=\"https:\/\/shahaab-co.com\/mag\/edu\/deep-learning\/pytorch-for-beginners-semantic-segmentation-using-torchvision\/\" target=\"_blank\" rel=\"noopener\"><strong>\u0646\u0627\u062d\u06cc\u0647 \u0628\u0646\u062f\u06cc \u0645\u0639\u0646\u0627\u06cc\u06cc<\/strong><\/a> : \u062f\u0631 \u0646\u0627\u062d\u06cc\u0647 \u0628\u0646\u062f\u06cc \u0645\u0639\u0646\u0627\u06cc\u06cc \u060c \u0628\u0647 \u0647\u0631 \u067e\u06cc\u06a9\u0633\u0644 \u062a\u0635\u0648\u06cc\u0631 \u06cc\u06a9 \u0628\u0631\u0686\u0633\u0628 \u06a9\u0644\u0627\u0633 \u0627\u062e\u062a\u0635\u0627\u0635 \u0645\u06cc \u062f\u0647\u06cc\u0645 ( \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0645\u062b\u0627\u0644 \u0633\u06af \u060c \u06af\u0631\u0628\u0647 \u060c \u0634\u062e\u0635 \u060c \u067e\u0633 \u0632\u0645\u06cc\u0646\u0647 \u0648 &#8230;).<\/li>\n<li><a href=\"https:\/\/shahaab-co.com\/mag\/edu\/deep-learning\/faster-r-cnn-object-detection-with-pytorch\/\" target=\"_blank\" rel=\"noopener\"><strong>\u062a\u0634\u062e\u06cc\u0635 \u0627\u0634\u06cc\u0627<\/strong><\/a> : \u062f\u0631 \u062a\u0634\u062e\u06cc\u0635 \u0634\u06cc \u060c \u0645\u0627 \u06cc\u06a9 \u0628\u0631\u0686\u0633\u0628 \u06a9\u0644\u0627\u0633 \u0631\u0627 \u0628\u0647 \u06a9\u0627\u062f\u0631\u0647\u0627\u06cc \u0645\u062d\u0635\u0648\u0631\u06a9\u0646\u0646\u062f\u0647 \u0627\u06cc \u06a9\u0647 \u062d\u0627\u0648\u06cc \u0627\u0634\u06cc\u0627 \u0647\u0633\u062a\u0646\u062f \u0627\u062e\u062a\u0635\u0627\u0635 \u0645\u06cc \u062f\u0647\u06cc\u0645.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">\u06cc\u06a9 \u0627\u06cc\u062f\u0647 \u0628\u0633\u06cc\u0627\u0631 \u0633\u0627\u062f\u0647 \u0645\u06cc \u062a\u0648\u0627\u0646\u062f \u062a\u0631\u06a9\u06cc\u0628 \u0627\u06cc\u0646 \u062f\u0648 \u0628\u0627 \u0647\u0645 \u0628\u0627\u0634\u062f. \u0645\u0627 \u0642\u0635\u062f \u062f\u0627\u0631\u06cc\u0645 \u0641\u0642\u0637 \u06cc\u06a9 \u06a9\u0627\u062f\u0631 \u0645\u062d\u0635\u0648\u0631\u06a9\u0646\u0646\u062f\u0647 \u062d\u0648\u0644 \u06cc\u06a9 \u0634\u06cc \u0631\u0627 \u0634\u0646\u0627\u0633\u0627\u06cc\u06cc \u06a9\u0646\u06cc\u0645 \u0648 \u0628\u0628\u06cc\u0646\u06cc\u0645 \u06a9\u062f\u0627\u0645 \u06cc\u06a9 \u0627\u0632 \u067e\u06cc\u06a9\u0633\u0644 \u0647\u0627\u06cc \u062f\u0631\u0648\u0646 \u06a9\u0627\u062f\u0631 \u0645\u062a\u0639\u0644\u0642 \u0628\u0647 \u0622\u0646 \u0634\u06cc \u0627\u0633\u062a. \u0628\u0647 \u0639\u0628\u0627\u0631\u062a \u062f\u06cc\u06af\u0631 \u060c \u0645\u0627 \u06cc\u06a9 \u0645\u0627\u0633\u06a9 \u0645\u06cc \u062e\u0648\u0627\u0647\u06cc\u0645 \u06a9\u0647 ( \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0645\u0642\u0627\u062f\u06cc\u0631 \u0631\u0646\u06af\u06cc \u06cc\u0627 \u0645\u0642\u06cc\u0627\u0633 \u062e\u0627\u06a9\u0633\u062a\u0631\u06cc ) \u0646\u0634\u0627\u0646 \u062f\u0647\u062f \u06a9\u062f\u0627\u0645 \u067e\u06cc\u06a9\u0633\u0644 \u0647\u0627 \u0645\u062a\u0639\u0644\u0642 \u0628\u0647 \u06cc\u06a9 \u0634\u06cc \u0647\u0633\u062a\u0646\u062f. \u062f\u0631 \u0627\u062f\u0627\u0645\u0647 \u0628\u0647 \u0630\u06a9\u0631 \u06cc\u06a9 \u0645\u062b\u0627\u0644 \u0645\u06cc \u067e\u0631\u062f\u0627\u0632\u06cc\u0645.<\/p>\n<p style=\"text-align: justify;\">\u0628\u0647 \u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645 \u0647\u0627\u06cc\u06cc \u06a9\u0647 \u0645\u0627\u0633\u06a9 \u0641\u0648\u0642 \u0631\u0627 \u062a\u0648\u0644\u06cc\u062f \u0645\u06cc \u06a9\u0646\u0646\u062f \u060c \u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645 \u0647\u0627\u06cc \u0646\u0627\u062d\u06cc\u0647 \u0628\u0646\u062f\u06cc \u0646\u0645\u0648\u0646\u0647 ( <strong>Instance Segmentation <\/strong>) \u06af\u0641\u062a\u0647 \u0645\u06cc \u0634\u0648\u062f \u0648 Mask R-CNN \u06cc\u06a9\u06cc \u0627\u0632 \u0627\u06cc\u0646 \u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645 \u0647\u0627\u0633\u062a.<\/p>\n<p style=\"text-align: justify;\">\u0646\u0627\u062d\u06cc\u0647 \u0628\u0646\u062f\u06cc \u0646\u0645\u0648\u0646\u0647 \u0648 \u0646\u0627\u062d\u06cc\u0647 \u0628\u0646\u062f\u06cc \u0645\u0639\u0646\u0627\u06cc\u06cc \u0627\u0632 \u062f\u0648 \u062c\u0647\u062a \u0645\u062a\u0641\u0627\u0648\u062a \u0647\u0633\u062a\u0646\u062f :<\/p>\n<ol style=\"text-align: justify;\">\n<li>\u062f\u0631 \u0646\u0627\u062d\u06cc\u0647 \u0628\u0646\u062f\u06cc \u0645\u0639\u0646\u0627\u06cc\u06cc \u060c \u0628\u0647 \u0647\u0631 \u067e\u06cc\u06a9\u0633\u0644 \u06cc\u06a9 \u0628\u0631\u0686\u0633\u0628 \u06a9\u0644\u0627\u0633 \u0627\u062e\u062a\u0635\u0627\u0635 \u062f\u0627\u062f\u0647 \u0645\u06cc \u0634\u0648\u062f \u060c \u062f\u0631 \u062d\u0627\u0644\u06cc \u06a9\u0647 \u0646\u0627\u062d\u06cc\u0647 \u0628\u0646\u062f\u06cc \u0646\u0645\u0648\u0646\u0647 \u0686\u0646\u06cc\u0646 \u0646\u06cc\u0633\u062a.<\/li>\n<li>\u0645\u0627 \u0646\u0645\u0648\u0646\u0647 \u0647\u0627\u06cc \u06cc\u06a9 \u06a9\u0644\u0627\u0633 \u0631\u0627 \u062f\u0631 \u0646\u0627\u062d\u06cc\u0647 \u0628\u0646\u062f\u06cc \u0645\u0639\u0646\u0627\u06cc\u06cc \u062c\u062f\u0627 \u0627\u0632 \u0647\u0645 \u062f\u0631\u0646\u0638\u0631 \u0646\u0645\u06cc \u06af\u06cc\u0631\u06cc\u0645. \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0645\u062b\u0627\u0644 \u060c \u0628\u0647 \u062a\u0645\u0627\u0645 \u067e\u06cc\u06a9\u0633\u0644 \u0647\u0627\u06cc \u0645\u0631\u0628\u0648\u0637 \u0628\u0647 \u06a9\u0644\u0627\u0633 &#8220;\u0634\u062e\u0635&#8221; \u062f\u0631 \u0646\u0627\u062d\u06cc\u0647 \u0628\u0646\u062f\u06cc \u0645\u0639\u0646\u0627\u06cc\u06cc \u060c \u0645\u0642\u062f\u0627\u0631 \u0631\u0648\u0634\u0646\u0627\u06cc\u06cc \u06cc\u0627 \u0631\u0646\u06af \u06cc\u06a9\u0633\u0627\u0646 \u062f\u0631 \u0645\u0627\u0633\u06a9 \u0627\u062e\u062a\u0635\u0627\u0635 \u0645\u06cc \u06cc\u0627\u0628\u062f. \u062f\u0631 \u0646\u0627\u062d\u06cc\u0647 \u0628\u0646\u062f\u06cc \u0646\u0645\u0648\u0646\u0647 \u060c \u0645\u0642\u0627\u062f\u06cc\u0631 \u0645\u062e\u062a\u0644\u0641\u06cc \u0628\u0647 \u0622\u0646 \u0647\u0627 \u0627\u062e\u062a\u0635\u0627\u0635 \u062f\u0627\u062f\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a \u0648 \u0645\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u0645 \u0628\u06af\u0648\u06cc\u06cc\u0645 \u06a9\u062f\u0627\u0645 \u067e\u06cc\u06a9\u0633\u0644 \u0647\u0627 \u0645\u0631\u0628\u0648\u0637 \u0628\u0647 \u06a9\u062f\u0627\u0645 \u0634\u062e\u0635 \u0647\u0633\u062a\u0646\u062f.\u00a0<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">\u00a0<\/p>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-1-1-mask-r-cnn\"><span class=\"ez-toc-section\" id=\"%DB%B1-%DB%B1_%D9%85%D8%B9%D9%85%D8%A7%D8%B1%DB%8C_Mask_R-CNN\"><\/span><strong>\u06f1-\u06f1 \u0645\u0639\u0645\u0627\u0631\u06cc Mask R-CNN<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n<p style=\"text-align: justify;\">\u0645\u0639\u0645\u0627\u0631\u06cc Mask R-CNN \u06cc\u06a9 \u0645\u062f\u0644 \u062a\u0639\u0645\u06cc\u0645 \u06cc\u0627\u0641\u062a\u0647 \u0627\u0632 Faster R-CNN \u0627\u0633\u062a \u06a9\u0647 \u0645\u0627 \u062f\u0631 <a href=\"https:\/\/shahaab-co.com\/mag\/edu\/deep-learning\/faster-r-cnn-object-detection-with-pytorch\/\" target=\"_blank\" rel=\"noopener\">\u067e\u0633\u062a \u0642\u0628\u0644\u06cc<\/a> \u0628\u0647 \u0622\u0646 \u0627\u0634\u0627\u0631\u0647 \u06a9\u0631\u062f\u06cc\u0645. \u062c\u0647\u062a \u06cc\u0627\u062f\u0622\u0648\u0631\u06cc \u0645\u0639\u0645\u0627\u0631\u06cc Faster R-CNN \u0628\u0647 \u0634\u0631\u062d \u0632\u06cc\u0631 \u0628\u0648\u062f :<\/p>\n<ol style=\"text-align: justify;\">\n<li><strong>\u0644\u0627\u06cc\u0647 \u0647\u0627\u06cc \u06a9\u0627\u0646\u0648\u0644\u0648\u0634\u0646\u06cc<\/strong> : \u062a\u0635\u0648\u06cc\u0631 \u0648\u0631\u0648\u062f\u06cc \u0627\u0632 \u0686\u0646\u062f\u06cc\u0646 \u0644\u0627\u06cc\u0647 \u06a9\u0627\u0646\u0648\u0644\u0648\u0634\u0646 \u0639\u0628\u0648\u0631 \u062f\u0627\u062f\u0647 \u0645\u06cc \u0634\u0648\u062f \u062a\u0627 \u06cc\u06a9 \u0646\u0642\u0634\u0647 \u0648\u06cc\u0698\u06af\u06cc \u0627\u0633\u062a\u062e\u0631\u0627\u062c \u0634\u0648\u062f. \u0627\u06af\u0631 \u0645\u0628\u062a\u062f\u06cc \u0647\u0633\u062a\u06cc\u062f \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0641\u0639\u0644\u0627 \u0644\u0627\u06cc\u0647 \u0647\u0627\u06cc \u06a9\u0627\u0646\u0648\u0644\u0648\u0634\u0646\u06cc \u0631\u0627 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u06cc\u06a9 \u062c\u0639\u0628\u0647 \u0633\u06cc\u0627\u0647 \u062a\u0635\u0648\u0631 \u06a9\u0646\u06cc\u062f \u06a9\u0647 \u06cc\u06a9 \u062a\u0635\u0648\u06cc\u0631 \u0648\u0631\u0648\u062f\u06cc \u06f3 \u06a9\u0627\u0646\u0627\u0644\u0647 \u062f\u0631\u06cc\u0627\u0641\u062a \u0645\u06cc \u06a9\u0646\u062f \u0648 \u06cc\u06a9 &#8221; \u062a\u0635\u0648\u06cc\u0631 &#8221; \u0628\u0627 \u0627\u0628\u0639\u0627\u062f \u0645\u06a9\u0627\u0646\u06cc \u0628\u0633\u06cc\u0627\u0631 \u06a9\u0648\u0686\u06a9\u062a\u0631 (\u06f7&#215;\u06f7) \u060c \u0627\u0645\u0627 \u062a\u0639\u062f\u0627\u062f \u06a9\u0627\u0646\u0627\u0644 \u0647\u0627\u06cc \u0628\u06cc\u0634\u062a\u0631 (\u06f5\u06f1\u06f2) \u062a\u0648\u0644\u06cc\u062f \u0645\u06cc \u06a9\u0646\u062f.<\/li>\n<li><strong>\u0634\u0628\u06a9\u0647 \u067e\u06cc\u0634\u0646\u0647\u0627\u062f \u0646\u0627\u062d\u06cc\u0647 <\/strong><strong>(RPN)<\/strong> : \u0627\u0632 \u062e\u0631\u0648\u062c\u06cc \u0644\u0627\u06cc\u0647 \u0647\u0627\u06cc \u06a9\u0627\u0646\u0648\u0644\u0648\u0634\u0646\u06cc \u0628\u0631\u0627\u06cc \u0622\u0645\u0648\u0632\u0634 \u0634\u0628\u06a9\u0647 \u0627\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u0634\u0648\u062f \u06a9\u0647 \u0646\u0648\u0627\u062d\u06cc \u0627\u0634\u06cc\u0627 \u0645\u062d\u0635\u0648\u0631 \u0631\u0627 \u067e\u06cc\u0634\u0646\u0647\u0627\u062f \u0645\u06cc \u06a9\u0646\u062f.<\/li>\n<li><strong>\u06a9\u0644\u0627\u0633\u0647 \u0628\u0646\u062f<\/strong> : \u0627\u0632 \u0647\u0645\u0627\u0646 \u0646\u0642\u0634\u0647 \u0648\u06cc\u0698\u06af\u06cc \u0628\u0631\u0627\u06cc \u0622\u0645\u0648\u0632\u0634 \u06a9\u0644\u0627\u0633\u0647 \u0628\u0646\u062f\u06cc \u06a9\u0647 \u06cc\u06a9 \u0628\u0631\u0686\u0633\u0628 \u0631\u0627 \u0628\u0647 \u0634\u06cc \u062f\u0631\u0648\u0646 \u06a9\u0627\u062f\u0631 \u0627\u062e\u062a\u0635\u0627\u0635 \u0645\u06cc \u062f\u0647\u062f \u0646\u06cc\u0632 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u0634\u0648\u062f.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">\u0647\u0645\u0686\u0646\u06cc\u0646 \u060c \u0628\u0647 \u062e\u0627\u0637\u0631 \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u06cc\u062f \u06a9\u0647 Faster R-CNN \u0633\u0631\u06cc\u0639\u062a\u0631 \u0627\u0632 Fast R-CNN \u0628\u0648\u062f \u060c \u0632\u06cc\u0631\u0627 \u0646\u0642\u0634\u0647 \u0648\u06cc\u0698\u06af\u06cc \u06cc\u06a9 \u0628\u0627\u0631 \u0645\u062d\u0627\u0633\u0628\u0647 \u0645\u06cc \u0634\u062f \u0648 \u062a\u0648\u0633\u0637 RPN \u0648 \u06a9\u0644\u0627\u0633\u0647 \u0628\u0646\u062f\u06cc \u0645\u062c\u062f\u062f\u0627\u064b \u0645\u0648\u0631\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0642\u0631\u0627\u0631 \u0645\u06cc \u06af\u0631\u0641\u062a.<\/p>\n<p style=\"text-align: justify;\">Mask R-CNN \u0627\u06cc\u0646 \u0627\u06cc\u062f\u0647 \u0631\u0627 \u06cc\u06a9 \u06af\u0627\u0645 \u0641\u0631\u0627\u062a\u0631 \u0645\u06cc \u0628\u0631\u062f. \u0639\u0644\u0627\u0648\u0647 \u0628\u0631 \u0627\u0631\u0633\u0627\u0644 \u0646\u0642\u0634\u0647 \u0648\u06cc\u0698\u06af\u06cc \u0628\u0647 RPN \u0648 \u06a9\u0644\u0627\u0633\u0647 \u0628\u0646\u062f \u060c \u0627\u0632 \u0622\u0646 \u0628\u0631\u0627\u06cc \u067e\u06cc\u0634 \u0628\u06cc\u0646\u06cc \u06cc\u06a9 \u0645\u0627\u0633\u06a9 \u0628\u0627\u06cc\u0646\u0631\u06cc \u0628\u0631\u0627\u06cc \u0634\u06cc \u062f\u0631\u0648\u0646 \u06a9\u0627\u062f\u0631 \u0645\u062d\u0635\u0648\u0631 \u06a9\u0646\u0646\u062f\u0647 \u0646\u06cc\u0632 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u062f.<\/p>\n<p style=\"text-align: justify;\">\u06cc\u06a9\u06cc \u0627\u0632 \u0631\u0627\u0647 \u0647\u0627\u06cc \u0645\u0634\u0627\u0647\u062f\u0647 \u0642\u0633\u0645\u062a \u067e\u06cc\u0634 \u0628\u06cc\u0646\u06cc \u0645\u0627\u0633\u06a9 Mask R-CNN \u060c \u06cc\u06a9 <strong><a href=\"https:\/\/people.eecs.berkeley.edu\/~jonlong\/long_shelhamer_fcn.pdf\" target=\"_blank\" rel=\"noopener\">\u0634\u0628\u06a9\u0647 \u062a\u0645\u0627\u0645 \u06a9\u0627\u0646\u0648\u0644\u0648\u0634\u0646\u06cc<\/a> (FCN)<\/strong> \u0627\u0633\u062a \u06a9\u0647 \u0628\u0631\u0627\u06cc \u0646\u0627\u062d\u06cc\u0647 \u0628\u0646\u062f\u06cc \u0645\u0639\u0646\u0627\u06cc\u06cc \u0645\u0648\u0631\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0642\u0631\u0627\u0631 \u06af\u06cc\u0631\u062f. \u062a\u0646\u0647\u0627 \u062a\u0641\u0627\u0648\u062a \u0627\u06cc\u0646 \u0627\u0633\u062a \u06a9\u0647 FCN \u0631\u0648\u06cc \u06a9\u0627\u062f\u0631 \u0647\u0627\u06cc \u0645\u062d\u0635\u0648\u0631 \u06a9\u0646\u0646\u062f\u0647 \u0627\u0639\u0645\u0627\u0644 \u0645\u06cc \u0634\u0648\u062f\u060c \u0648 \u0644\u0627\u06cc\u0647 \u06a9\u0627\u0646\u0648\u0644\u0648\u0634\u0646\u06cc \u0647\u0645 \u062f\u0631 RPN \u0648 \u0647\u0645 \u062f\u0631 \u06a9\u0644\u0627\u0633\u0647 \u0628\u0646\u062f \u0628\u06a9\u0627\u0631 \u06af\u0631\u0641\u062a\u0647 \u0645\u06cc \u0634\u0648\u062f.<\/p>\n<p style=\"text-align: justify;\">\u0634\u06a9\u0644 \u0632\u06cc\u0631 \u06cc\u06a9 \u0645\u0639\u0645\u0627\u0631\u06cc \u0633\u0637\u062d \u0628\u0627\u0644\u0627 \u0631\u0627 \u0646\u0634\u0627\u0646 \u0645\u06cc \u062f\u0647\u062f.<\/p>\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"768\" height=\"358\" src=\"https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/05\/\u0645\u0639\u0645\u0627\u0631\u06cc-\u0634\u0628\u06a9\u0647-Mask-RCNN.jpg\" alt=\"\u0645\u0639\u0645\u0627\u0631\u06cc \u0634\u0628\u06a9\u0647 Mask RCNN\" class=\"wp-image-11730\" title=\"\" srcset=\"https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/05\/\u0645\u0639\u0645\u0627\u0631\u06cc-\u0634\u0628\u06a9\u0647-Mask-RCNN.jpg 768w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/05\/\u0645\u0639\u0645\u0627\u0631\u06cc-\u0634\u0628\u06a9\u0647-Mask-RCNN-300x140.jpg 300w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><figcaption>\u0645\u0639\u0645\u0627\u0631\u06cc \u0634\u0628\u06a9\u0647 Mask RCNN<\/figcaption><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-2-mask-r-cnn-pytorch\"><span class=\"ez-toc-section\" id=\"%DB%B2-_%DA%A9%D8%AF_%D9%86%D9%88%DB%8C%D8%B3%DB%8C_Mask_R-CNN_%D8%A8%D8%A7_PyTorch\"><\/span><strong>\u06f2- \u06a9\u062f \u0646\u0648\u06cc\u0633\u06cc Mask R-CNN \u0628\u0627 PyTorch<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n<p style=\"text-align: justify\">\u062f\u0631 \u0627\u06cc\u0646 \u0628\u062e\u0634 \u060c \u062e\u0648\u0627\u0647\u06cc\u0645 \u062f\u06cc\u062f \u06a9\u0647 \u0686\u06af\u0648\u0646\u0647 \u0627\u0632 \u0645\u062f\u0644 \u0622\u0645\u0648\u0632\u0634 \u062f\u06cc\u062f\u0647 Mask R-CNN \u062f\u0631 PyTorch \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u0645.<\/p>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-1-2\"><span class=\"ez-toc-section\" id=\"%DB%B1-%DB%B2_%D9%88%D8%B1%D9%88%D8%AF%DB%8C_%D9%88_%D8%AE%D8%B1%D9%88%D8%AC%DB%8C\"><\/span><strong>\u06f1-\u06f2 \u0648\u0631\u0648\u062f\u06cc \u0648 \u062e\u0631\u0648\u062c\u06cc<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n<p style=\"text-align: justify\">\u0627\u06cc\u0646 \u0645\u062f\u0644 \u0644\u06cc\u0633\u062a\u06cc \u0627\u0632 \u062a\u0635\u0627\u0648\u06cc\u0631 \u062a\u0646\u0633\u0648\u0631 \u0628\u0647 \u0634\u06a9\u0644(n , c, h, w) &nbsp;\u0628\u0627 \u0645\u0642\u0627\u062f\u06cc\u0631 \u062f\u0631 \u0645\u062d\u062f\u0648\u062f\u0647 \u06f0-\u06f1 \u0631\u0627&nbsp; \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0648\u0631\u0648\u062f\u06cc \u0645\u06cc \u06af\u06cc\u0631\u062f \u0648 \u0644\u0632\u0648\u0645\u06cc \u0646\u062f\u0627\u0631\u062f \u06a9\u0647 \u0627\u0646\u062f\u0627\u0632\u0647 \u062a\u0635\u0648\u06cc\u0631 \u062b\u0627\u0628\u062a \u0628\u0627\u0634\u062f.<\/p>\n<ul style=\"text-align: justify\">\n<li>n : \u062a\u0639\u062f\u0627\u062f \u062a\u0635\u0627\u0648\u06cc\u0631<\/li>\n<li>c : \u062a\u0639\u062f\u0627\u062f \u06a9\u0627\u0646\u0627\u0644 \u0647\u0627 ( \u0628\u0631\u0627\u06cc \u062a\u0635\u0627\u0648\u06cc\u0631 RGB \u0628\u0631\u0627\u0628\u0631 \u06f3 \u0627\u0633\u062a )<\/li>\n<li>h : \u0637\u0648\u0644 \u062a\u0635\u0648\u06cc\u0631<\/li>\n<li>w : \u0639\u0631\u0636 \u062a\u0635\u0648\u06cc\u0631<\/li>\n<\/ul>\n<p style=\"text-align: justify\">\u062e\u0631\u0648\u062c\u06cc \u0645\u062f\u0644 \u0628\u0647 \u0634\u0631\u062d \u0632\u06cc\u0631 \u0627\u0633\u062a :<\/p>\n<ul>\n<li style=\"text-align: justify\">\u0645\u062e\u062a\u0635\u0627\u062a \u06a9\u0627\u062f\u0631 \u0647\u0627\u06cc \u0645\u062d\u0635\u0648\u0631 \u06a9\u0646\u0646\u062f\u0647<\/li>\n<li style=\"text-align: justify\">\u0628\u0631\u0686\u0633\u0628 \u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc\u06cc \u06a9\u0647 \u0645\u062f\u0644 \u062f\u0631 \u062a\u0635\u0648\u06cc\u0631 \u0648\u0631\u0648\u062f\u06cc \u067e\u06cc\u0634 \u0628\u06cc\u0646\u06cc \u0645\u06cc \u06a9\u0646\u062f\u060c \u0627\u0645\u062a\u06cc\u0627\u0632 \u0628\u0631\u0686\u0633\u0628 \u0647\u0627<\/li>\n<li style=\"text-align: justify\">\u0645\u0627\u0633\u06a9 \u0647\u0627\u06cc \u0645\u0631\u0628\u0648\u0637 \u0628\u0647 \u0647\u0631 \u06a9\u0644\u0627\u0633 \u0645\u0648\u062c\u0648\u062f \u062f\u0631 \u0628\u0631\u0686\u0633\u0628 \u0647\u0627<\/li>\n<\/ul>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-2-2\"><span class=\"ez-toc-section\" id=\"%DB%B2-%DB%B2_%D9%85%D8%AF%D9%84_%D8%A7%D8%B2_%D9%82%D8%A8%D9%84_%D8%A2%D9%85%D9%88%D8%B2%D8%B4_%D8%AF%DB%8C%D8%AF%D9%87\"><\/span><strong>\u06f2-\u06f2 \u0645\u062f\u0644 \u0627\u0632 \u0642\u0628\u0644 \u0622\u0645\u0648\u0632\u0634 \u062f\u06cc\u062f\u0647<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">model = torchvision.models.detection.maskrcnn_resnet50_fpn(pretrained=True)\nmodel.eval()<\/pre>\n<p style=\"text-align: justify\">\u0644\u06cc\u0633\u062a \u0628\u0631\u0686\u0633\u0628 \u0647\u0627 \u0628\u0631\u0627\u06cc \u0646\u0627\u062d\u06cc\u0647 \u0628\u0646\u062f\u06cc \u0645\u0627\u0646\u0646\u062f \u0647\u0645\u0627\u0646 \u06a9\u0627\u0631 \u062a\u0634\u062e\u06cc\u0635 \u0634\u06cc \u0645\u06cc \u0628\u0627\u0634\u062f.<\/p>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-3-2\"><span class=\"ez-toc-section\" id=\"%DB%B3-%DB%B2_%D9%BE%DB%8C%D8%B4_%D8%A8%DB%8C%D9%86%DB%8C_%D9%85%D8%AF%D9%84\"><\/span><strong>\u06f3-\u06f2 \u067e\u06cc\u0634 \u0628\u06cc\u0646\u06cc \u0645\u062f\u0644<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">COCO_INSTANCE_CATEGORY_NAMES = [\n    '__background__', 'person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus',\n    'train', 'truck', 'boat', 'traffic light', 'fire hydrant', 'N\/A', 'stop sign',\n    'parking meter', 'bench', 'bird', 'cat', 'dog', 'horse', 'sheep', 'cow',\n    'elephant', 'bear', 'zebra', 'giraffe', 'N\/A', 'backpack', 'umbrella', 'N\/A', 'N\/A',\n    'handbag', 'tie', 'suitcase', 'frisbee', 'skis', 'snowboard', 'sports ball',\n    'kite', 'baseball bat', 'baseball glove', 'skateboard', 'surfboard', 'tennis racket',\n    'bottle', 'N\/A', 'wine glass', 'cup', 'fork', 'knife', 'spoon', 'bowl',\n    'banana', 'apple', 'sandwich', 'orange', 'broccoli', 'carrot', 'hot dog', 'pizza',\n    'donut', 'cake', 'chair', 'couch', 'potted plant', 'bed', 'N\/A', 'dining table',\n    'N\/A', 'N\/A', 'toilet', 'N\/A', 'tv', 'laptop', 'mouse', 'remote', 'keyboard', 'cell phone',\n    'microwave', 'oven', 'toaster', 'sink', 'refrigerator', 'N\/A', 'book',\n    'clock', 'vase', 'scissors', 'teddy bear', 'hair drier', 'toothbrush'\n]\n\ndef get_prediction(img_path, threshold):\n  img = Image.open(img_path)\n  transform = T.Compose([T.ToTensor()])\n  img = transform(img)\n  pred = model([img])\n  pred_score = list(pred[0]['scores'].detach().numpy())\n  pred_t = [pred_score.index(x) for x in pred_score if x&gt;threshold][-1]\n  masks = (pred[0]['masks']&gt;0.5).squeeze().detach().cpu().numpy()\n  pred_class = [COCO_INSTANCE_CATEGORY_NAMES[i] for i in list(pred[0]['labels'].numpy())]\n  pred_boxes = [[(i[0], i[1]), (i[2], i[3])] for i in list(pred[0]['boxes'].detach().numpy())]\n  masks = masks[:pred_t+1]\n  pred_boxes = pred_boxes[:pred_t+1]\n  pred_class = pred_class[:pred_t+1]\n  return masks, pred_boxes, pred_class<\/pre>\n<ul style=\"text-align: justify\">\n<li>\u062a\u0635\u0648\u06cc\u0631 \u0627\u0632 \u0645\u0633\u06cc\u0631 \u062f\u0627\u062f\u0647 \u0634\u062f\u0647 \u0628\u062f\u0633\u062a \u0645\u06cc \u0622\u06cc\u062f<\/li>\n<li>\u062a\u0635\u0648\u06cc\u0631 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062a\u0628\u062f\u06cc\u0644\u0627\u062a PyTorch \u0628\u0647 \u062a\u0646\u0633\u0648\u0631 \u062a\u0635\u0648\u06cc\u0631 \u062a\u0628\u062f\u06cc\u0644 \u0645\u06cc \u0634\u0648\u062f<\/li>\n<li>\u062a\u0635\u0648\u06cc\u0631 \u0628\u0631\u0627\u06cc \u0628\u062f\u0633\u062a \u0622\u0648\u0631\u062f\u0646 \u067e\u06cc\u0634 \u0628\u06cc\u0646\u06cc \u0647\u0627 \u0648\u0627\u0631\u062f \u0645\u062f\u0644 \u0645\u0627 \u0645\u06cc \u0634\u0648\u062f<\/li>\n<li>\u0645\u0627\u0633\u06a9 \u0647\u0627 \u060c \u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc \u067e\u06cc\u0634 \u0628\u06cc\u0646\u06cc \u0648 \u0645\u062e\u062a\u0635\u0627\u062a \u06a9\u0627\u062f\u0631 \u0645\u062d\u0635\u0648\u0631\u06a9\u0646\u0646\u062f\u0647 \u0627\u0632 \u0645\u062f\u0644 \u0628\u062f\u0633\u062a \u0645\u06cc \u0622\u06cc\u0646\u062f \u0648 \u0645\u0627\u0633\u06a9 \u0647\u0627\u06cc \u0628\u0627\u06cc\u0646\u0631\u06cc \u0633\u0627\u062e\u062a\u0647 \u0645\u06cc \u0634\u0648\u0646\u062f (\u06f0 \u06cc\u0627 \u06f1). \u0645\u062b\u0627\u0644 : \u0646\u0627\u062d\u06cc\u0647 \u06af\u0631\u0628\u0647 \u06f1 \u0648 \u0628\u0642\u06cc\u0647 \u062a\u0635\u0648\u06cc\u0631 \u06f0 \u0647\u0633\u062a\u0646\u062f.<\/li>\n<\/ul>\n<p style=\"text-align: justify\">\u0628\u0647 \u0645\u0627\u0633\u06a9 \u0647\u0631 \u0634\u06cc \u067e\u06cc\u0634 \u0628\u06cc\u0646\u06cc \u0634\u062f\u0647 \u060c \u0627\u0632 \u0628\u06cc\u0646 \u06f1\u06f1 \u0631\u0646\u06af \u062a\u0639\u06cc\u06cc\u0646 \u0634\u062f\u0647 \u060c \u06cc\u06a9 \u0631\u0646\u06af \u062a\u0635\u0627\u062f\u0641\u06cc \u0627\u062e\u062a\u0635\u0627\u0635 \u062f\u0627\u062f\u0647 \u0645\u06cc \u0634\u0648\u062f.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">def random_colour_masks(image):\n  colours = [[0, 255, 0],[0, 0, 255],[255, 0, 0],[0, 255, 255],[255, 255, 0],[255, 0, 255],[80, 70, 180],[250, 80, 190],[245, 145, 50],[70, 150, 250],[50, 190, 190]]\n  r = np.zeros_like(image).astype(np.uint8)\n  g = np.zeros_like(image).astype(np.uint8)\n  b = np.zeros_like(image).astype(np.uint8)\n  r[image == 1], g[image == 1], b[image == 1] = colours[random.randrange(0,10)]\n  coloured_mask = np.stack([r, g, b], axis=2)\n  return coloured_mask<\/pre>\n<p><\/p>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-4-2\"><span class=\"ez-toc-section\" id=\"%DB%B4-%DB%B2_%D8%AE%D8%B7_%D9%84%D9%88%D9%84%D9%87_%D8%A8%D8%B1%D8%A7%DB%8C_%D9%86%D8%A7%D8%AD%DB%8C%D9%87_%D8%A8%D9%86%D8%AF%DB%8C_%D9%85%D8%B9%D9%86%D8%A7%DB%8C%DB%8C\"><\/span><strong>\u06f4-\u06f2 \u062e\u0637 \u0644\u0648\u0644\u0647 \u0628\u0631\u0627\u06cc \u0646\u0627\u062d\u06cc\u0647 \u0628\u0646\u062f\u06cc \u0645\u0639\u0646\u0627\u06cc\u06cc<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">def instance_segmentation_api(img_path, threshold=0.5, rect_th=3, text_size=3, text_th=3):\n  masks, boxes, pred_cls = get_prediction(img_path, threshold)\n  img = cv2.imread(img_path)\n  img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)\n  for i in range(len(masks)):\n    rgb_mask = random_colour_masks(masks[i])\n    img = cv2.addWeighted(img, 1, rgb_mask, 0.5, 0)\n    cv2.rectangle(img, boxes[i][0], boxes[i][1],color=(0, 255, 0), thickness=rect_th)\n    cv2.putText(img,pred_cls[i], boxes[i][0], cv2.FONT_HERSHEY_SIMPLEX, text_size, (0,255,0),thickness=text_th)\n  plt.figure(figsize=(20,30))\n  plt.imshow(img)\n  plt.xticks([])\n  plt.yticks([])\n  plt.show()<\/pre>\n<ul>\n<li style=\"text-align: justify\">\u0645\u0627\u0633\u06a9 \u0647\u0627 \u060c \u06a9\u0644\u0627\u0633 \u067e\u06cc\u0634 \u0628\u06cc\u0646\u06cc \u0648 \u06a9\u0627\u062f\u0631 \u0645\u062d\u0635\u0648\u0631\u06a9\u0646\u0646\u062f\u0647 \u0628\u0627 get_prediction \u0628\u062f\u0633\u062a \u0645\u06cc \u0622\u06cc\u0646\u062f.<\/li>\n<li style=\"text-align: justify\">\u0628\u0647 \u0647\u0631 \u0645\u0627\u0633\u06a9 \u06cc\u06a9 \u0631\u0646\u06af \u062a\u0635\u0627\u062f\u0641\u06cc \u0627\u0632 \u0628\u06cc\u0646 \u06f1\u06f1 \u0631\u0646\u06af \u0627\u062e\u062a\u0635\u0627\u0635 \u062f\u0627\u062f\u0647 \u0645\u06cc \u0634\u0648\u062f.<\/li>\n<li style=\"text-align: justify\">\u0647\u0631 \u0645\u0627\u0633\u06a9 \u062f\u0631 \u0646\u0633\u0628\u062a \u06f1:\u06f0\u066b\u06f5 \u0628\u0627 OpenCV \u0628\u0647 \u062a\u0635\u0648\u06cc\u0631 \u0627\u0636\u0627\u0641\u0647 \u0645\u06cc \u0634\u0648\u062f<\/li>\n<li style=\"text-align: justify\">\u06cc\u06a9 \u06a9\u0627\u062f\u0631 \u0645\u062d\u0635\u0648\u0631\u06a9\u0646\u0646\u062f\u0647 \u0628\u0627 rektangle \u0628\u0627 \u0646\u0627\u0645 \u06a9\u0644\u0627\u0633 \u06a9\u0647 \u0628\u0647 \u0635\u0648\u0631\u062a \u062d\u0627\u0634\u06cc\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0645\u062a\u0646\u06cc \u0631\u0648\u06cc \u0622\u0646 \u0631\u0633\u0645 \u0634\u062f\u0647 \u0627\u0633\u062a.<\/li>\n<li style=\"text-align: justify\">\u062e\u0631\u0648\u062c\u06cc \u0646\u0647\u0627\u06cc\u06cc \u0646\u0645\u0627\u06cc\u0634 \u062f\u0627\u062f\u0647 \u0645\u06cc \u0634\u0648\u062f<\/li>\n<\/ul>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-5-2\"><span class=\"ez-toc-section\" id=\"%DB%B5-%DB%B2_%D8%A7%D8%B3%D8%AA%D9%86%D8%A8%D8%A7%D8%B7\"><\/span><strong>\u06f5-\u06f2 \u0627\u0633\u062a\u0646\u0628\u0627\u0637<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n<p style=\"text-align: justify\">\u0645\u062f\u0644 \u0627\u0632 \u0642\u0628\u0644 \u0622\u0645\u0648\u0632\u0634 \u062f\u06cc\u062f\u0647 \u0628\u0631\u0627\u06cc \u0627\u0633\u062a\u0646\u0628\u0627\u0637 \u062f\u0631 CPU \u062d\u062f\u0648\u062f \u06f1\u06f0 \u062b\u0627\u0646\u06cc\u0647 \u0648 \u062f\u0631 GPU NVIDIA GTX 1080 Ti \u062d\u062f\u0648\u062f \u06f0\u066b\u06f2\u06f1 \u062b\u0627\u0646\u06cc\u0647 \u0632\u0645\u0627\u0646 \u0644\u0627\u0632\u0645 \u062f\u0627\u0631\u062f.<\/p>\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"600\" height=\"400\" src=\"https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/05\/\u0646\u0627\u062d\u06cc\u0647-\u0628\u0646\u062f\u06cc-\u0627\u0641\u0631\u0627\u062f-\u062f\u0631-\u062a\u0635\u0648\u06cc\u0631-\u0628\u0627-mask-rcnn.jpg\" alt=\"\u0646\u0627\u062d\u06cc\u0647 \u0628\u0646\u062f\u06cc \u0627\u0641\u0631\u0627\u062f \u062f\u0631 \u062a\u0635\u0648\u06cc\u0631 \u0628\u0627 mask rcnn\" class=\"wp-image-11732\" title=\"\" srcset=\"https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/05\/\u0646\u0627\u062d\u06cc\u0647-\u0628\u0646\u062f\u06cc-\u0627\u0641\u0631\u0627\u062f-\u062f\u0631-\u062a\u0635\u0648\u06cc\u0631-\u0628\u0627-mask-rcnn.jpg 600w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/05\/\u0646\u0627\u062d\u06cc\u0647-\u0628\u0646\u062f\u06cc-\u0627\u0641\u0631\u0627\u062f-\u062f\u0631-\u062a\u0635\u0648\u06cc\u0631-\u0628\u0627-mask-rcnn-300x200.jpg 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"700\" height=\"428\" src=\"https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/05\/\u0646\u0627\u062d\u06cc\u0647-\u0628\u0646\u062f\u06cc-\u062e\u0648\u062f\u0631\u0648-\u0647\u0627-\u0628\u0627-\u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645-Mask-RCNN.jpg\" alt=\"\u0646\u0627\u062d\u06cc\u0647 \u0628\u0646\u062f\u06cc \u062e\u0648\u062f\u0631\u0648 \u0647\u0627 \u0628\u0627 \u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645 Mask RCNN\" class=\"wp-image-11734\" title=\"\" srcset=\"https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/05\/\u0646\u0627\u062d\u06cc\u0647-\u0628\u0646\u062f\u06cc-\u062e\u0648\u062f\u0631\u0648-\u0647\u0627-\u0628\u0627-\u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645-Mask-RCNN.jpg 700w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/05\/\u0646\u0627\u062d\u06cc\u0647-\u0628\u0646\u062f\u06cc-\u062e\u0648\u062f\u0631\u0648-\u0647\u0627-\u0628\u0627-\u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645-Mask-RCNN-300x183.jpg 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/05\/\u0646\u0627\u062d\u06cc\u0647-\u0628\u0646\u062f\u06cc-\u0641\u06cc\u0644-\u0647\u0627-\u062f\u0631-\u062a\u0635\u0648\u06cc\u0631-\u0628\u0627-Mask-RCNN.jpg\" alt=\"\u0646\u0627\u062d\u06cc\u0647 \u0628\u0646\u062f\u06cc \u0641\u06cc\u0644 \u0647\u0627 \u062f\u0631 \u062a\u0635\u0648\u06cc\u0631 \u0628\u0627 Mask RCNN\" class=\"wp-image-11735\" width=\"768\" height=\"707\" title=\"\" srcset=\"https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/05\/\u0646\u0627\u062d\u06cc\u0647-\u0628\u0646\u062f\u06cc-\u0641\u06cc\u0644-\u0647\u0627-\u062f\u0631-\u062a\u0635\u0648\u06cc\u0631-\u0628\u0627-Mask-RCNN.jpg 768w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/05\/\u0646\u0627\u062d\u06cc\u0647-\u0628\u0646\u062f\u06cc-\u0641\u06cc\u0644-\u0647\u0627-\u062f\u0631-\u062a\u0635\u0648\u06cc\u0631-\u0628\u0627-Mask-RCNN-300x276.jpg 300w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"768\" height=\"517\" src=\"https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/05\/\u0646\u0627\u062d\u06cc\u0647-\u0628\u0646\u062f\u06cc-\u0627\u0634\u06cc\u0627-\u0645\u062e\u062a\u0644\u0641-\u0628\u0627-mask-Rcnn.png\" alt=\"\u0646\u0627\u062d\u06cc\u0647 \u0628\u0646\u062f\u06cc \u0627\u0634\u06cc\u0627 \u0645\u062e\u062a\u0644\u0641 \u0628\u0627 mask Rcnn\" class=\"wp-image-11736\" title=\"\" srcset=\"https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/05\/\u0646\u0627\u062d\u06cc\u0647-\u0628\u0646\u062f\u06cc-\u0627\u0634\u06cc\u0627-\u0645\u062e\u062a\u0644\u0641-\u0628\u0627-mask-Rcnn.png 768w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/05\/\u0646\u0627\u062d\u06cc\u0647-\u0628\u0646\u062f\u06cc-\u0627\u0634\u06cc\u0627-\u0645\u062e\u062a\u0644\u0641-\u0628\u0627-mask-Rcnn-300x202.png 300w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2021\/05\/\u0646\u0627\u062d\u06cc\u0647-\u0628\u0646\u062f\u06cc-\u0627\u0634\u06cc\u0627-\u0645\u062e\u062a\u0644\u0641-\u0628\u0627-mask-Rcnn-110x75.png 110w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-3-faster-r-cnn-mask-r-cnn\"><span class=\"ez-toc-section\" id=\"%DB%B3-_%D8%B9%D9%85%D9%84%DA%A9%D8%B1%D8%AF_Faster_R-CNN_%D8%AF%D8%B1_%D9%85%D9%82%D8%A7%D8%A8%D9%84_Mask_R-CNN\"><\/span><strong>\u06f3- \u0639\u0645\u0644\u06a9\u0631\u062f Faster R-CNN \u062f\u0631 \u0645\u0642\u0627\u0628\u0644 Mask R-CNN<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n<p style=\"text-align: justify\">\u0645\u06cc \u062f\u0627\u0646\u06cc\u0645 \u06a9\u0647 Mask R-CNN \u0627\u0632 \u0646\u0638\u0631 \u0645\u062d\u0627\u0633\u0628\u0627\u062a\u06cc \u067e\u0631\u0647\u0632\u06cc\u0646\u0647 \u062a\u0631 \u0627\u0632 Faster R-CNN \u0627\u0633\u062a\u060c \u0632\u06cc\u0631\u0627 Mask R-CNN \u0645\u0628\u062a\u0646\u06cc \u0628\u0631 Faster R-CNN \u0627\u0633\u062a \u0648 \u06a9\u0627\u0631\u0647\u0627\u06cc \u0627\u0636\u0627\u0641\u06cc \u0645\u0648\u0631\u062f \u0646\u06cc\u0627\u0632 \u0628\u0631\u0627\u06cc \u062a\u0648\u0644\u06cc\u062f \u0645\u0627\u0633\u06a9 \u0631\u0627 \u0627\u0646\u062c\u0627\u0645 \u0645\u06cc \u062f\u0647\u062f. \u0627\u0645\u0627 \u0627\u062c\u0627\u0632\u0647 \u062f\u0647\u06cc\u062f \u0628\u0628\u06cc\u0646\u06cc\u0645 \u0627\u06cc\u0646 \u0645\u062f\u0644 \u0686\u0642\u062f\u0631 \u067e\u0631\u0647\u0632\u06cc\u0646\u0647 \u062a\u0631 \u0627\u0633\u062a\u061f<\/p>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-1-3-cpu-gpu\"><span class=\"ez-toc-section\" id=\"%DB%B1-%DB%B3_%D9%85%D9%82%D8%A7%DB%8C%D8%B3%D9%87_%D8%B2%D9%85%D8%A7%D9%86_%D8%A7%D8%B3%D8%AA%D9%86%D8%A8%D8%A7%D8%B7_%D9%85%D8%AF%D9%84_%D8%AF%D8%B1_CPU_%D9%88_GPU\"><\/span><strong>\u06f1-\u06f3 \u0645\u0642\u0627\u06cc\u0633\u0647 \u0632\u0645\u0627\u0646 \u0627\u0633\u062a\u0646\u0628\u0627\u0637 \u0645\u062f\u0644 \u062f\u0631 CPU \u0648 GPU<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n<p style=\"text-align: justify\">\u0645\u0627 \u0632\u0645\u0627\u0646 \u0645\u0648\u0631\u062f\u0646\u06cc\u0627\u0632 \u0645\u062f\u0644 \u0631\u0627 \u0628\u0631\u0627\u06cc \u067e\u06cc\u0634 \u0628\u06cc\u0646\u06cc \u062e\u0631\u0648\u062c\u06cc \u0627\u0632 \u06cc\u06a9 \u062a\u0635\u0648\u06cc\u0631 \u0648\u0631\u0648\u062f\u06cc \u062f\u0631 \u06cc\u06a9 CPU \u0648 \u06cc\u06a9 GPU \u0627\u0646\u062f\u0627\u0632\u0647 \u06af\u06cc\u0631\u06cc \u06a9\u0631\u062f\u06cc\u0645. \u062f\u0631 CPU \u0633\u0631\u0639\u062a \u0645\u062f\u0644 \u0647\u0627 \u0628\u0647 \u0637\u0631\u0632 \u0634\u06af\u0641\u062a \u0627\u0646\u06af\u06cc\u0632\u06cc \u0646\u0632\u062f\u06cc\u06a9 \u0628\u0647\u0645 \u0627\u0633\u062a \u060c \u0627\u0645\u0627 \u062f\u0631 GPU \u060c Mask R-CNN \u062d\u062f\u0648\u062f \u06f4\u06f7 \u0645\u06cc\u0644\u06cc \u062b\u0627\u0646\u06cc\u0647 \u0628\u06cc\u0634\u062a\u0631 \u0637\u0648\u0644 \u0645\u06cc \u06a9\u0634\u062f.<\/p>\n\n\n<figure class=\"wp-block-table aligncenter\"><table><tbody><tr><td class=\"has-text-align-center\" data-align=\"center\">\u0645\u062f\u0644 \u0647\u0627<\/td><td>CPU<\/td><td>GPU<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Faster R-CNN ResNet-50 FPN<\/td><td>8.45859 s<\/td><td>0.15356 s<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Mask R-CNN ResNet-50 FPN<\/td><td>9.82342 s<\/td><td>0.21595 s<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-2-3\"><span class=\"ez-toc-section\" id=\"%DB%B2-%DB%B3_%D8%A7%D9%84%D8%B2%D8%A7%D9%85%D8%A7%D8%AA_%D8%AD%D8%A7%D9%81%D8%B8%D9%87_%D9%85%D8%AF%D9%84_%D9%87%D8%A7\"><\/span><strong>\u06f2-\u06f3 \u0627\u0644\u0632\u0627\u0645\u0627\u062a \u062d\u0627\u0641\u0638\u0647 \u0645\u062f\u0644 \u0647\u0627<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n<p style=\"text-align: justify\">\u0645\u0627 \u0647\u0645\u0686\u0646\u06cc\u0646 \u062d\u0627\u0641\u0638\u0647 \u0645\u0648\u0631\u062f \u0646\u06cc\u0627\u0632 \u0645\u062f\u0644 \u0647\u0627 \u0631\u0627 \u0647\u0645 \u0627\u0646\u062f\u0627\u0632\u0647 \u06af\u06cc\u0631\u06cc \u06a9\u0631\u062f\u06cc\u0645.<\/p>\n\n\n<figure class=\"wp-block-table aligncenter\"><table><tbody><tr><td class=\"has-text-align-center\" data-align=\"center\">\u0645\u062f\u0644 \u0647\u0627<\/td><td>\u062d\u0627\u0641\u0638\u0647 (\u06af\u06cc\u06af\u0627\u0628\u0627\u06cc\u062a)<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Faster R-CNN ResNet-50 FPN<\/td><td>5.2<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Mask R-CNN ResNet-50 FPN<\/td><td>5.4<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n<p style=\"text-align: justify;\"><div class=\"clear\"><\/div><div style=\"margin-top:20px; margin-bottom:20px;\" class=\"divider divider-solid\"><\/div>\n<p style=\"text-align: justify;\">\u062e\u0628\u060c \u062f\u0631 \u0627\u06cc\u0646 \u0642\u0633\u0645\u062a \u0628\u0647 \u062a\u0626\u0648\u0631\u06cc \u0648 \u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0645\u062f\u0644 Mask R-CNN \u0627\u0632 \u0642\u0628\u0644 \u0622\u0645\u0648\u0632\u0634 \u062f\u06cc\u062f\u0647 \u062f\u0631 PyTorch \u067e\u0631\u062f\u0627\u062e\u062a\u06cc\u0645. \u0627\u0645\u06cc\u062f\u0648\u0627\u0631\u06cc\u0645 \u0627\u06cc\u0646 \u0645\u062c\u0645\u0648\u0639\u0647 \u0628\u0631\u0627\u06cc \u0634\u0645\u0627 \u0645\u0641\u06cc\u062f \u0628\u0648\u062f\u0647 \u0628\u0627\u0634\u062f.<\/p>\n<h4><strong>\u0628\u06cc\u0634\u062a\u0631 \u0628\u062e\u0648\u0627\u0646\u06cc\u062f :<\/strong><\/h4>\n\n\n<div class=\"wp-block-group has-vivid-green-cyan-color has-text-color\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<ul class=\"wp-block-yoast-seo-related-links\"><li><a href=\"https:\/\/shahaab-co.com\/mag\/en-articles\/computer-vision-tutorial-implementing-mask-r-cnn-for-image-segmentation-with-python-code\/\">Computer Vision Tutorial: Implementing Mask R-CNN for Image Segmentation + Python Code<\/a><\/li><li><a href=\"https:\/\/shahaab-co.com\/mag\/edu\/deep-learning\/faster-r-cnn-object-detection-with-pytorch\/\">\u0622\u0645\u0648\u0632\u0634 PyTorch \u0628\u0631\u0627\u06cc \u0645\u0628\u062a\u062f\u06cc\u0627\u0646 &#8211; \u062a\u0634\u062e\u06cc\u0635 \u0627\u0634\u06cc\u0627 \u0628\u0627 Faster R-CNN<\/a><\/li><li><a href=\"https:\/\/shahaab-co.com\/mag\/edu\/machine-vision\/image-segmentation-part-one\/\">\u0646\u0627\u062d\u06cc\u0647 \u0628\u0646\u062f\u06cc \u062a\u0635\u0648\u06cc\u0631 &#8211; \u0642\u0633\u0645\u062a \u0627\u0648\u0644<\/a><\/li><li><a href=\"https:\/\/shahaab-co.com\/mag\/edu\/deep-learning\/pytorch-for-beginners-image-classification-using-pre-trained-models\/\">\u0622\u0645\u0648\u0632\u0634 PyTorch \u0628\u0631\u0627\u06cc \u0645\u0628\u062a\u062f\u06cc\u0627\u0646 &#8211; \u06a9\u0644\u0627\u0633\u0647 \u0628\u0646\u062f\u06cc \u062a\u0635\u0648\u06cc\u0631 \u0628\u0627 \u0645\u062f\u0644 \u0647\u0627\u06cc \u0627\u0632 \u0642\u0628\u0644 \u0622\u0645\u0648\u0632\u0634 \u062f\u06cc\u062f\u0647<\/a><\/li><li><a href=\"https:\/\/shahaab-co.com\/mag\/programming-tools\/top-open-source-annotation-tools-computer-vision\/\">\u0628\u0647\u062a\u0631\u06cc\u0646 \u0627\u0628\u0632\u0627\u0631 \u0647\u0627\u06cc \u0645\u0646\u0628\u0639 \u0628\u0627\u0632 \u062d\u0627\u0634\u06cc\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0628\u0631\u0627\u06cc \u0628\u06cc\u0646\u0627\u06cc\u06cc \u06a9\u0627\u0645\u067e\u06cc\u0648\u062a\u0631<\/a><\/li><\/ul>\n\n\n\n<a href=\"#\" class=\"shortc-button small blue \">\u0645\u0646\u0628\u0639<\/a> <a href=\"https:\/\/learnopencv.com\/mask-r-cnn-instance-segmentation-with-pytorch\/\" target=\"_blank\" class=\"shortc-button small gray \" rel=\"noopener\">Learn OpenCV<\/a>\n<\/div><\/div>\n\n\n<div class=\"kk-star-ratings kksr-auto kksr-align-right kksr-valign-bottom\"\n    data-payload='{&quot;align&quot;:&quot;right&quot;,&quot;id&quot;:&quot;11626&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;0&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;0&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;\u0627\u0645\u062a\u06cc\u0627\u0632 \u062f\u0647\u06cc\u062f!&quot;,&quot;legend&quot;:&quot;0\\\/5 - (0 \u0627\u0645\u062a\u06cc\u0627\u0632)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;title&quot;:&quot;\u0622\u0645\u0648\u0632\u0634 PyTorch \u0628\u0631\u0627\u06cc \u0645\u0628\u062a\u062f\u06cc\u0627\u0646 - \u0646\u0627\u062d\u06cc\u0647 \u0628\u0646\u062f\u06cc \u0646\u0645\u0648\u0646\u0647 \u0628\u0627 Mask R-CNN&quot;,&quot;width&quot;:&quot;0&quot;,&quot;_legend&quot;:&quot;{score}\\\/{best} - ({count} \u0627\u0645\u062a\u06cc\u0627\u0632)&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>\n            \n<div class=\"kksr-stars\">\n    \n<div class=\"kksr-stars-inactive\">\n            <div class=\"kksr-star\" data-star=\"1\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"2\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"3\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"4\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"5\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n    \n<div class=\"kksr-stars-active\" style=\"width: 0px;\">\n            <div class=\"kksr-star\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n<\/div>\n                \n\n<div class=\"kksr-legend\" style=\"font-size: 19.2px;\">\n            <span class=\"kksr-muted\">\u0627\u0645\u062a\u06cc\u0627\u0632 \u062f\u0647\u06cc\u062f!<\/span>\n    <\/div>\n    <\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u062f\u0631 \u0622\u062e\u0631\u06cc\u0646 \u067e\u0633\u062a \u0627\u0632 \u0645\u062c\u0645\u0648\u0639\u0647 PyTorch \u0628\u0631\u0627\u06cc \u0645\u0628\u062a\u062f\u06cc\u0627\u0646 \u060c \u0645\u0627 \u062f\u0631 \u0645\u0648\u0631\u062f \u062a\u0626\u0648\u0631\u06cc Mask R-CNN \u0648 \u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u06cc\u06a9 \u0645\u062f\u0644 Mask R-CNN \u0627\u0632 \u0642\u0628\u0644 \u0622\u0645\u0648\u0632\u0634 \u062f\u06cc\u062f\u0647 \u062f\u0631 PyTorch \u0628\u062d\u062b \u062e\u0648\u0627\u0647\u06cc\u0645 \u06a9\u0631\u062f. \u0641\u0647\u0631\u0633\u062a \u0645\u0637\u0627\u0644\u0628\u06f1- \u0646\u0627\u062d\u06cc\u0647 \u0628\u0646\u062f\u06cc \u0645\u0639\u0646\u0627\u06cc\u06cc \u060c \u062a\u0634\u062e\u06cc\u0635 \u0627\u0634\u06cc\u0627 \u0648 \u0646\u0627\u062d\u06cc\u0647 \u0628\u0646\u062f\u06cc \u0646\u0645\u0648\u0646\u0647\u06f1-\u06f1 \u0645\u0639\u0645\u0627\u0631\u06cc Mask R-CNN2- \u06a9\u062f \u0646\u0648\u06cc\u0633\u06cc Mask R-CNN \u0628\u0627 PyTorch1-2 \u0648\u0631\u0648\u062f\u06cc \u0648 &hellip;<\/p>\n","protected":false},"author":17,"featured_media":11744,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_editorskit_title_hidden":false,"_editorskit_reading_time":0,"_editorskit_is_block_options_detached":false,"_editorskit_block_options_position":"{}","footnotes":""},"categories":[19,18],"tags":[84,147,97,101,168,86],"class_list":["post-11626","post","type-post","status-publish","format-standard","has-post-thumbnail","","category-deep-learning","category-edu","tag-84","tag-147","tag-97","tag-101","tag-168","tag-86"],"_links":{"self":[{"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/posts\/11626","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/comments?post=11626"}],"version-history":[{"count":1,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/posts\/11626\/revisions"}],"predecessor-version":[{"id":16196,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/posts\/11626\/revisions\/16196"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/media\/11744"}],"wp:attachment":[{"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/media?parent=11626"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/categories?post=11626"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/tags?post=11626"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}