ترجمه فارسی:hey guys we've been talking about face models a lot lately and in my videos…
- User
ترجمه فارسی:hey guys we've been talking about face models a lot lately and in my videos I often make use of the face analysis tool but I never actually explained how it works so today we are going to do that and we'll also check a few more notes I bet you didn't know about so here I have a very basic workflow that makes use of face ID and plus face to generate a person hopefully close to the reference remember that face ID node now exports an image that is optimize for other phas models that uh need the image cropped very close to the face so in this case I feed this output directly to the plus phase model to help you evaluate the likeliness of this generation to the reference I made the phas and beds distance Noe it works with inside face and DB if you can I recommend using d as it's a much smaller model and completely free connect the generated image and your reference now the preview will have a small overlay at the bottom that tells us uh how close we are there are two numbers the first is the row value the second is normalized from 0 to one the closer to zero the higher the likeliness if you get one it means that they are completely different people in my experiments with current opsource phase models we can expect a dist value of about5 so what's the difference between the similarity metrics I don't want to get too technical but uh very quickly the images are converted into embeddings with a model trained with human bases EMB beds are basically just a series of numbers let's say
- Assistant
سلام دوستان، ما اخیراً خیلی درباره مدلهای چهره صحبت کردهایم و در ویدیوهایم اغلب از ابزار تحلیل چهره استفاده میکنم ولی هرگز واقعاً توضیح ندادهام که این ابزار چگونه کار میکند. بنابراین امروز قصد داریم آن را توضیح دهیم و همچنین چند نکته دیگر را بررسی کنیم که احتمالاً نمیدانستید. اینجا یک جریان کاری بسیار ساده دارم که از فیس آیدی و پلوس فیس برای تولید فردی که امیدواریم به مرجع نزدیک باشد، استفاده میکند. به یاد داشته باشید که نود فیس آیدی حالا تصویری را صادر میکند که برای سایر مدلهای چهره بهینه شده که نیاز به برش تصویر نزدیک به چهره دارند. بنابراین در این مورد، خروجی را مستقیماً به مدل پلوس فیس میدهم تا به شما کمک کند شباهت این تولید به مرجع را ارزیابی کنید. من فاصله فیس و بیدها را تنظیم کردهام. این با فیس اینساید و دیبی کار میکند، اگر میتوانید توصیه میکنم از دی استفاده کنید زیرا مدل بسیار کوچکتری است و کاملاً رایگان است. تصویر تولید شده و مرجع خود را وصل کنید. حالا پیشنمایش یک لایه کوچک در پایین دارد که به ما میگوید چقدر نزدیک هستیم. دو عدد وجود دارد: اولی مقدار خام است و دومی از 0 تا 1 نرمال شده است. هر چه به صفر نزدیکتر باشد، شباهت بیشتر است؛ اگر عدد یک را ببینید، یعنی این که کاملاً آدمهای متفاوتی هستند. در آزمایشاتم با مدلهای فیسآیدی کنونی اپن سورس، میتوانیم یک مقدار فاصله حدود 5 را انتظار داشته باشیم. تفاوت بین معیارهای شباهت چیست؟ نمیخواهم خیلی فنی شوم، ولی خیلی سریع تصاویر به ایمبدهای با مدلی که با چهرههای انسانی آموزش دیده تبدیل میشوند. ایمبدها اساساً فقط یک سری از اعداد هستند، بیایید بگوییم.
- User
that on a plane point a represents our first embed and point B the second to establish how close they are I can simply connect the dots and thanks to Pythagoras we get the idian distance this is very simple and effective but it's reliable only if the two pictures have the same settings for example the same head position expression colors Etc another option is to get the cosine distance I can connect the two points to the origin and calculate the amplitude of this angle the closer the points the smaller the angle and so the closer our embeds will be now in this specific example choosing between idian or cosine doesn't make much of a difference uh the result will be more or less the same but what if I place the points this way in this case the idian distance between A and B is pretty big but the cosine actually very small this means that the cosine distance might be a better option when there's a lot of difference between Source image and generated image for example if your reference is a real person and the generation is like a painting or a drawing now if I select cosine you'll see that the distance will be closer because we don't consider the magnitude of the two vectors when assessing the similarity L2 norm and idian are technically the same thing but with L2 Norm we do some normalization before checking the distance uh that basically reduces the impact of the magnitude of the embeds you can consider it a midway between cosine and simple idian so to sum up if the generated
- Assistant
که در یک صفحه، نقطه A نمایانگر اولین ایمبد است و نقطه B نمایانگر دومین ایمبد. برای مشخص کردن اینکه چقدر به هم نزدیک هستند، میتوانم به سادگی نقاط را بهم متصل کنم و با کمک قضیه فیثاغورس، فاصله اقلیدسی را بدست آوریم. این روش بسیار ساده و موثر است اما تنها زمانی قابل اعتماد است که دو تصویر دارای تنظیمات مشابهی باشند، به عنوان مثال، موقعیت سر، حالت چهره، رنگها و غیره.
گزینه دیگر محاسبه فاصله کسینوسی است. میتوانم دو نقطه را به مبدا متصل کنم و دامنه این زاویه را محاسبه کنم. هرچه نقاط نزدیکتر باشند، زاویه کوچکتر خواهد بود و بنابراین ایمبدهای ما نزدیکتر به هم خواهند بود. در این مثال خاص، انتخاب بین فاصله اقلیدسی یا کسینوسی تفاوت زیادی ندارد و نتیجه تقریباً مشابه خواهد بود. اما اگر نقاط را به این صورت قرار دهم، فاصله اقلیدسی بین A و B بسیار بزرگ است ولی فاصله کسینوسی بسیار کوچک است. این بدان معنی است که فاصله کسینوسی ممکن است گزینه بهتری باشد وقتی تفاوت زیادی بین تصویر منبع و تصویر تولید شده وجود دارد. به عنوان مثال، اگر مرجع شما یک فرد واقعی باشد و تصویر تولید شده مانند یک نقاشی یا طراحی باشد.
حال اگر فاصله کسینوسی را انتخاب کنم، میبینید که فاصله نزدیکتر خواهد بود زیرا در ارزیابی شباهت، اندازه دو بردار را در نظر نمیگیریم. نرمالسازی L2 و اقلیدسی از نظر فنی مشابه هستند، با این تفاوت که در نرمالسازی L2 قبل از بررسی فاصله، مقداری نرمالسازی انجام میدهیم که اساساً تاثیر اندازه ایمبدها را کاهش میدهد. میتوانید آن را یک میانهرو بین کسینوسی و اقلیدسی ساده در نظر بگیرید.