MediaPipe ফেস স্টাইলাইজার টাস্ক আপনাকে একটি চিত্রের মুখগুলিতে মুখের স্টাইলাইজেশন প্রয়োগ করতে দেয়। আপনি বিভিন্ন শৈলীতে ভার্চুয়াল অবতার তৈরি করতে এই কাজটি ব্যবহার করতে পারেন।
টাস্কটি BlazeFaceStylizer মডেল ব্যবহার করে, যা একটি ফেস জেনারেটর এবং একটি ফেস এনকোডার নিয়ে গঠিত। BlazeStyleGAN ফেস জেনারেটর, যা StyleGAN মডেল ফ্যামিলির একটি লাইটওয়েট বাস্তবায়ন, একটি নির্দিষ্ট শৈলী অনুযায়ী মুখ তৈরি করে এবং সম্পাদনা করে। ফেস এনকোডার, যা একটি MobileNet V2 ব্যাকবোন ব্যবহার করে, মুখের জেনারেটর দ্বারা উত্পন্ন মুখগুলিতে ইনপুট চিত্রগুলি ম্যাপ করে৷
আপনার লক্ষ্য প্ল্যাটফর্মের জন্য এই বাস্তবায়ন নির্দেশিকাগুলির একটি অনুসরণ করে এই কাজটি ব্যবহার করা শুরু করুন। এই প্ল্যাটফর্ম-নির্দিষ্ট গাইডগুলি আপনাকে সুপারিশকৃত কনফিগারেশন বিকল্পগুলির সাথে একটি প্রস্তাবিত মডেল এবং কোড উদাহরণ ব্যবহার করে এই কাজের একটি মৌলিক বাস্তবায়নের মাধ্যমে নিয়ে যায়:
এই বিভাগটি এই কাজের ক্ষমতা, ইনপুট, আউটপুট এবং কনফিগারেশন বিকল্পগুলি বর্ণনা করে।
বৈশিষ্ট্য
ইনপুট ইমেজ প্রসেসিং - প্রসেসিং এর মধ্যে রয়েছে ইমেজ রোটেশন, রিসাইজ, নরমালাইজেশন এবং কালার স্পেস কনভার্সন।
টাস্ক ইনপুট
টাস্ক আউটপুট
স্থির চিত্র
ফেস স্টাইলাইজার ইনপুট ইমেজ থেকে সবচেয়ে বিশিষ্ট মুখের স্টাইলাইজেশন সহ একটি চিত্র আউটপুট করে।
কনফিগারেশন অপশন
এই কাজের নিম্নলিখিত কনফিগারেশন বিকল্প আছে:
বিকল্পের নাম
বর্ণনা
মান পরিসীমা
ডিফল্ট মান
errorListener
একটি ঐচ্ছিক ত্রুটি শ্রোতা সেট করে।
N/A
Not set
মডেল
ফেস স্টাইলাইজারের জন্য একটি ফেস স্টাইলাইজেশন মডেল প্রয়োজন যা ডাউনলোড করা এবং আপনার প্রোজেক্ট ডিরেক্টরিতে সংরক্ষণ করা। এই বিভাগে ফেস স্টাইলাইজেশন মডেলগুলি BlazeStyleGAN আর্কিটেকচারের উপর ভিত্তি করে। প্রতিটি মডেলকে ইনপুট চিত্রগুলির মধ্যে মুখের জন্য একটি নির্দিষ্ট শৈলী প্রয়োগ করার জন্য প্রশিক্ষণ দেওয়া হয়েছিল।
রঙিন স্কেচ
মডেলটি মুখগুলিকে একটি ছবিতে রূপান্তরিত করে যা রঙিন পেন্সিল স্ট্রোক এবং ব্রাশ স্ট্রোক সহ একটি স্কেচ অনুকরণ করে৷ এই মডেলটি প্রশিক্ষণের জন্য ব্যবহৃত শৈলী নীচে দেখানো হয়েছে:
[[["সহজে বোঝা যায়","easyToUnderstand","thumb-up"],["আমার সমস্যার সমাধান হয়েছে","solvedMyProblem","thumb-up"],["অন্যান্য","otherUp","thumb-up"]],[["এতে আমার প্রয়োজনীয় তথ্য নেই","missingTheInformationINeed","thumb-down"],["খুব জটিল / অনেক ধাপ","tooComplicatedTooManySteps","thumb-down"],["পুরনো","outOfDate","thumb-down"],["অনুবাদ সংক্রান্ত সমস্যা","translationIssue","thumb-down"],["নমুনা / কোড সংক্রান্ত সমস্যা","samplesCodeIssue","thumb-down"],["অন্যান্য","otherDown","thumb-down"]],["2025-01-13 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# Face stylization guide\n\n| **Attention:** The MediaPipe Face Stylizer task is experimental and under active development.\n\nThe MediaPipe Face Stylizer task lets you apply face stylizations to faces in an image.\nYou can use this task to create virtual avatars in various styles.\n\nThe task uses the BlazeFaceStylizer model, which consists of a face generator\nand a face encoder. The BlazeStyleGAN face generator, which is a lightweight\nimplementation of the [StyleGAN](https://arxiv.org/abs/1812.04948) model family,\ngenerates and edits faces according to a specified style. The face encoder,\nwhich uses a [MobileNet V2](https://arxiv.org/abs/1801.04381) backbone, maps\ninput images to the faces generated by the face generator.\n\n[Try it!arrow_forward](https://mediapipe-studio.webapps.google.com/studio/demo/face_stylizer)\n\nGet Started\n-----------\n\nStart using this task by following one of these implementation guides for your\ntarget platform. These platform-specific guides walk you through a basic\nimplementation of this task, using a recommended model and code examples with\nthe recommended configuration options:\n\n- **Android** - [Code example](https://github.com/google-ai-edge/mediapipe-samples/tree/main/examples/face_stylizer/android) - [Guide](./android)\n- **Python** - [Code example](https://colab.sandbox.google.com/github/googlesamples/mediapipe/blob/main/examples/face_stylizer/python/face_stylizer.ipynb) - [Guide](./python)\n- **Web** - [Code example](https://codepen.io/mediapipe-preview/pen/wvRBPmR) - [Guide](./web_js)\n\nTask details\n------------\n\nThis section describes the capabilities, inputs, outputs, and configuration\noptions of this task.\n\n### Features\n\n- **Input image processing** - Processing includes image rotation, resizing, normalization, and color space conversion.\n\n| Task inputs | Task outputs |\n|--------------|----------------------------------------------------------------------------------------------------|\n| Still images | Face Stylizer outputs an image with a stylization of the most prominent face from the input image. |\n\n| **Note:** This task supports the modification of the provided ML models and custom models. For more information on using modified or custom models for this task, see the [customization guide](../../customization/face_stylizer).\n\n### Configurations options\n\nThis task has the following configuration options:\n\n| Option Name | Description | Value Range | Default Value |\n|-----------------|----------------------------------|-------------|---------------|\n| `errorListener` | Sets an optional error listener. | `N/A` | `Not set` |\n\nModels\n------\n\nThe Face Stylizer requires a face stylization model to be downloaded and\nstored in your project directory. The face stylization models in this section\nare based on the\n[BlazeStyleGAN](https://openaccess.thecvf.com/content/CVPR2023W/ECV/papers/Jia_BlazeStyleGAN_A_Real-Time_On-Device_StyleGAN_CVPRW_2023_paper.pdf)\narchitecture. Each model was trained to apply a specific style to faces within\ninput images.\n| **Attention:** This MediaPipe Solutions Preview is an early release. [Learn more](/edge/mediapipe/solutions/about#notice).\n\n### Color sketch\n\nThe model transforms faces into an image that mimics a sketch with colored\npencil strokes and brush strokes. The style used to train this model is shown below:\n\n| Model name | Input shape | Quantization type | Versions |\n|--------------------------------------------------------------------------------------------------------------------------------------------------|---------------|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| [Color sketch](https://storage.googleapis.com/mediapipe-models/face_stylizer/blaze_face_stylizer/float32/latest/face_stylizer_color_sketch.task) | 256 x 256 x 3 | Float32 | [Latest](https://storage.googleapis.com/mediapipe-models/face_stylizer/blaze_face_stylizer/float32/latest/face_stylizer_color_sketch.task) |\n\n### Color ink\n\nThe model transforms faces into an image that mimics a watercolor painting.\nThe style used to train this model is shown below:\n\n| Model name | Input shape | Quantization type | Versions |\n|--------------------------------------------------------------------------------------------------------------------------------------------|---------------|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------|\n| [Color ink](https://storage.googleapis.com/mediapipe-models/face_stylizer/blaze_face_stylizer/float32/latest/face_stylizer_color_ink.task) | 256 x 256 x 3 | Float32 | [Latest](https://storage.googleapis.com/mediapipe-models/face_stylizer/blaze_face_stylizer/float32/latest/face_stylizer_color_ink.task) |\n\n### Oil painting\n\nThe model transforms faces into an image that mimics an oil painting.\nThe style used to train this model is shown below:\n\n| Model name | Input shape | Quantization type | Versions |\n|--------------------------------------------------------------------------------------------------------------------------------------------------|---------------|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| [Oil painting](https://storage.googleapis.com/mediapipe-models/face_stylizer/blaze_face_stylizer/float32/latest/face_stylizer_oil_painting.task) | 256 x 256 x 3 | Float32 | [Latest](https://storage.googleapis.com/mediapipe-models/face_stylizer/blaze_face_stylizer/float32/latest/face_stylizer_oil_painting.task) |"]]