{"id":470,"date":"2019-10-22T10:08:10","date_gmt":"2019-10-22T03:08:10","guid":{"rendered":"http:\/\/ainoodle.tech\/?p=470"},"modified":"2019-10-22T10:08:10","modified_gmt":"2019-10-22T03:08:10","slug":"ket-noi-c-voi-python-flask-de-trien-khai-he-thong-ai-client-server-chuong-2","status":"publish","type":"post","link":"https:\/\/miai.vn\/?p=470","title":{"rendered":"K\u1ebft n\u1ed1i C# v\u1edbi Python Flask \u0111\u1ec3 tri\u1ec3n khai h\u1ec7 th\u1ed1ng AI Client-Server \u2013 Ch\u01b0\u01a1ng 2"},"content":{"rendered":"\n<p>Ch\u00e0o ng\u00e0y m\u1edbi c\u00e1c member th\u00e2n th\u01b0\u01a1ng c\u1ee7a M\u00ec Ai, nh\u01b0 v\u1eady trong <a rel=\"noreferrer noopener\" aria-label=\"b\u00e0i tr\u01b0\u1edbc (opens in a new tab)\" href=\"https:\/\/miai.vn\/2019\/10\/15\/ket-noi-c-voi-python-flask-de-trien-khai-he-thong-ai-client-server-chuong-1\/\" target=\"_blank\"><strong>b\u00e0i tr\u01b0\u1edbc<\/strong><\/a> m\u00ecnh \u0111\u00e3 guide c\u00e1c b\u1ea1n c\u00e1ch tri\u1ec3n khai m\u1ed9t h\u1ec7 th\u1ed1ng client-server k\u1ebft n\u1ed1i gi\u1eefa C# v\u1edbi Flask Python server \u0111\u1ec3 x\u00e2y d\u1ef1ng c\u00e1c h\u1ec7t th\u1ed1ng AI. H\u00f4m nay ch\u00fang ta \u0111i ti\u1ebfp Ch\u01b0\u01a1ng 2, ch\u00fang ta s\u1ebd th\u00eam v\u00e0o c\u00e1c \u0111o\u1ea1n code kh\u1edfi t\u1ea1o model YOLO, th\u1ef1c hi\u1ec7n detection c\u00e1c object trong \u1ea3nh t\u1eeb request c\u1ee7a client v\u00e0 tr\u1ea3 v\u1ec1 k\u1ebft qu\u1ea3 cho client th\u00f4ng qua REST API nh\u00e9.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/process.filestackapi.com\/cache=expiry:max\/resize=width:1050\/7WnZWlR7TgafdDesB5ow\" alt=\"python rest api\"\/><\/figure>\n\n\n\n<script async=\"\" src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\n<!-- InPost_Ad -->\n<ins class=\"adsbygoogle\" style=\"display:block\" data-ad-client=\"ca-pub-5095883280136027\" data-ad-slot=\"7735063137\" data-ad-format=\"auto\" data-full-width-responsive=\"true\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n\n\n\n<p>B\u00e0i to\u00e1n c\u1ee7a ch\u00fang ta l\u00e0: client s\u1ebd upload m\u1ed9t file \u1ea3nh ch\u1ee5p v\u00e0 server s\u1ebd tr\u1ea3 v\u1ec1 c\u00e1c v\u1eadt th\u1ec3 trong \u0111\u00f3 k\u00e8m theo t\u1ecda \u0111\u1ed9 trong \u1ea3nh v\u00e0 client s\u1ebd hi\u1ec3n th\u1ecb k\u1ebft qu\u1ea3 tr\u1ea3 v\u1ec1 l\u00ean m\u00e0n h\u00ecnh.<\/p>\n\n\n\n<p>R\u1ed3i, b\u1eaft \u0111\u1ea7u nh\u00e9.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Ph\u1ea7n 1. Chu\u1ea9n b\u1ecb nguy\u00ean v\u1eadt li\u1ec7u<\/h2>\n\n\n\n<p>B\u00e0i n\u00e0y c\u00f3 ki\u1ebfn tr\u00fac client\/server n\u00ean c\u00e1c b\u1ea1n ph\u1ea3i chu\u1ea9n b\u1ecb cho m\u00ecnh 2 ph\u1ea7n l\u00e0 client v\u00e0 server. T\u1ea5t nhi\u00ean r\u1ed3i!&nbsp;<\/p>\n\n\n\n<p>\u0110\u1ea7u ti\u00ean c\u00e1c b\u1ea1n t\u1ea1o th\u01b0 m\u1ee5c&nbsp;<strong>MiAI_Flask<\/strong>&nbsp;\u0111\u1ec3 l\u01b0u c\u00e1c th\u1ee9 c\u1ee7a b\u00e0i n\u00e0y. Ti\u1ebfp theo c\u00e1c b\u1ea1n g\u00f5 l\u1ec7nh:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">git clone https:\/\/github.com\/thangnch\/MiAI_Flask_2 .<\/pre>\n\n\n\n<p>\u0110\u1ee3i m\u1ed9t ch\u00fat \u0111\u1ec3 source bay v\u1ec1, c\u00e1c b\u1ea1n s\u1ebd th\u1ea5y c\u00f3 folder l\u00e0 client l\u00e0 ch\u1ee9a m\u00e3 ngu\u1ed3n c# c\u00f2n c\u00e1c file b\u00ean ngo\u00e0i l\u00e0 python d\u00f9ng tr\u00ean server. <br>B\u00e2y gi\u1edd c\u00e1c b\u1ea1n t\u1ea3i weights c\u1ee7a YOLO v\u1ec1. Link t\u1ea3i t\u1ea1i \u0111\u00e2y :&nbsp;<a href=\"https:\/\/pjreddie.com\/media\/files\/yolov3.weights\">https:\/\/pjreddie.com\/media\/files\/yolov3.weights<\/a> v\u00e0 l\u01b0u v\u00e0o th\u01b0 m\u1ee5c MiAI_Flask_2 nh\u00e9!<\/p>\n\n\n\n<p>Ti\u1ebfp theo \u0111\u1ec3 l\u00e0m b\u00e0i n\u00e0y, c\u00e1c b\u1ea1n ch\u1ea1y l\u1ec7nh c\u00e0i \u0111\u1eb7t c\u00e1c th\u01b0 vi\u1ec7n nh\u01b0 sau:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">pip install -r setup.txt<\/pre>\n\n\n\n<p>\u0110\u1ee3it m\u1ed9t ch\u00fat l\u00e0 done nh\u00e9! Sau \u0111\u00f3 c\u00e1c b\u1ea1n chuy\u1ec3n sang b\u01b0\u1edbc 2.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Ph\u1ea7n 2. T\u01b0 t\u01b0\u1edfng b\u00e0i to\u00e1n<\/h2>\n\n\n\n<p>V\u1edbi Ch\u01b0\u01a1ng 2 n\u00e0y, ch\u00fang ta s\u1ebd l\u00e0m nh\u01b0 sau:<\/p>\n\n\n\n<script async=\"\" src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\n<!-- InPost_Ad -->\n<ins class=\"adsbygoogle\" style=\"display:block\" data-ad-client=\"ca-pub-5095883280136027\" data-ad-slot=\"7735063137\" data-ad-format=\"auto\" data-full-width-responsive=\"true\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n\n\n\n<ul class=\"wp-block-list\"><li>Client s\u1ebd upload m\u1ed9t file \u1ea3nh l\u00ean server v\u1edbi tr\u00ecnh t\u1ef1 nh\u01b0 sau:<ol><li>Ti\u1ebfp nh\u1eadn file \u1ea3nh t\u1eeb ng\u01b0\u1eddi d\u00f9ng<\/li><li>Chuy\u1ec3n file \u1ea3nh th\u00e0nh Base64 \u0111\u1ec3 ti\u1ec7n g\u1eedi qua HTTP<\/li><li>G\u1eedi file \u1ea3nh l\u00ean server v\u00e0 nh\u1eadn v\u1ec1 m\u1ed9t chu\u1ed7i d\u1eef li\u1ec7u tr\u1ea3 v\u1ec1 g\u1ed3m: Class ID v\u00e0 t\u1ecda \u0111\u1ed9 X,Y, chi\u1ec1u r\u1ed9ng, chi\u1ec1u cao c\u1ee7a h\u00ecnh ch\u1eef nh\u1eadt bao quanh \u0111\u1ed1i t\u01b0\u1ee3ng \u0111\u01b0\u1ee3c nh\u1eadn d\u1ea1ng. Vi d\u1ee5: 5,10,20,300,400 ch\u1eb3ng h\u1ea1n.<\/li><li>Client v\u1ebd khung ch\u1eef nh\u1eadt v\u00e0 hi\u1ec3n th\u1ecb t\u00ean \u0111\u1ed1i t\u01b0\u1ee3ng l\u00ean m\u00e0n h\u00ecnh<\/li><\/ol><\/li><li>Server th\u00ec s\u1ebd th\u1ef1c hi\u1ec7n:<ol><li>Kh\u1edfi t\u1ea1o model YOLO v\u00e0 ch\u1edd s\u1eb5n<\/li><li>Khi c\u00f3 request t\u1eeb client g\u1eedi l\u00ean th\u00ec nh\u1eadn \u1ea3nh \u1edf d\u1ea1ng Base64<\/li><li>Chuy\u1ec3n \u1ea3nh t\u1eeb Base64 v\u1ec1 \u1ea3nh th\u01b0\u1eddng v\u00e0 nh\u1eadn di\u1ec7n<\/li><li>Tr\u1ea3 v\u1ec1 client classID v\u00e0 c\u00e1c t\u1ecda \u0111\u1ed9 c\u1ea7n thi\u1ebft.<\/li><\/ol><\/li><\/ul>\n\n\n\n<p>\u0110\u1ea1i kh\u00e1i nh\u01b0 v\u1eady, b\u00e2y gi\u1edd ch\u00fang ta sang ph\u1ea7n code nh\u00e9.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Ph\u1ea7n 3. Vi\u1ebft code ch\u01b0\u01a1ng tr\u00ecnh k\u1ebft n\u00f4i client c# v\u1edbi flask server python<\/h2>\n\n\n\n<p>M\u00e3 ngu\u1ed3n server c\u00e1c b\u1ea1n xem file httpsvr.py trong th\u01b0 m\u1ee5c server nh\u00e9. M\u00ecnh \u0111\u00e3 comment \u0111\u1ea7y \u0111\u1ee7 t\u1eebng d\u00f2ng l\u1ec7nh r\u1ed3i.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/github.com\/thangnch\/MiAI_Flask_2\/blob\/master\/scrshot03.png?raw=true\" alt=\"python flask\"\/><\/figure>\n\n\n\n<p>C\u00f2n m\u00e3 ngu\u1ed3n client th\u00ec \u1edf file Form1.cs c\u0169ng \u0111\u00e3 \u0111\u01b0\u1ee3c comment \u0111\u1ea7y \u0111\u1ee7, c\u00e1c b\u1ea1n \u0111\u1ecdc v\u00e0 xem chi ti\u1ebft trong file.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/github.com\/thangnch\/MiAI_Flask_2\/blob\/master\/scrshot04.png?raw=true\" alt=\"python flask\"\/><\/figure>\n\n\n\n<p>N\u1ebfu c\u00f3 g\u00ec c\u1ea7n h\u1ecfi th\u00eam ho\u1eb7c b\u1ecb l\u1ed7i c\u00e1c b\u1ea1n c\u1ee9 post l\u00ean group trao \u0111\u1ed5i, chia s\u1ebb:&nbsp;<strong><a rel=\"noreferrer noopener\" href=\"https:\/\/www.facebook.com\/groups\/miaigroup\" target=\"_blank\">https:\/\/www.facebook.com\/groups\/miaigroup<\/a><\/strong>&nbsp;\u0111\u1ec3 c\u00f9ng trao \u0111\u1ed5i, th\u1ea3o lu\u1eadn nh\u00e9.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Ph\u1ea7n 4. Ti\u1ebfn h\u00e0nh b\u1eadt server Python Flask<\/h2>\n\n\n\n<p>Ph\u1ea7n b\u1eadt n\u00e0y c\u00e1c b\u1ea1n l\u00e0m theo Ph\u1ea7n 3 trong b\u00e0i s\u1ed1 1 <a rel=\"noreferrer noopener\" aria-label=\"t\u1ea1i \u0111\u00e2y (opens in a new tab)\" href=\"https:\/\/miai.vn\/2019\/10\/15\/ket-noi-c-voi-python-flask-de-trien-khai-he-thong-ai-client-server-chuong-1\/\" target=\"_blank\"><strong>t\u1ea1i \u0111\u00e2y<\/strong><\/a> nh\u00e9. M\u00ecnh kh\u00f4ng vi\u1ebft l\u1ea1i chi ti\u1ebft n\u1eefa.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Ph\u1ea7n 5. Ti\u1ebfn h\u00e0nh ch\u1ea1y Client b\u1eb1ng C#<\/h2>\n\n\n\n<p>R\u1ed3i, b\u00e2y gi\u1edd \u0111\u1ebfn ph\u1ea7n client. Ph\u1ea7n n\u00e0y m\u00ecnh l\u1eadp tr\u00ecnh&nbsp;<strong>WinForm b\u1eb1ng Visual Studio 2017<\/strong>&nbsp;nh\u00e9. B\u1ea1n n\u00e0o ch\u01b0a c\u00e0i&nbsp;<strong>Visual Studio<\/strong>&nbsp;th\u00ec c\u00e0i \u0111\u1ec3 code client (\u0111o\u1ea1n n\u00e0y v\u1edbi c\u00e1c b\u1ea1n ch\u01b0a code C# bao gi\u1edd ch\u00fa \u00fd nh\u00e9 v\u00e0 kh\u00f4ng nh\u1ea7m v\u1edbi Visual Studio Code \u0111\u1ec3 code python t\u1eeb tr\u01b0\u1edbc \u0111\u1ebfn gi\u1edd.).<\/p>\n\n\n\n<p>C\u00e1c b\u1ea1n \u0111\u00e3 m\u1edf file solution, t\u00ecm \u0111\u1ebfn Form1.cs v\u00e0 t\u00ecm ti\u1ebfp h\u00e0m button1_Click. C\u00e1c b\u1ea1n s\u1eeda bi\u1ebfn server_ip th\u00e0nh IP ch\u00ednh x\u00e1c c\u1ee7a server l\u00e0 okie. N\u1ebfu c\u00e1c b\u1ea1n ch\u1ea1y tr\u00ean c\u00f9ng 1 m\u00e1y th\u00ec c\u1ee9 s\u1eeda th\u00e0nh 0.0.0.0 l\u00e0 xong nh\u00e9.<\/p>\n\n\n\n<p>R\u1ed3i th\u00ec gi\u1edd ti\u1ebfn h\u00e0nh run Solution, m\u1ed9t m\u00e0n h\u00ecnh nh\u01b0 sau s\u1ebd hi\u1ec7n ra khi c\u00e1c b\u1ea1n ch\u1ea1y th\u00e0nh c\u00f4ng.<\/p>\n\n\n\n<script async=\"\" src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\n<!-- InPost_Ad -->\n<ins class=\"adsbygoogle\" style=\"display:block\" data-ad-client=\"ca-pub-5095883280136027\" data-ad-slot=\"7735063137\" data-ad-format=\"auto\" data-full-width-responsive=\"true\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/github.com\/thangnch\/MiAI_Flask_2\/blob\/master\/scrshot01.png?raw=true\" alt=\"c# yolo\"\/><\/figure>\n\n\n\n<p>\u0110\u1ec3 \u0111\u01a1n gi\u1ea3n m\u00ecnh fix s\u1eb5n 1 c\u00e1i \u1ea3nh trong PictureBox, c\u00e1c b\u1ea1n c\u00f3 th\u1ec3 s\u1eeda l\u1ea1i ch\u01b0\u01a1ng tr\u00ecnh \u0111\u1ec3 cho ph\u00e9p ng\u01b0\u1eddi d\u00f9ng ch\u1ecdn 1 \u1ea3nh b\u1ea5t k\u00ec nh\u00e9. <\/p>\n\n\n\n<p>B\u00e2y gi\u1edd c\u00e1c b\u1ea1n b\u1ea5m n\u00fat Send to server v\u00e0 \u0111\u1ee3i ch\u00fat, c\u00e1c b\u1ea1n s\u1ebd th\u1ea5y k\u1ebft qu\u1ea3 th\u1eadt amazing nh\u01b0 sau:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/github.com\/thangnch\/MiAI_Flask_2\/blob\/master\/scrshot02.png?raw=true\" alt=\"c# yolo\"\/><\/figure>\n\n\n\n<p>Nh\u01b0 v\u1eady , trong Ch\u01b0\u01a1ng 2 n\u00e0y, ch\u00fang ta \u0111\u00e3 bi\u1ebft c\u00e1ch d\u1ef1ng m\u1ed9t server python c\u00f3 ch\u1ea1y model YOLO b\u1eb1ng Flask v\u00e0 g\u1ecdi t\u1eeb c# l\u00ean \u0111\u1ec3 detect object th\u00e0nh c\u00f4ng. <\/p>\n\n\n\n<p>M\u00ecnh xin nh\u1eafc l\u1ea1i, \u0111\u00e2y l\u00e0 b\u00e0i v\u00ed d\u1ee5 \u0111\u1ec3 c\u00e1c b\u1ea1n bi\u1ebft c\u00e1ch tri\u1ec3n khai theo m\u00f4 h\u00ecnh client c# v\u1edbi python flask server th\u00f4i. Sau khi th\u00e0nh th\u1ea1o, c\u00e1c b\u1ea1n c\u00f3 th\u1ec3 l\u00e0m c\u00e1c h\u1ec7 th\u1ed1ng kh\u00e1c v\u00ed d\u1ee5 nh\u01b0 h\u1ec7 th\u1ed1ng tr\u00f4ng xe t\u1ea1i t\u1ea7ng h\u1ea7m, m\u00e1y c\u1ee7a b\u1ea3o v\u1ec7 s\u1ebd ch\u1ee5p \u1ea3nh bi\u1ec3n s\u1ed1 g\u1eedi v\u1ec1 server \u0111\u1ec3 xem x\u00e9t v\u00e0 cho ph\u00e9p ra v\u00e0o ch\u1ee9 kh\u00f4ng ai c\u00e0i model l\u00ean m\u00e1y b\u1ea3o v\u1ec7 c\u1ea3.<\/p>\n\n\n\n<p>H\u1eb9n g\u1eb7p l\u1ea1i c\u00e1c b\u1ea1n. N\u1ebfu c\u00f3 g\u00ec v\u01b0\u1edbng m\u1eafc trong qu\u00e1 tr\u00ecnh tri\u1ec3n khai c\u00e1c b\u1ea1n c\u1ee9 post l\u00ean group trao \u0111\u1ed5i, chia s\u1ebb:&nbsp;<strong><a rel=\"noreferrer noopener\" href=\"https:\/\/www.facebook.com\/groups\/miaigroup\" target=\"_blank\">https:\/\/www.facebook.com\/groups\/miaigroup<\/a><\/strong>&nbsp;\u0111\u1ec3 c\u00f9ng trao \u0111\u1ed5i, th\u1ea3o lu\u1eadn nh\u00e9.<\/p>\n\n\n\n<p><strong><em>H\u00e3y gia nh\u1eadp c\u1ed9ng \u0111\u1ed3ng M\u00ec AI nh\u00e9!<\/em><\/strong><\/p>\n\n\n\n<p>Fanpage:&nbsp;<strong><a rel=\"noreferrer noopener\" href=\"http:\/\/facebook.com\/miaiblog\" target=\"_blank\">http:\/\/facebook.com\/miaiblog<\/a><\/strong><br>Group trao \u0111\u1ed5i, chia s\u1ebb:&nbsp;<strong><a rel=\"noreferrer noopener\" href=\"https:\/\/www.facebook.com\/groups\/miaigroup\" target=\"_blank\">https:\/\/www.facebook.com\/groups\/miaigroup<\/a><\/strong><br>Website:&nbsp;<strong><a rel=\"noreferrer noopener\" href=\"https:\/\/miai.vn\/\" target=\"_blank\">https:\/\/miai.vn\/<\/a><\/strong><br>Youtube:&nbsp;<strong><a href=\"http:\/\/bit.ly\/miaiyoutube\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/bit.ly\/miaiyoutube<\/a><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ch\u00e0o ng\u00e0y m\u1edbi c\u00e1c member th\u00e2n th\u01b0\u01a1ng c\u1ee7a M\u00ec Ai, nh\u01b0 v\u1eady trong b\u00e0i tr\u01b0\u1edbc m\u00ecnh \u0111\u00e3 guide c\u00e1c b\u1ea1n c\u00e1ch tri\u1ec3n khai m\u1ed9t h\u1ec7 th\u1ed1ng client-server k\u1ebft n\u1ed1i gi\u1eefa C# v\u1edbi Flask Python server \u0111\u1ec3 x\u00e2y d\u1ef1ng c\u00e1c h\u1ec7t th\u1ed1ng AI. H\u00f4m nay ch\u00fang ta \u0111i ti\u1ebfp Ch\u01b0\u01a1ng 2, ch\u00fang ta s\u1ebd th\u00eam v\u00e0o [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[109,110,111,32,112,113,29],"class_list":["post-470","post","type-post","status-publish","format-standard","hentry","category-basic","tag-c","tag-client-server","tag-flask","tag-python","tag-restful","tag-webservice","tag-yolo"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>K\u1ebft n\u1ed1i C# v\u1edbi Python Flask \u0111\u1ec3 tri\u1ec3n khai h\u1ec7 th\u1ed1ng AI Client-Server - M\u00ec AI<\/title>\n<meta name=\"description\" content=\"H\u00f4m nay ch\u00fang ta s\u1ebd th\u00eam v\u00e0o c\u00e1c \u0111o\u1ea1n code th\u1ef1c hi\u1ec7n detection c\u00e1c object trong \u1ea3nh t\u1eeb client v\u00e0 tr\u1ea3 v\u1ec1 k\u1ebft qu\u1ea3 th\u00f4ng qua REST API python flask.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/miai.vn\/?p=470\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"K\u1ebft n\u1ed1i C# v\u1edbi Python Flask \u0111\u1ec3 tri\u1ec3n khai h\u1ec7 th\u1ed1ng AI Client-Server - M\u00ec AI\" \/>\n<meta property=\"og:description\" content=\"H\u00f4m nay ch\u00fang ta s\u1ebd th\u00eam v\u00e0o c\u00e1c \u0111o\u1ea1n code th\u1ef1c hi\u1ec7n detection c\u00e1c object trong \u1ea3nh t\u1eeb client v\u00e0 tr\u1ea3 v\u1ec1 k\u1ebft qu\u1ea3 th\u00f4ng qua REST API python flask.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/miai.vn\/?p=470\" \/>\n<meta property=\"og:site_name\" content=\"M\u00ec AI\" \/>\n<meta property=\"article:published_time\" content=\"2019-10-22T03:08:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/process.filestackapi.com\/cache=expiry:max\/resize=width:1050\/7WnZWlR7TgafdDesB5ow\" \/>\n<meta name=\"author\" content=\"Ch\u1ee7 ti\u1ec7m M\u00ec\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ch\u1ee7 ti\u1ec7m M\u00ec\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/miai.vn\\\/?p=470#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/miai.vn\\\/?p=470\"},\"author\":{\"name\":\"Ch\u1ee7 ti\u1ec7m M\u00ec\",\"@id\":\"https:\\\/\\\/miai.vn\\\/#\\\/schema\\\/person\\\/cc8bc24bb90bd3f596add82f3a59948c\"},\"headline\":\"K\u1ebft n\u1ed1i C# v\u1edbi Python Flask \u0111\u1ec3 tri\u1ec3n khai h\u1ec7 th\u1ed1ng AI Client-Server \u2013 Ch\u01b0\u01a1ng 2\",\"datePublished\":\"2019-10-22T03:08:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/miai.vn\\\/?p=470\"},\"wordCount\":1323,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/miai.vn\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/miai.vn\\\/?p=470#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/process.filestackapi.com\\\/cache=expiry:max\\\/resize=width:1050\\\/7WnZWlR7TgafdDesB5ow\",\"keywords\":[\"c#\",\"client-server\",\"flask\",\"python\",\"restful\",\"webservice\",\"Yolo\"],\"articleSection\":[\"Basic\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/miai.vn\\\/?p=470#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/miai.vn\\\/?p=470\",\"url\":\"https:\\\/\\\/miai.vn\\\/?p=470\",\"name\":\"K\u1ebft n\u1ed1i C# v\u1edbi Python Flask \u0111\u1ec3 tri\u1ec3n khai h\u1ec7 th\u1ed1ng AI Client-Server - M\u00ec AI\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/miai.vn\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/miai.vn\\\/?p=470#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/miai.vn\\\/?p=470#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/process.filestackapi.com\\\/cache=expiry:max\\\/resize=width:1050\\\/7WnZWlR7TgafdDesB5ow\",\"datePublished\":\"2019-10-22T03:08:10+00:00\",\"description\":\"H\u00f4m nay ch\u00fang ta s\u1ebd th\u00eam v\u00e0o c\u00e1c \u0111o\u1ea1n code th\u1ef1c hi\u1ec7n detection c\u00e1c object trong \u1ea3nh t\u1eeb client v\u00e0 tr\u1ea3 v\u1ec1 k\u1ebft qu\u1ea3 th\u00f4ng qua REST API python flask.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/miai.vn\\\/?p=470#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/miai.vn\\\/?p=470\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/miai.vn\\\/?p=470#primaryimage\",\"url\":\"https:\\\/\\\/process.filestackapi.com\\\/cache=expiry:max\\\/resize=width:1050\\\/7WnZWlR7TgafdDesB5ow\",\"contentUrl\":\"https:\\\/\\\/process.filestackapi.com\\\/cache=expiry:max\\\/resize=width:1050\\\/7WnZWlR7TgafdDesB5ow\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/miai.vn\\\/?p=470#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/miai.vn\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"K\u1ebft n\u1ed1i C# v\u1edbi Python Flask \u0111\u1ec3 tri\u1ec3n khai h\u1ec7 th\u1ed1ng AI Client-Server \u2013 Ch\u01b0\u01a1ng 2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/miai.vn\\\/#website\",\"url\":\"https:\\\/\\\/miai.vn\\\/\",\"name\":\"M\u00ec AI\",\"description\":\"H\u1ecdc AI theo c\u00e1ch M\u00ec \u0103n li\u1ec1n!\",\"publisher\":{\"@id\":\"https:\\\/\\\/miai.vn\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/miai.vn\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/miai.vn\\\/#organization\",\"name\":\"M\u00ec AI\",\"url\":\"https:\\\/\\\/miai.vn\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/miai.vn\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/miai.vn\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/cropped-Logo_w_slogan.png\",\"contentUrl\":\"https:\\\/\\\/miai.vn\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/cropped-Logo_w_slogan.png\",\"width\":240,\"height\":193,\"caption\":\"M\u00ec AI\"},\"image\":{\"@id\":\"https:\\\/\\\/miai.vn\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/miai.vn\\\/#\\\/schema\\\/person\\\/cc8bc24bb90bd3f596add82f3a59948c\",\"name\":\"Ch\u1ee7 ti\u1ec7m M\u00ec\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b0b5124b0d2c0a8054d7127d2c236bdc3dc7a50e2d4e8728ab32eee5b122a8d1?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b0b5124b0d2c0a8054d7127d2c236bdc3dc7a50e2d4e8728ab32eee5b122a8d1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b0b5124b0d2c0a8054d7127d2c236bdc3dc7a50e2d4e8728ab32eee5b122a8d1?s=96&d=mm&r=g\",\"caption\":\"Ch\u1ee7 ti\u1ec7m M\u00ec\"},\"sameAs\":[\"https:\\\/\\\/miai.vn\"],\"url\":\"https:\\\/\\\/miai.vn\\\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"K\u1ebft n\u1ed1i C# v\u1edbi Python Flask \u0111\u1ec3 tri\u1ec3n khai h\u1ec7 th\u1ed1ng AI Client-Server - M\u00ec AI","description":"H\u00f4m nay ch\u00fang ta s\u1ebd th\u00eam v\u00e0o c\u00e1c \u0111o\u1ea1n code th\u1ef1c hi\u1ec7n detection c\u00e1c object trong \u1ea3nh t\u1eeb client v\u00e0 tr\u1ea3 v\u1ec1 k\u1ebft qu\u1ea3 th\u00f4ng qua REST API python flask.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/miai.vn\/?p=470","og_locale":"en_US","og_type":"article","og_title":"K\u1ebft n\u1ed1i C# v\u1edbi Python Flask \u0111\u1ec3 tri\u1ec3n khai h\u1ec7 th\u1ed1ng AI Client-Server - M\u00ec AI","og_description":"H\u00f4m nay ch\u00fang ta s\u1ebd th\u00eam v\u00e0o c\u00e1c \u0111o\u1ea1n code th\u1ef1c hi\u1ec7n detection c\u00e1c object trong \u1ea3nh t\u1eeb client v\u00e0 tr\u1ea3 v\u1ec1 k\u1ebft qu\u1ea3 th\u00f4ng qua REST API python flask.","og_url":"https:\/\/miai.vn\/?p=470","og_site_name":"M\u00ec AI","article_published_time":"2019-10-22T03:08:10+00:00","og_image":[{"url":"https:\/\/process.filestackapi.com\/cache=expiry:max\/resize=width:1050\/7WnZWlR7TgafdDesB5ow","type":"","width":"","height":""}],"author":"Ch\u1ee7 ti\u1ec7m M\u00ec","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Ch\u1ee7 ti\u1ec7m M\u00ec","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/miai.vn\/?p=470#article","isPartOf":{"@id":"https:\/\/miai.vn\/?p=470"},"author":{"name":"Ch\u1ee7 ti\u1ec7m M\u00ec","@id":"https:\/\/miai.vn\/#\/schema\/person\/cc8bc24bb90bd3f596add82f3a59948c"},"headline":"K\u1ebft n\u1ed1i C# v\u1edbi Python Flask \u0111\u1ec3 tri\u1ec3n khai h\u1ec7 th\u1ed1ng AI Client-Server \u2013 Ch\u01b0\u01a1ng 2","datePublished":"2019-10-22T03:08:10+00:00","mainEntityOfPage":{"@id":"https:\/\/miai.vn\/?p=470"},"wordCount":1323,"commentCount":2,"publisher":{"@id":"https:\/\/miai.vn\/#organization"},"image":{"@id":"https:\/\/miai.vn\/?p=470#primaryimage"},"thumbnailUrl":"https:\/\/process.filestackapi.com\/cache=expiry:max\/resize=width:1050\/7WnZWlR7TgafdDesB5ow","keywords":["c#","client-server","flask","python","restful","webservice","Yolo"],"articleSection":["Basic"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/miai.vn\/?p=470#respond"]}]},{"@type":"WebPage","@id":"https:\/\/miai.vn\/?p=470","url":"https:\/\/miai.vn\/?p=470","name":"K\u1ebft n\u1ed1i C# v\u1edbi Python Flask \u0111\u1ec3 tri\u1ec3n khai h\u1ec7 th\u1ed1ng AI Client-Server - M\u00ec AI","isPartOf":{"@id":"https:\/\/miai.vn\/#website"},"primaryImageOfPage":{"@id":"https:\/\/miai.vn\/?p=470#primaryimage"},"image":{"@id":"https:\/\/miai.vn\/?p=470#primaryimage"},"thumbnailUrl":"https:\/\/process.filestackapi.com\/cache=expiry:max\/resize=width:1050\/7WnZWlR7TgafdDesB5ow","datePublished":"2019-10-22T03:08:10+00:00","description":"H\u00f4m nay ch\u00fang ta s\u1ebd th\u00eam v\u00e0o c\u00e1c \u0111o\u1ea1n code th\u1ef1c hi\u1ec7n detection c\u00e1c object trong \u1ea3nh t\u1eeb client v\u00e0 tr\u1ea3 v\u1ec1 k\u1ebft qu\u1ea3 th\u00f4ng qua REST API python flask.","breadcrumb":{"@id":"https:\/\/miai.vn\/?p=470#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/miai.vn\/?p=470"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/miai.vn\/?p=470#primaryimage","url":"https:\/\/process.filestackapi.com\/cache=expiry:max\/resize=width:1050\/7WnZWlR7TgafdDesB5ow","contentUrl":"https:\/\/process.filestackapi.com\/cache=expiry:max\/resize=width:1050\/7WnZWlR7TgafdDesB5ow"},{"@type":"BreadcrumbList","@id":"https:\/\/miai.vn\/?p=470#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/miai.vn\/"},{"@type":"ListItem","position":2,"name":"K\u1ebft n\u1ed1i C# v\u1edbi Python Flask \u0111\u1ec3 tri\u1ec3n khai h\u1ec7 th\u1ed1ng AI Client-Server \u2013 Ch\u01b0\u01a1ng 2"}]},{"@type":"WebSite","@id":"https:\/\/miai.vn\/#website","url":"https:\/\/miai.vn\/","name":"M\u00ec AI","description":"H\u1ecdc AI theo c\u00e1ch M\u00ec \u0103n li\u1ec1n!","publisher":{"@id":"https:\/\/miai.vn\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/miai.vn\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/miai.vn\/#organization","name":"M\u00ec AI","url":"https:\/\/miai.vn\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/miai.vn\/#\/schema\/logo\/image\/","url":"https:\/\/miai.vn\/wp-content\/uploads\/2026\/05\/cropped-Logo_w_slogan.png","contentUrl":"https:\/\/miai.vn\/wp-content\/uploads\/2026\/05\/cropped-Logo_w_slogan.png","width":240,"height":193,"caption":"M\u00ec AI"},"image":{"@id":"https:\/\/miai.vn\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/miai.vn\/#\/schema\/person\/cc8bc24bb90bd3f596add82f3a59948c","name":"Ch\u1ee7 ti\u1ec7m M\u00ec","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/b0b5124b0d2c0a8054d7127d2c236bdc3dc7a50e2d4e8728ab32eee5b122a8d1?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/b0b5124b0d2c0a8054d7127d2c236bdc3dc7a50e2d4e8728ab32eee5b122a8d1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b0b5124b0d2c0a8054d7127d2c236bdc3dc7a50e2d4e8728ab32eee5b122a8d1?s=96&d=mm&r=g","caption":"Ch\u1ee7 ti\u1ec7m M\u00ec"},"sameAs":["https:\/\/miai.vn"],"url":"https:\/\/miai.vn\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/miai.vn\/index.php?rest_route=\/wp\/v2\/posts\/470","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/miai.vn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/miai.vn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/miai.vn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/miai.vn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=470"}],"version-history":[{"count":0,"href":"https:\/\/miai.vn\/index.php?rest_route=\/wp\/v2\/posts\/470\/revisions"}],"wp:attachment":[{"href":"https:\/\/miai.vn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=470"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/miai.vn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=470"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/miai.vn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=470"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}