small fixed and refactorings
This commit is contained in:
1 parent
d6a45763a2
commit
f3b343c0e5
9 files changed
+457
-148
No files matched your search
Binary file not shown.
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<?mso-application progid="Word.Document"?>
|
<?mso-application progid="Word.Document"?>
|
||||||
<pkg:package xmlns:pkg="http://schemas.microsoft.com/office/2006/xmlPackage"><pkg:part pkg:name="/_rels/.rels" pkg:contentType="application/vnd.openxmlformats-package.relationships+xml" pkg:padding="512"><pkg:xmlData><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml"/></Relationships></pkg:xmlData></pkg:part><pkg:part pkg:name="/word/_rels/document.xml.rels" pkg:contentType="application/vnd.openxmlformats-package.relationships+xml" pkg:padding="256"><pkg:xmlData><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId13" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image3.jpeg"/><Relationship Id="rId18" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image7.jpeg"/><Relationship Id="rId26" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image15.jpeg"/><Relationship Id="rId39" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image26.jpeg"/><Relationship Id="rId21" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image10.jpeg"/><Relationship Id="rId34" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image21.png"/><Relationship Id="rId42" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image29.jpeg"/><Relationship Id="rId47" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image34.jpeg"/><Relationship Id="rId50" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image37.jpeg"/><Relationship Id="rId55" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image42.jpeg"/><Relationship Id="rId63" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="https://www.youtube.com/channel/UCEtoVzBLuE-ni-54h7kYvsg" TargetMode="External"/><Relationship Id="rId68" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="https://findface.sex/ru" TargetMode="External"/><Relationship Id="rId7" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes" Target="endnotes.xml"/><Relationship Id="rId71" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="http://www.didshedoporn.com" TargetMode="External"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering" Target="numbering.xml"/><Relationship Id="rId16" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image5.jpeg"/><Relationship Id="rId29" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image16.png"/><Relationship Id="rId11" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="https://www.youtube.com/watch?v=K98nTNjXkq8" TargetMode="External"/><Relationship Id="rId24" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image13.jpeg"/><Relationship Id="rId32" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image19.png"/><Relationship Id="rId37" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image24.jpeg"/><Relationship Id="rId40" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image27.jpeg"/><Relationship Id="rId45" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image32.jpeg"/><Relationship Id="rId53" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image40.jpeg"/><Relationship Id="rId58" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image45.jpeg"/><Relationship Id="rId66" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="https://mega.nz/" TargetMode="External"/><Relationship Id="rId5" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings" Target="webSettings.xml"/><Relationship Id="rId15" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="https://www.youtube.com/wLine truncated
|
<pkg:package xmlns:pkg="http://schemas.microsoft.com/office/2006/xmlPackage"><pkg:part pkg:name="/_rels/.rels" pkg:contentType="application/vnd.openxmlformats-package.relationships+xml" pkg:padding="512"><pkg:xmlData><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml"/></Relationships></pkg:xmlData></pkg:part><pkg:part pkg:name="/word/_rels/document.xml.rels" pkg:contentType="application/vnd.openxmlformats-package.relationships+xml" pkg:padding="256"><pkg:xmlData><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId13" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image3.jpeg"/><Relationship Id="rId18" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image7.jpeg"/><Relationship Id="rId26" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image15.jpeg"/><Relationship Id="rId39" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image26.jpeg"/><Relationship Id="rId21" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image10.jpeg"/><Relationship Id="rId34" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image21.png"/><Relationship Id="rId42" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image29.jpeg"/><Relationship Id="rId47" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image34.jpeg"/><Relationship Id="rId50" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image37.jpeg"/><Relationship Id="rId55" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image42.jpeg"/><Relationship Id="rId63" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="https://www.youtube.com/channel/UCEtoVzBLuE-ni-54h7kYvsg" TargetMode="External"/><Relationship Id="rId68" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="https://findface.sex/ru" TargetMode="External"/><Relationship Id="rId7" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes" Target="endnotes.xml"/><Relationship Id="rId71" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="http://www.didshedoporn.com" TargetMode="External"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering" Target="numbering.xml"/><Relationship Id="rId16" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image5.jpeg"/><Relationship Id="rId29" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image16.png"/><Relationship Id="rId11" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="https://www.youtube.com/watch?v=K98nTNjXkq8" TargetMode="External"/><Relationship Id="rId24" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image13.jpeg"/><Relationship Id="rId32" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image19.png"/><Relationship Id="rId37" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image24.jpeg"/><Relationship Id="rId40" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image27.jpeg"/><Relationship Id="rId45" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image32.jpeg"/><Relationship Id="rId53" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image40.jpeg"/><Relationship Id="rId58" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/image45.jpeg"/><Relationship Id="rId66" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="https://mega.nz/" TargetMode="External"/><Relationship Id="rId5" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings" Target="webSettings.xml"/><Relationship Id="rId15" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="https://www.youtube.com/wLine truncated
|
||||||
BwcICQsJCAgKCAcHCg0KCgsMDAwMBwkODw0MDgsMDAz/2wBDAQICAgMDAwYDAwYMCAcIDAwMDAwM
|
BwcICQsJCAgKCAcHCg0KCgsMDAwMBwkODw0MDgsMDAz/2wBDAQICAgMDAwYDAwYMCAcIDAwMDAwM
|
||||||
DAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAz/wAARCACAAYADASIA
|
DAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAz/wAARCACAAYADASIA
|
||||||
AhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA
|
AhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA
|
||||||
@@ -46694,4 +46694,4 @@ AFzb+dfn3qP/AB8N/vGiivr8J/DifLYv4jQ8P9639I+81FFdByRE/wCW6/71P07/AI+R/vUUVUth
|
|||||||
z/yC5v8AcP8AKvx1/wCCmf8AyUD8/wCtFFc9TdmmX7r1PlWw/wCPdfxqRP8Aj7H0oorza2x9hT2P
|
z/yC5v8AcP8AKvx1/wCCmf8AyUD8/wCtFFc9TdmmX7r1PlWw/wCPdfxqRP8Aj7H0oorza2x9hT2P
|
||||||
o79ib/kaV+o/rX35oH/Ityf7o/kaKK4aXxI5cV1PyV/4Lpf8lY0P/rh/Wvz5vv8AXN/vUUV9fhPg
|
o79ib/kaV+o/rX35oH/Ityf7o/kaKK4aXxI5cV1PyV/4Lpf8lY0P/rh/Wvz5vv8AXN/vUUV9fhPg
|
||||||
PmsVui/pv3G+lbml/wCs/CiiunqckjM1T/kJJ9TV7QP9cv8Av0UVc9icP8Z2Fj/qV+prgPHH/IWX
|
PmsVui/pv3G+lbml/wCs/CiiunqckjM1T/kJJ9TV7QP9cv8Av0UVc9icP8Z2Fj/qV+prgPHH/IWX
|
||||||
/fH8xRRUQ6ndiNkf/9k=</pkg:binaryData></pkg:part><pkg:part pkg:name="/word/settings.xml" pkg:contentType="application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml"><pkg:xmlData><w:settings xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:sl="http://schemas.openxmlformats.org/schemaLibrary/2006/main"><w:zoom w:percent="121"/><w:proofState w:spelling="clean" w:grammar="clean"/><w:defaultTabStop w:val="708"/><w:characterSpacingControl w:val="doNotCompress"/><w:footnotePr><w:footnote w:id="-1"/><w:footnote w:id="0"/></w:footnotePr><w:endnotePr><w:endnote w:id="-1"/><w:endnote w:id="0"/></w:endnotePr><w:compat/><w:rsids><w:rsidRoot w:val="00E10DBF"/><w:rsid w:val="00004B5F"/><w:rsid w:val="00016CC0"/><w:rsid w:val="000417E3"/><w:rsid w:val="00055415"/><w:rsid w:val="00077F86"/><w:rsid w:val="000842E7"/><w:rsid w:val="0009473B"/><w:rsid w:val="000A27BD"/><w:rsid w:val="000E71B2"/><w:rsid w:val="000F2D49"/><w:rsid w:val="00106C37"/><w:rsid w:val="001210B4"/><w:rsid w:val="00137F66"/><w:rsid w:val="0015335E"/><w:rsid w:val="00161C5C"/><w:rsid w:val="00165215"/><w:rsid w:val="00165452"/><w:rsid w:val="001669E1"/><w:rsid w:val="00181BF3"/><w:rsid w:val="00184105"/><w:rsid w:val="001859CD"/><w:rsid w:val="00194534"/><w:rsid w:val="001A2430"/><w:rsid w:val="001A3E5E"/><w:rsid w:val="001E5F16"/><w:rsid w:val="001F29C1"/><w:rsid w:val="001F53AC"/><w:rsid w:val="0020242A"/><w:rsid w:val="00204E67"/><w:rsid w:val="00205480"/><w:rsid w:val="0024715F"/><w:rsid w:val="00270A62"/><w:rsid w:val="00273C1A"/><w:rsid w:val="00274999"/><w:rsid w:val="00286856"/><w:rsid w:val="002B4C32"/><w:rsid w:val="002B5C75"/><w:rsid w:val="002B611A"/><w:rsid w:val="002F77A7"/><w:rsid w:val="0030230B"/><w:rsid w:val="00307A0A"/><w:rsid w:val="00313CBC"/><w:rsid w:val="00315AC5"/><w:rsid w:val="00331ABA"/><w:rsid w:val="00335F3F"/><w:rsid w:val="003524B3"/><w:rsid w:val="00352CE7"/><w:rsid w:val="003D4BA3"/><w:rsid w:val="003E5AF0"/><w:rsid w:val="003F5CE1"/><w:rsid w:val="00406585"/><w:rsid w:val="004136FF"/><w:rsid w:val="00413F20"/><w:rsid w:val="00417EED"/><w:rsid w:val="00451F02"/><w:rsid w:val="00454E80"/><w:rsid w:val="00455384"/><w:rsid w:val="00472F89"/><w:rsid w:val="0047370D"/><w:rsid w:val="00476A25"/><w:rsid w:val="00492EC5"/><w:rsid w:val="00493375"/><w:rsid w:val="004C1881"/><w:rsid w:val="004D5D8D"/><w:rsid w:val="0050061D"/><w:rsid w:val="0050517C"/><w:rsid w:val="00512D72"/><w:rsid w:val="00515CD5"/><w:rsid w:val="00516367"/><w:rsid w:val="0055469B"/><w:rsid w:val="00555D9F"/><w:rsid w:val="00560C4B"/><w:rsid w:val="00592046"/><w:rsid w:val="005B3CF4"/><w:rsid w:val="005C0319"/><w:rsid w:val="005E135C"/><w:rsid w:val="00623EBD"/><w:rsid w:val="00626497"/><w:rsid w:val="00632245"/><w:rsid w:val="00642E82"/><w:rsid w:val="006450DC"/><w:rsid w:val="006851AC"/><w:rsid w:val="00687453"/><w:rsid w:val="0069635A"/><w:rsid w:val="006B6ECC"/><w:rsid w:val="006C4316"/><w:rsid w:val="006E4953"/><w:rsid w:val="006E73B4"/><w:rsid w:val="006F065C"/><w:rsid w:val="006F2E25"/><w:rsid w:val="006F4A36"/><w:rsid w:val="00706028"/><w:rsid w:val="00724F4B"/><w:rsid w:val="007413CA"/><w:rsid w:val="00742098"/><w:rsid w:val="00777099"/><w:rsid w:val="00780652"/><w:rsid w:val="00781259"/><w:rsid w:val="0078507E"/><w:rsid w:val="0079365E"/><w:rsid w:val="00793670"/><w:rsid w:val="007A3909"/><w:rsid w:val="007A4114"/><w:rsid w:val="007B4527"/><w:rsid w:val="007C214A"/><w:rsid w:val="007C2FC8"/><w:rsid w:val="007C789D"/><w:rsid w:val="007F4FBE"/><w:rsid w:val="007F534C"/><w:rsid w:val="007F6BA6"/><w:rsid w:val="00821E81"/><w:rsid w:val="00841F3C"/><w:rsid w:val="00842D29"/><w:rsid w:val="008434DD"/><w:rsid w:val="008734FE"/><w:rsid w:val="00891063"/><w:rsid w:val="0089777E"/><w:rsid w:val="008C74B7"/><w:rsid w:val="008E0140"/><w:rsid w:val="008E66E8"/><w:rsid w:val="008E6B14"/><w:rsid w:val="00903986"/><w:rsid w:val="00934ACC"/><w:rsid w:val="00961264"/><w:rsid w:val="0097347E"/><w:rsid w:val="009E7562"/><w:rsid w:val="00A17244"/><w:rsid w:val="00A27D6A"/><w:rsid w:val="00A33F61"/><w:rsid w:val="00A546B5"/><w:rsid w:val="00B12F44"/><w:rsid w:val="00B317AB"/><w:rsid w:val="00B418FF"/><w:rsid w:val="00B847DD"/><w:rsid w:val="00BA3120"/><w:rsid w:val="00BB00A0"/><w:rsid w:val="00BC47FD"/><w:rsid w:val="00BD1B64"/><w:rsid w:val="00BD5D36"/><w:rsid w:val="00BD734E"/><w:rsid w:val="00BF604A"/><w:rsid w:val="00C322EA"/><w:rsid w:val="00C41575"/><w:rsid w:val="00C41E8D"/><w:rsid w:val="00C83A19"/><w:rsid w:val="00C97C22"/><w:rsid w:val="00CA0FB7"/><w:rsid w:val="00CA67DB"/><w:rsid w:val="00CA762D"/><w:rsid w:val="00CB78C6"/><w:rsid w:val="00CC4A98"/><w:rsid w:val="00D037CD"/><w:rsid w:val="00D05E5B"/><w:rsid w:val="00D11EEA"/><w:rsid wLine truncated
|
/fH8xRRUQ6ndiNkf/9k=</pkg:binaryData></pkg:part><pkg:part pkg:name="/word/settings.xml" pkg:contentType="application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml"><pkg:xmlData><w:settings xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:sl="http://schemas.openxmlformats.org/schemaLibrary/2006/main"><w:zoom w:percent="121"/><w:proofState w:spelling="clean" w:grammar="clean"/><w:defaultTabStop w:val="708"/><w:characterSpacingControl w:val="doNotCompress"/><w:footnotePr><w:footnote w:id="-1"/><w:footnote w:id="0"/></w:footnotePr><w:endnotePr><w:endnote w:id="-1"/><w:endnote w:id="0"/></w:endnotePr><w:compat/><w:rsids><w:rsidRoot w:val="00E10DBF"/><w:rsid w:val="00004B5F"/><w:rsid w:val="00016CC0"/><w:rsid w:val="000417E3"/><w:rsid w:val="00055415"/><w:rsid w:val="00077F86"/><w:rsid w:val="000842E7"/><w:rsid w:val="0009473B"/><w:rsid w:val="000A27BD"/><w:rsid w:val="000E71B2"/><w:rsid w:val="000F2D49"/><w:rsid w:val="00106C37"/><w:rsid w:val="001210B4"/><w:rsid w:val="0013009D"/><w:rsid w:val="00137F66"/><w:rsid w:val="0015335E"/><w:rsid w:val="00161C5C"/><w:rsid w:val="00165215"/><w:rsid w:val="00165452"/><w:rsid w:val="001669E1"/><w:rsid w:val="00181BF3"/><w:rsid w:val="00184105"/><w:rsid w:val="001859CD"/><w:rsid w:val="00194534"/><w:rsid w:val="001A2430"/><w:rsid w:val="001A3E5E"/><w:rsid w:val="001E5F16"/><w:rsid w:val="001F29C1"/><w:rsid w:val="001F53AC"/><w:rsid w:val="0020242A"/><w:rsid w:val="00204E67"/><w:rsid w:val="00205480"/><w:rsid w:val="0024715F"/><w:rsid w:val="00270A62"/><w:rsid w:val="00273C1A"/><w:rsid w:val="00274999"/><w:rsid w:val="00286856"/><w:rsid w:val="002B4C32"/><w:rsid w:val="002B5C75"/><w:rsid w:val="002B611A"/><w:rsid w:val="002F77A7"/><w:rsid w:val="0030230B"/><w:rsid w:val="00307A0A"/><w:rsid w:val="00313CBC"/><w:rsid w:val="00315AC5"/><w:rsid w:val="00331ABA"/><w:rsid w:val="00335F3F"/><w:rsid w:val="003524B3"/><w:rsid w:val="00352CE7"/><w:rsid w:val="003D04DE"/><w:rsid w:val="003D4BA3"/><w:rsid w:val="003E5AF0"/><w:rsid w:val="003F5CE1"/><w:rsid w:val="00406585"/><w:rsid w:val="004136FF"/><w:rsid w:val="00413F20"/><w:rsid w:val="00417EED"/><w:rsid w:val="00451F02"/><w:rsid w:val="00454E80"/><w:rsid w:val="00455384"/><w:rsid w:val="00472F89"/><w:rsid w:val="0047370D"/><w:rsid w:val="00476A25"/><w:rsid w:val="00492EC5"/><w:rsid w:val="00493375"/><w:rsid w:val="004C1881"/><w:rsid w:val="004D5D8D"/><w:rsid w:val="0050061D"/><w:rsid w:val="0050517C"/><w:rsid w:val="00512D72"/><w:rsid w:val="00515CD5"/><w:rsid w:val="00516367"/><w:rsid w:val="0055469B"/><w:rsid w:val="00555D9F"/><w:rsid w:val="00560C4B"/><w:rsid w:val="00592046"/><w:rsid w:val="005B3CF4"/><w:rsid w:val="005C0319"/><w:rsid w:val="005E135C"/><w:rsid w:val="00623EBD"/><w:rsid w:val="00626497"/><w:rsid w:val="00632245"/><w:rsid w:val="00642E82"/><w:rsid w:val="006450DC"/><w:rsid w:val="006851AC"/><w:rsid w:val="00687453"/><w:rsid w:val="0069635A"/><w:rsid w:val="006B6ECC"/><w:rsid w:val="006C4316"/><w:rsid w:val="006E4953"/><w:rsid w:val="006E73B4"/><w:rsid w:val="006F065C"/><w:rsid w:val="006F2E25"/><w:rsid w:val="006F4A36"/><w:rsid w:val="00706028"/><w:rsid w:val="00724F4B"/><w:rsid w:val="007413CA"/><w:rsid w:val="00742098"/><w:rsid w:val="00777099"/><w:rsid w:val="00780652"/><w:rsid w:val="00781259"/><w:rsid w:val="0078507E"/><w:rsid w:val="0079365E"/><w:rsid w:val="00793670"/><w:rsid w:val="007A3909"/><w:rsid w:val="007A4114"/><w:rsid w:val="007B4527"/><w:rsid w:val="007C214A"/><w:rsid w:val="007C2FC8"/><w:rsid w:val="007C789D"/><w:rsid w:val="007F4FBE"/><w:rsid w:val="007F534C"/><w:rsid w:val="007F6BA6"/><w:rsid w:val="00821E81"/><w:rsid w:val="00841F3C"/><w:rsid w:val="00842D29"/><w:rsid w:val="008434DD"/><w:rsid w:val="008734FE"/><w:rsid w:val="00891063"/><w:rsid w:val="0089777E"/><w:rsid w:val="008C74B7"/><w:rsid w:val="008E0140"/><w:rsid w:val="008E66E8"/><w:rsid w:val="008E6B14"/><w:rsid w:val="00903986"/><w:rsid w:val="00934ACC"/><w:rsid w:val="00961264"/><w:rsid w:val="0097347E"/><w:rsid w:val="009E7562"/><w:rsid w:val="00A01E4C"/><w:rsid w:val="00A17244"/><w:rsid w:val="00A27D6A"/><w:rsid w:val="00A33F61"/><w:rsid w:val="00A546B5"/><w:rsid w:val="00B12F44"/><w:rsid w:val="00B317AB"/><w:rsid w:val="00B418FF"/><w:rsid w:val="00B847DD"/><w:rsid w:val="00BA3120"/><w:rsid w:val="00BB00A0"/><w:rsid w:val="00BC47FD"/><w:rsid w:val="00BD1B64"/><w:rsid w:val="00BD5D36"/><w:rsid w:val="00BD734E"/><w:rsid w:val="00BF604A"/><w:rsid w:val="00C322EA"/><w:rsid w:val="00C41575"/><w:rsid w:val="00C41E8D"/><w:rsid w:val="00C83A19"/><w:rsid w:val="00C97C22"/><w:rsid w:val="00CA0FB7"/><w:rsid w:val="00CA67DB"/><w:rsid w:val="00CA762D"/><w:rsid w:val="00CB78C6"/><w:rsid w:val="00CC4A98"/><w:rsid wLine truncated
|
||||||
@@ -282,7 +282,6 @@ def mirror_landmarks (landmarks, val):
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
def draw_landmarks (image, image_landmarks, color=(0,255,0), transparent_mask=False):
|
def draw_landmarks (image, image_landmarks, color=(0,255,0), transparent_mask=False):
|
||||||
image = image.copy()
|
|
||||||
if len(image_landmarks) != 68:
|
if len(image_landmarks) != 68:
|
||||||
raise Exception('get_image_eye_mask works only with 68 landmarks')
|
raise Exception('get_image_eye_mask works only with 68 landmarks')
|
||||||
|
|
||||||
@@ -309,17 +308,15 @@ def draw_landmarks (image, image_landmarks, color=(0,255,0), transparent_mask=Fa
|
|||||||
|
|
||||||
if transparent_mask:
|
if transparent_mask:
|
||||||
mask = get_image_hull_mask (image.shape, image_landmarks)
|
mask = get_image_hull_mask (image.shape, image_landmarks)
|
||||||
image = image * (1-mask) + image * mask / 2
|
image[...] = ( image * (1-mask) + image * mask / 2 )[...]
|
||||||
return image
|
|
||||||
|
|
||||||
def draw_rect_landmarks (image, rect, image_landmarks, face_size, face_type, transparent_mask=False):
|
def draw_rect_landmarks (image, rect, image_landmarks, face_size, face_type, transparent_mask=False):
|
||||||
image = draw_landmarks(image, image_landmarks, transparent_mask=transparent_mask)
|
draw_landmarks(image, image_landmarks, transparent_mask=transparent_mask)
|
||||||
image_utils.draw_rect (image, rect, (255,0,0), 2 )
|
image_utils.draw_rect (image, rect, (255,0,0), 2 )
|
||||||
|
|
||||||
image_to_face_mat = get_transform_mat (image_landmarks, face_size, face_type)
|
image_to_face_mat = get_transform_mat (image_landmarks, face_size, face_type)
|
||||||
points = transform_points ( [ (0,0), (0,face_size-1), (face_size-1, face_size-1), (face_size-1,0) ], image_to_face_mat, True)
|
points = transform_points ( [ (0,0), (0,face_size-1), (face_size-1, face_size-1), (face_size-1,0) ], image_to_face_mat, True)
|
||||||
image_utils.draw_polygon (image, points, (0,0,255), 2)
|
image_utils.draw_polygon (image, points, (0,0,255), 2)
|
||||||
return image
|
|
||||||
|
|
||||||
def calc_face_pitch(landmarks):
|
def calc_face_pitch(landmarks):
|
||||||
if not isinstance(landmarks, np.ndarray):
|
if not isinstance(landmarks, np.ndarray):
|
||||||
|
|||||||
+123
-104
@@ -79,93 +79,106 @@ class ExtractSubprocessor(Subprocessor):
|
|||||||
image = self.cached_image[1]
|
image = self.cached_image[1]
|
||||||
else:
|
else:
|
||||||
image = cv2_imread( filename_path_str )
|
image = cv2_imread( filename_path_str )
|
||||||
h, w, ch = image.shape
|
|
||||||
|
if image is None:
|
||||||
|
self.log_err ( 'Failed to extract %s, reason: cv2_imread() fail.' % ( str(filename_path) ) )
|
||||||
|
return None
|
||||||
|
|
||||||
|
image_shape = image.shape
|
||||||
|
if len(image_shape) == 2:
|
||||||
|
h, w = image.shape
|
||||||
|
ch = 1
|
||||||
|
else:
|
||||||
|
h, w, ch = image.shape
|
||||||
|
|
||||||
|
if ch == 1:
|
||||||
|
image = np.repeat ( image [:,:,np.newaxis], 3, -1 )
|
||||||
|
elif ch == 4:
|
||||||
|
image = image[:,:,0:3]
|
||||||
|
|
||||||
wm = w % 2
|
wm = w % 2
|
||||||
hm = h % 2
|
hm = h % 2
|
||||||
if wm + hm != 0: #fix odd image
|
if wm + hm != 0: #fix odd image
|
||||||
image = image[0:h-hm,0:w-wm,:]
|
image = image[0:h-hm,0:w-wm,:]
|
||||||
self.cached_image = ( filename_path_str, image )
|
self.cached_image = ( filename_path_str, image )
|
||||||
|
|
||||||
if image is None:
|
if self.type == 'rects':
|
||||||
self.log_err ( 'Failed to extract %s, reason: cv2_imread() fail.' % ( str(filename_path) ) )
|
h, w, ch = image.shape
|
||||||
else:
|
if min(w,h) < 128:
|
||||||
if self.type == 'rects':
|
self.log_err ( 'Image is too small %s : [%d, %d]' % ( str(filename_path), w, h ) )
|
||||||
h, w, ch = image.shape
|
rects = []
|
||||||
if min(w,h) < 128:
|
else:
|
||||||
self.log_err ( 'Image is too small %s : [%d, %d]' % ( str(filename_path), w, h ) )
|
rects = self.e.extract_from_bgr (image)
|
||||||
rects = []
|
|
||||||
|
return [str(filename_path), rects]
|
||||||
|
|
||||||
|
elif self.type == 'landmarks':
|
||||||
|
rects = data[1]
|
||||||
|
landmarks = self.e.extract_from_bgr (image, rects)
|
||||||
|
return [str(filename_path), landmarks]
|
||||||
|
|
||||||
|
elif self.type == 'final':
|
||||||
|
src_dflimg = None
|
||||||
|
(h,w,c) = image.shape
|
||||||
|
if h == w:
|
||||||
|
#extracting from already extracted jpg image?
|
||||||
|
if filename_path.suffix == '.jpg':
|
||||||
|
src_dflimg = DFLJPG.load ( str(filename_path) )
|
||||||
|
|
||||||
|
result = []
|
||||||
|
faces = data[1]
|
||||||
|
|
||||||
|
if self.debug:
|
||||||
|
debug_output_file = '{}{}'.format( str(Path(str(self.output_path) + '_debug') / filename_path.stem), '.jpg')
|
||||||
|
debug_image = image.copy()
|
||||||
|
|
||||||
|
face_idx = 0
|
||||||
|
for face in faces:
|
||||||
|
rect = np.array(face[0])
|
||||||
|
image_landmarks = np.array(face[1])
|
||||||
|
|
||||||
|
if self.face_type == FaceType.MARK_ONLY:
|
||||||
|
face_image = image
|
||||||
|
face_image_landmarks = image_landmarks
|
||||||
else:
|
else:
|
||||||
rects = self.e.extract_from_bgr (image)
|
image_to_face_mat = LandmarksProcessor.get_transform_mat (image_landmarks, self.image_size, self.face_type)
|
||||||
|
face_image = cv2.warpAffine(image, image_to_face_mat, (self.image_size, self.image_size), cv2.INTER_LANCZOS4)
|
||||||
|
face_image_landmarks = LandmarksProcessor.transform_points (image_landmarks, image_to_face_mat)
|
||||||
|
|
||||||
return [str(filename_path), rects]
|
landmarks_bbox = LandmarksProcessor.transform_points ( [ (0,0), (0,self.image_size-1), (self.image_size-1, self.image_size-1), (self.image_size-1,0) ], image_to_face_mat, True)
|
||||||
|
|
||||||
elif self.type == 'landmarks':
|
rect_area = mathlib.polygon_area(np.array(rect[[0,2,2,0]]), np.array(rect[[1,1,3,3]]))
|
||||||
rects = data[1]
|
landmarks_area = mathlib.polygon_area(landmarks_bbox[:,0], landmarks_bbox[:,1] )
|
||||||
landmarks = self.e.extract_from_bgr (image, rects)
|
|
||||||
return [str(filename_path), landmarks]
|
|
||||||
|
|
||||||
elif self.type == 'final':
|
if landmarks_area > 4*rect_area: #get rid of faces which umeyama-landmark-area > 4*detector-rect-area
|
||||||
src_dflimg = None
|
continue
|
||||||
(h,w,c) = image.shape
|
|
||||||
if h == w:
|
|
||||||
#extracting from already extracted jpg image?
|
|
||||||
if filename_path.suffix == '.jpg':
|
|
||||||
src_dflimg = DFLJPG.load ( str(filename_path) )
|
|
||||||
|
|
||||||
result = []
|
|
||||||
faces = data[1]
|
|
||||||
|
|
||||||
if self.debug:
|
if self.debug:
|
||||||
debug_output_file = '{}{}'.format( str(Path(str(self.output_path) + '_debug') / filename_path.stem), '.jpg')
|
LandmarksProcessor.draw_rect_landmarks (debug_image, rect, image_landmarks, self.image_size, self.face_type, transparent_mask=True)
|
||||||
debug_image = image.copy()
|
|
||||||
|
|
||||||
face_idx = 0
|
output_file = '{}_{}{}'.format(str(self.output_path / filename_path.stem), str(face_idx), '.jpg')
|
||||||
for face in faces:
|
face_idx += 1
|
||||||
rect = np.array(face[0])
|
|
||||||
image_landmarks = np.array(face[1])
|
|
||||||
|
|
||||||
if self.face_type == FaceType.MARK_ONLY:
|
if src_dflimg is not None:
|
||||||
face_image = image
|
#if extracting from dflimg just copy it in order not to lose quality
|
||||||
face_image_landmarks = image_landmarks
|
shutil.copy ( str(filename_path), str(output_file) )
|
||||||
else:
|
else:
|
||||||
image_to_face_mat = LandmarksProcessor.get_transform_mat (image_landmarks, self.image_size, self.face_type)
|
cv2_imwrite(output_file, face_image, [int(cv2.IMWRITE_JPEG_QUALITY), 85] )
|
||||||
face_image = cv2.warpAffine(image, image_to_face_mat, (self.image_size, self.image_size), cv2.INTER_LANCZOS4)
|
|
||||||
face_image_landmarks = LandmarksProcessor.transform_points (image_landmarks, image_to_face_mat)
|
|
||||||
|
|
||||||
landmarks_bbox = LandmarksProcessor.transform_points ( [ (0,0), (0,self.image_size-1), (self.image_size-1, self.image_size-1), (self.image_size-1,0) ], image_to_face_mat, True)
|
DFLJPG.embed_data(output_file, face_type = FaceType.toString(self.face_type),
|
||||||
|
landmarks = face_image_landmarks.tolist(),
|
||||||
|
source_filename = filename_path.name,
|
||||||
|
source_rect= rect,
|
||||||
|
source_landmarks = image_landmarks.tolist()
|
||||||
|
)
|
||||||
|
|
||||||
rect_area = mathlib.polygon_area(np.array(rect[[0,2,2,0]]), np.array(rect[[1,1,3,3]]))
|
result.append (output_file)
|
||||||
landmarks_area = mathlib.polygon_area(landmarks_bbox[:,0], landmarks_bbox[:,1] )
|
|
||||||
|
|
||||||
if landmarks_area > 4*rect_area: #get rid of faces which umeyama-landmark-area > 4*detector-rect-area
|
if self.debug:
|
||||||
continue
|
cv2_imwrite(debug_output_file, debug_image, [int(cv2.IMWRITE_JPEG_QUALITY), 50] )
|
||||||
|
|
||||||
if self.debug:
|
return result
|
||||||
debug_image = LandmarksProcessor.draw_rect_landmarks (debug_image, rect, image_landmarks, self.image_size, self.face_type, transparent_mask=True)
|
|
||||||
|
|
||||||
output_file = '{}_{}{}'.format(str(self.output_path / filename_path.stem), str(face_idx), '.jpg')
|
|
||||||
face_idx += 1
|
|
||||||
|
|
||||||
if src_dflimg is not None:
|
|
||||||
#if extracting from dflimg just copy it in order not to lose quality
|
|
||||||
shutil.copy ( str(filename_path), str(output_file) )
|
|
||||||
else:
|
|
||||||
cv2_imwrite(output_file, face_image, [int(cv2.IMWRITE_JPEG_QUALITY), 85] )
|
|
||||||
|
|
||||||
DFLJPG.embed_data(output_file, face_type = FaceType.toString(self.face_type),
|
|
||||||
landmarks = face_image_landmarks.tolist(),
|
|
||||||
source_filename = filename_path.name,
|
|
||||||
source_rect= rect,
|
|
||||||
source_landmarks = image_landmarks.tolist()
|
|
||||||
)
|
|
||||||
|
|
||||||
result.append (output_file)
|
|
||||||
|
|
||||||
if self.debug:
|
|
||||||
cv2_imwrite(debug_output_file, debug_image, [int(cv2.IMWRITE_JPEG_QUALITY), 50] )
|
|
||||||
|
|
||||||
return result
|
|
||||||
return None
|
|
||||||
|
|
||||||
#overridable
|
#overridable
|
||||||
def get_data_name (self, data):
|
def get_data_name (self, data):
|
||||||
@@ -208,7 +221,7 @@ class ExtractSubprocessor(Subprocessor):
|
|||||||
self.y = 0
|
self.y = 0
|
||||||
self.rect_size = 100
|
self.rect_size = 100
|
||||||
self.rect_locked = False
|
self.rect_locked = False
|
||||||
self.redraw_needed = True
|
self.extract_needed = True
|
||||||
|
|
||||||
io.progress_bar (None, len (self.input_data))
|
io.progress_bar (None, len (self.input_data))
|
||||||
|
|
||||||
@@ -277,13 +290,12 @@ class ExtractSubprocessor(Subprocessor):
|
|||||||
if len (self.input_data) > 0:
|
if len (self.input_data) > 0:
|
||||||
return self.input_data.pop(0)
|
return self.input_data.pop(0)
|
||||||
else:
|
else:
|
||||||
skip_remaining = False
|
|
||||||
allow_remark_faces = False
|
allow_remark_faces = False
|
||||||
while len (self.input_data) > 0:
|
while len (self.input_data) > 0:
|
||||||
data = self.input_data[0]
|
data = self.input_data[0]
|
||||||
filename, faces = data
|
filename, faces = data
|
||||||
is_frame_done = False
|
is_frame_done = False
|
||||||
go_to_prev_frame = False
|
|
||||||
|
|
||||||
# Can we mark an image that already has a marked face?
|
# Can we mark an image that already has a marked face?
|
||||||
if allow_remark_faces:
|
if allow_remark_faces:
|
||||||
@@ -291,10 +303,9 @@ class ExtractSubprocessor(Subprocessor):
|
|||||||
# If there was already a face then lock the rectangle to it until the mouse is clicked
|
# If there was already a face then lock the rectangle to it until the mouse is clicked
|
||||||
if len(faces) > 0:
|
if len(faces) > 0:
|
||||||
self.rect, self.landmarks = faces.pop()
|
self.rect, self.landmarks = faces.pop()
|
||||||
|
|
||||||
self.rect_locked = True
|
|
||||||
self.redraw_needed = True
|
|
||||||
faces.clear()
|
faces.clear()
|
||||||
|
self.extract_needed = True
|
||||||
|
self.rect_locked = True
|
||||||
self.rect_size = ( self.rect[2] - self.rect[0] ) / 2
|
self.rect_size = ( self.rect[2] - self.rect[0] ) / 2
|
||||||
self.x = ( self.rect[0] + self.rect[2] ) / 2
|
self.x = ( self.rect[0] + self.rect[2] ) / 2
|
||||||
self.y = ( self.rect[1] + self.rect[3] ) / 2
|
self.y = ( self.rect[1] + self.rect[3] ) / 2
|
||||||
@@ -333,6 +344,8 @@ class ExtractSubprocessor(Subprocessor):
|
|||||||
self.cache_text_lines_img = (sh, self.text_lines_img)
|
self.cache_text_lines_img = (sh, self.text_lines_img)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
|
io.process_messages(0.0001)
|
||||||
|
|
||||||
new_x = self.x
|
new_x = self.x
|
||||||
new_y = self.y
|
new_y = self.y
|
||||||
new_rect_size = self.rect_size
|
new_rect_size = self.rect_size
|
||||||
@@ -346,7 +359,7 @@ class ExtractSubprocessor(Subprocessor):
|
|||||||
new_rect_size = max (5, new_rect_size + diff*mod)
|
new_rect_size = max (5, new_rect_size + diff*mod)
|
||||||
elif ev == io.EVENT_LBUTTONDOWN:
|
elif ev == io.EVENT_LBUTTONDOWN:
|
||||||
self.rect_locked = not self.rect_locked
|
self.rect_locked = not self.rect_locked
|
||||||
self.redraw_needed = True
|
self.extract_needed = True
|
||||||
elif not self.rect_locked:
|
elif not self.rect_locked:
|
||||||
new_x = np.clip (x, 0, w-1) / self.view_scale
|
new_x = np.clip (x, 0, w-1) / self.view_scale
|
||||||
new_y = np.clip (y, 0, h-1) / self.view_scale
|
new_y = np.clip (y, 0, h-1) / self.view_scale
|
||||||
@@ -355,28 +368,47 @@ class ExtractSubprocessor(Subprocessor):
|
|||||||
key, = key_events[-1] if len(key_events) > 0 else (0,)
|
key, = key_events[-1] if len(key_events) > 0 else (0,)
|
||||||
|
|
||||||
if key == ord('\r') or key == ord('\n'):
|
if key == ord('\r') or key == ord('\n'):
|
||||||
faces.append ( [(self.rect), self.landmarks] )
|
#confirm frame
|
||||||
is_frame_done = True
|
is_frame_done = True
|
||||||
|
faces.append ( [(self.rect), self.landmarks] )
|
||||||
|
|
||||||
break
|
break
|
||||||
elif key == ord(' '):
|
elif key == ord(' '):
|
||||||
is_frame_done = True
|
#confirm skip frame
|
||||||
break
|
|
||||||
elif key == ord('.'):
|
|
||||||
allow_remark_faces = True
|
|
||||||
# Only save the face if the rect is still locked
|
|
||||||
if self.rect_locked:
|
|
||||||
faces.append ( [(self.rect), self.landmarks] )
|
|
||||||
is_frame_done = True
|
is_frame_done = True
|
||||||
break
|
break
|
||||||
elif key == ord(',') and len(self.result) > 0:
|
elif key == ord(',') and len(self.result) > 0:
|
||||||
# Only save the face if the rect is still locked
|
#go prev frame
|
||||||
|
|
||||||
if self.rect_locked:
|
if self.rect_locked:
|
||||||
|
# Only save the face if the rect is still locked
|
||||||
|
faces.append ( [(self.rect), self.landmarks] )
|
||||||
|
|
||||||
|
self.input_data.insert(0, self.result.pop() )
|
||||||
|
io.progress_bar_inc(-1)
|
||||||
|
allow_remark_faces = True
|
||||||
|
self.extract_needed = True
|
||||||
|
self.rect_locked = False
|
||||||
|
|
||||||
|
break
|
||||||
|
elif key == ord('.'):
|
||||||
|
#go next frame
|
||||||
|
is_frame_done = True
|
||||||
|
allow_remark_faces = True
|
||||||
|
if self.rect_locked:
|
||||||
|
# Only save the face if the rect is still locked
|
||||||
faces.append ( [(self.rect), self.landmarks] )
|
faces.append ( [(self.rect), self.landmarks] )
|
||||||
go_to_prev_frame = True
|
|
||||||
break
|
break
|
||||||
elif key == ord('q'):
|
elif key == ord('q'):
|
||||||
skip_remaining = True
|
#skip remaining
|
||||||
|
if self.rect_locked:
|
||||||
|
faces.append ( [(self.rect), self.landmarks] )
|
||||||
|
while len(self.input_data) > 0:
|
||||||
|
self.result.append( self.input_data.pop(0) )
|
||||||
|
io.progress_bar_inc(1)
|
||||||
|
|
||||||
break
|
break
|
||||||
|
|
||||||
elif key == ord('h'):
|
elif key == ord('h'):
|
||||||
self.hide_help = not self.hide_help
|
self.hide_help = not self.hide_help
|
||||||
break
|
break
|
||||||
@@ -384,7 +416,7 @@ class ExtractSubprocessor(Subprocessor):
|
|||||||
if self.x != new_x or \
|
if self.x != new_x or \
|
||||||
self.y != new_y or \
|
self.y != new_y or \
|
||||||
self.rect_size != new_rect_size or \
|
self.rect_size != new_rect_size or \
|
||||||
self.redraw_needed:
|
self.extract_needed:
|
||||||
self.x = new_x
|
self.x = new_x
|
||||||
self.y = new_y
|
self.y = new_y
|
||||||
self.rect_size = new_rect_size
|
self.rect_size = new_rect_size
|
||||||
@@ -396,7 +428,6 @@ class ExtractSubprocessor(Subprocessor):
|
|||||||
|
|
||||||
return [filename, [self.rect]]
|
return [filename, [self.rect]]
|
||||||
|
|
||||||
io.process_messages(0.0001)
|
|
||||||
else:
|
else:
|
||||||
is_frame_done = True
|
is_frame_done = True
|
||||||
|
|
||||||
@@ -404,20 +435,8 @@ class ExtractSubprocessor(Subprocessor):
|
|||||||
self.result.append ( data )
|
self.result.append ( data )
|
||||||
self.input_data.pop(0)
|
self.input_data.pop(0)
|
||||||
io.progress_bar_inc(1)
|
io.progress_bar_inc(1)
|
||||||
self.redraw_needed = True
|
self.extract_needed = True
|
||||||
self.rect_locked = False
|
self.rect_locked = False
|
||||||
elif go_to_prev_frame:
|
|
||||||
self.input_data.insert(0, self.result.pop() )
|
|
||||||
io.progress_bar_inc(-1)
|
|
||||||
allow_remark_faces = True
|
|
||||||
self.redraw_needed = True
|
|
||||||
self.rect_locked = False
|
|
||||||
elif skip_remaining:
|
|
||||||
if self.rect_locked:
|
|
||||||
faces.append ( [(self.rect), self.landmarks] )
|
|
||||||
while len(self.input_data) > 0:
|
|
||||||
self.result.append( self.input_data.pop(0) )
|
|
||||||
io.progress_bar_inc(1)
|
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@@ -457,11 +476,11 @@ class ExtractSubprocessor(Subprocessor):
|
|||||||
image = cv2.warpAffine(image, mat,(w,h) )
|
image = cv2.warpAffine(image, mat,(w,h) )
|
||||||
view_landmarks = LandmarksProcessor.transform_points (view_landmarks, mat)
|
view_landmarks = LandmarksProcessor.transform_points (view_landmarks, mat)
|
||||||
|
|
||||||
image = LandmarksProcessor.draw_rect_landmarks (image, view_rect, view_landmarks, self.image_size, self.face_type)
|
LandmarksProcessor.draw_rect_landmarks (image, view_rect, view_landmarks, self.image_size, self.face_type)
|
||||||
|
|
||||||
if self.rect_locked:
|
if self.rect_locked:
|
||||||
image = LandmarksProcessor.draw_landmarks(image, view_landmarks, (255,255,0) )
|
LandmarksProcessor.draw_landmarks(image, view_landmarks, (255,255,0) )
|
||||||
self.redraw_needed = False
|
self.extract_needed = False
|
||||||
|
|
||||||
io.show_image (self.wnd_name, image)
|
io.show_image (self.wnd_name, image)
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -0,0 +1,287 @@
|
|||||||
|
import traceback
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import time
|
||||||
|
import numpy as np
|
||||||
|
import numpy.linalg as npl
|
||||||
|
|
||||||
|
import cv2
|
||||||
|
from pathlib import Path
|
||||||
|
from interact import interact as io
|
||||||
|
from utils.cv2_utils import *
|
||||||
|
from utils import Path_utils
|
||||||
|
from utils.DFLPNG import DFLPNG
|
||||||
|
from utils.DFLJPG import DFLJPG
|
||||||
|
from facelib import LandmarksProcessor
|
||||||
|
|
||||||
|
def main(input_dir, output_dir):
|
||||||
|
input_path = Path(input_dir)
|
||||||
|
output_path = Path(output_dir)
|
||||||
|
|
||||||
|
if not input_path.exists():
|
||||||
|
raise ValueError('Input directory not found. Please ensure it exists.')
|
||||||
|
|
||||||
|
if not output_path.exists():
|
||||||
|
output_path.mkdir(parents=True)
|
||||||
|
|
||||||
|
wnd_name = "Labeling tool"
|
||||||
|
io.named_window (wnd_name)
|
||||||
|
io.capture_mouse(wnd_name)
|
||||||
|
io.capture_keys(wnd_name)
|
||||||
|
|
||||||
|
#for filename in io.progress_bar_generator (Path_utils.get_image_paths(input_path), desc="Labeling"):
|
||||||
|
for filename in Path_utils.get_image_paths(input_path):
|
||||||
|
filepath = Path(filename)
|
||||||
|
|
||||||
|
if filepath.suffix == '.png':
|
||||||
|
dflimg = DFLPNG.load( str(filepath) )
|
||||||
|
elif filepath.suffix == '.jpg':
|
||||||
|
dflimg = DFLJPG.load ( str(filepath) )
|
||||||
|
else:
|
||||||
|
dflimg = None
|
||||||
|
|
||||||
|
if dflimg is None:
|
||||||
|
io.log_err ("%s is not a dfl image file" % (filepath.name) )
|
||||||
|
continue
|
||||||
|
|
||||||
|
lmrks = dflimg.get_landmarks()
|
||||||
|
lmrks_list = lmrks.tolist()
|
||||||
|
orig_img = cv2_imread(str(filepath))
|
||||||
|
h,w,c = orig_img.shape
|
||||||
|
|
||||||
|
mask_orig = LandmarksProcessor.get_image_hull_mask( orig_img.shape, lmrks).astype(np.uint8)[:,:,0]
|
||||||
|
ero_dil_rate = w // 8
|
||||||
|
mask_ero = cv2.erode (mask_orig, cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(ero_dil_rate,ero_dil_rate)), iterations = 1 )
|
||||||
|
mask_dil = cv2.dilate(mask_orig, cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(ero_dil_rate,ero_dil_rate)), iterations = 1 )
|
||||||
|
|
||||||
|
|
||||||
|
#mask_bg = np.zeros(orig_img.shape[:2],np.uint8)
|
||||||
|
mask_bg = 1-mask_dil
|
||||||
|
mask_bgp = np.ones(orig_img.shape[:2],np.uint8) #default - all background possible
|
||||||
|
mask_fg = np.zeros(orig_img.shape[:2],np.uint8)
|
||||||
|
mask_fgp = np.zeros(orig_img.shape[:2],np.uint8)
|
||||||
|
|
||||||
|
img = orig_img.copy()
|
||||||
|
|
||||||
|
l_thick=2
|
||||||
|
|
||||||
|
def draw_4_lines (masks_out, pts, thickness=1):
|
||||||
|
fgp,fg,bg,bgp = masks_out
|
||||||
|
h,w = fg.shape
|
||||||
|
|
||||||
|
fgp_pts = []
|
||||||
|
fg_pts = np.array([ pts[i:i+2] for i in range(len(pts)-1)])
|
||||||
|
bg_pts = []
|
||||||
|
bgp_pts = []
|
||||||
|
|
||||||
|
for i in range(len(fg_pts)):
|
||||||
|
a, b = line = fg_pts[i]
|
||||||
|
|
||||||
|
ba = b-a
|
||||||
|
v = ba / npl.norm(ba)
|
||||||
|
|
||||||
|
ccpv = np.array([v[1],-v[0]])
|
||||||
|
cpv = np.array([-v[1],v[0]])
|
||||||
|
step = 1 / max(np.abs(cpv))
|
||||||
|
|
||||||
|
fgp_pts.append ( np.clip (line + ccpv * step * thickness, 0, w-1 ).astype(np.int) )
|
||||||
|
bg_pts.append ( np.clip (line + cpv * step * thickness, 0, w-1 ).astype(np.int) )
|
||||||
|
bgp_pts.append ( np.clip (line + cpv * step * thickness * 2, 0, w-1 ).astype(np.int) )
|
||||||
|
|
||||||
|
fgp_pts = np.array(fgp_pts)
|
||||||
|
bg_pts = np.array(bg_pts)
|
||||||
|
bgp_pts = np.array(bgp_pts)
|
||||||
|
|
||||||
|
cv2.polylines(fgp, fgp_pts, False, (1,), thickness=thickness)
|
||||||
|
cv2.polylines(fg, fg_pts, False, (1,), thickness=thickness)
|
||||||
|
cv2.polylines(bg, bg_pts, False, (1,), thickness=thickness)
|
||||||
|
cv2.polylines(bgp, bgp_pts, False, (1,), thickness=thickness)
|
||||||
|
|
||||||
|
def draw_lines ( masks_steps, pts, thickness=1):
|
||||||
|
lines = np.array([ pts[i:i+2] for i in range(len(pts)-1)])
|
||||||
|
|
||||||
|
|
||||||
|
for mask, step in masks_steps:
|
||||||
|
h,w = mask.shape
|
||||||
|
|
||||||
|
mask_lines = []
|
||||||
|
for i in range(len(lines)):
|
||||||
|
a, b = line = lines[i]
|
||||||
|
ba = b-a
|
||||||
|
ba_len = npl.norm(ba)
|
||||||
|
if ba_len != 0:
|
||||||
|
v = ba / ba_len
|
||||||
|
pv = np.array([-v[1],v[0]])
|
||||||
|
pv_inv_max = 1 / max(np.abs(pv))
|
||||||
|
mask_lines.append ( np.clip (line + pv * pv_inv_max * thickness * step, 0, w-1 ).astype(np.int) )
|
||||||
|
else:
|
||||||
|
mask_lines.append ( np.array(line, dtype=np.int) )
|
||||||
|
cv2.polylines(mask, mask_lines, False, (1,), thickness=thickness)
|
||||||
|
|
||||||
|
def draw_fill_convex( mask_out, pts, scale=1.0 ):
|
||||||
|
hull = cv2.convexHull(np.array(pts))
|
||||||
|
|
||||||
|
if scale !=1.0:
|
||||||
|
pts_count = hull.shape[0]
|
||||||
|
|
||||||
|
sum_x = np.sum(hull[:, 0, 0])
|
||||||
|
sum_y = np.sum(hull[:, 0, 1])
|
||||||
|
|
||||||
|
hull_center = np.array([sum_x/pts_count, sum_y/pts_count])
|
||||||
|
hull = hull_center+(hull-hull_center)*scale
|
||||||
|
hull = hull.astype(pts.dtype)
|
||||||
|
cv2.fillConvexPoly( mask_out, hull, (1,) )
|
||||||
|
|
||||||
|
def get_gc_mask_bgr(gc_mask):
|
||||||
|
h, w = gc_mask.shape
|
||||||
|
bgr = np.zeros( (h,w,3), dtype=np.uint8 )
|
||||||
|
|
||||||
|
bgr [ gc_mask == 0 ] = (0,0,0)
|
||||||
|
bgr [ gc_mask == 1 ] = (255,255,255)
|
||||||
|
bgr [ gc_mask == 2 ] = (0,0,255) #RED
|
||||||
|
bgr [ gc_mask == 3 ] = (0,255,0) #GREEN
|
||||||
|
return bgr
|
||||||
|
|
||||||
|
def get_gc_mask_result(gc_mask):
|
||||||
|
return np.where((gc_mask==1) + (gc_mask==3),1,0).astype(np.int)
|
||||||
|
|
||||||
|
#convex inner of right chin to end of right eyebrow
|
||||||
|
#draw_fill_convex ( mask_fgp, lmrks_list[8:17]+lmrks_list[26:27] )
|
||||||
|
|
||||||
|
#convex inner of start right chin to right eyebrow
|
||||||
|
#draw_fill_convex ( mask_fgp, lmrks_list[8:9]+lmrks_list[22:27] )
|
||||||
|
|
||||||
|
#convex inner of nose
|
||||||
|
draw_fill_convex ( mask_fgp, lmrks[27:36] )
|
||||||
|
|
||||||
|
#convex inner of nose half
|
||||||
|
draw_fill_convex ( mask_fg, lmrks[27:36], scale=0.5 )
|
||||||
|
|
||||||
|
|
||||||
|
#left corner of mouth to left corner of nose
|
||||||
|
#draw_lines ( [ (mask_fg,0), ], lmrks_list[49:50]+lmrks_list[32:33], l_thick)
|
||||||
|
|
||||||
|
#convex inner: right corner of nose to centers of eyebrows
|
||||||
|
#draw_fill_convex ( mask_fgp, lmrks_list[35:36]+lmrks_list[19:20]+lmrks_list[24:25])
|
||||||
|
|
||||||
|
#right corner of mouth to right corner of nose
|
||||||
|
#draw_lines ( [ (mask_fg,0), ], lmrks_list[54:55]+lmrks_list[35:36], l_thick)
|
||||||
|
|
||||||
|
#left eye
|
||||||
|
#draw_fill_convex ( mask_fg, lmrks_list[36:40] )
|
||||||
|
#right eye
|
||||||
|
#draw_fill_convex ( mask_fg, lmrks_list[42:48] )
|
||||||
|
|
||||||
|
#right chin
|
||||||
|
draw_lines ( [ (mask_bg,0), (mask_fg,-1), ], lmrks[8:17], l_thick)
|
||||||
|
|
||||||
|
#left eyebrow center to right eyeprow center
|
||||||
|
draw_lines ( [ (mask_bg,-1), (mask_fg,0), ], lmrks_list[19:20] + lmrks_list[24:25], l_thick)
|
||||||
|
# #draw_lines ( [ (mask_bg,-1), (mask_fg,0), ], lmrks_list[24:25] + lmrks_list[19:17:-1], l_thick)
|
||||||
|
|
||||||
|
#half right eyebrow to end of right chin
|
||||||
|
draw_lines ( [ (mask_bg,-1), (mask_fg,0), ], lmrks_list[24:27] + lmrks_list[16:17], l_thick)
|
||||||
|
|
||||||
|
#import code
|
||||||
|
#code.interact(local=dict(globals(), **locals()))
|
||||||
|
|
||||||
|
#compose mask layers
|
||||||
|
gc_mask = np.zeros(orig_img.shape[:2],np.uint8)
|
||||||
|
gc_mask [ mask_bgp==1 ] = 2
|
||||||
|
gc_mask [ mask_fgp==1 ] = 3
|
||||||
|
gc_mask [ mask_bg==1 ] = 0
|
||||||
|
gc_mask [ mask_fg==1 ] = 1
|
||||||
|
|
||||||
|
gc_bgr_before = get_gc_mask_bgr (gc_mask)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#io.show_image (wnd_name, gc_mask )
|
||||||
|
|
||||||
|
##points, hierarcy = cv2.findContours(original_mask,cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE)
|
||||||
|
##gc_mask = ( (1-erode_mask)*2 + erode_mask )# * dilate_mask
|
||||||
|
#gc_mask = (1-erode_mask)*2 + erode_mask
|
||||||
|
#cv2.addWeighted(
|
||||||
|
#gc_mask = mask_0_27 + (1-mask_0_27)*2
|
||||||
|
#
|
||||||
|
##import code
|
||||||
|
##code.interact(local=dict(globals(), **locals()))
|
||||||
|
#
|
||||||
|
#rect = (1,1,img.shape[1]-2,img.shape[0]-2)
|
||||||
|
#
|
||||||
|
#
|
||||||
|
cv2.grabCut(img,gc_mask,None,np.zeros((1,65),np.float64),np.zeros((1,65),np.float64),5, cv2.GC_INIT_WITH_MASK)
|
||||||
|
|
||||||
|
gc_bgr = get_gc_mask_bgr (gc_mask)
|
||||||
|
gc_mask_result = get_gc_mask_result(gc_mask)
|
||||||
|
gc_mask_result_1 = gc_mask_result[:,:,np.newaxis]
|
||||||
|
|
||||||
|
#import code
|
||||||
|
#code.interact(local=dict(globals(), **locals()))
|
||||||
|
orig_img_gc_layers_masked = (0.5*orig_img + 0.5*gc_bgr).astype(np.uint8)
|
||||||
|
orig_img_gc_before_layers_masked = (0.5*orig_img + 0.5*gc_bgr_before).astype(np.uint8)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
pink_bg = np.full ( orig_img.shape, (255,0,255), dtype=np.uint8 )
|
||||||
|
|
||||||
|
|
||||||
|
orig_img_result = orig_img * gc_mask_result_1
|
||||||
|
orig_img_result_pinked = orig_img_result + pink_bg * (1-gc_mask_result_1)
|
||||||
|
|
||||||
|
#io.show_image (wnd_name, blended_img)
|
||||||
|
|
||||||
|
##gc_mask, bgdModel, fgdModel =
|
||||||
|
#
|
||||||
|
#mask2 = np.where((gc_mask==1) + (gc_mask==3),255,0).astype('uint8')[:,:,np.newaxis]
|
||||||
|
#mask2 = np.repeat(mask2, (3,), -1)
|
||||||
|
#
|
||||||
|
##mask2 = np.where(gc_mask!=0,255,0).astype('uint8')
|
||||||
|
#blended_img = orig_img #-\
|
||||||
|
# #0.3 * np.full(original_img.shape, (50,50,50)) * (1-mask_0_27)[:,:,np.newaxis]
|
||||||
|
# #0.3 * np.full(original_img.shape, (50,50,50)) * (1-dilate_mask)[:,:,np.newaxis] +\
|
||||||
|
# #0.3 * np.full(original_img.shape, (50,50,50)) * (erode_mask)[:,:,np.newaxis]
|
||||||
|
#blended_img = np.clip(blended_img, 0, 255).astype(np.uint8)
|
||||||
|
##import code
|
||||||
|
##code.interact(local=dict(globals(), **locals()))
|
||||||
|
orig_img_lmrked = orig_img.copy()
|
||||||
|
LandmarksProcessor.draw_landmarks(orig_img_lmrked, lmrks, transparent_mask=True)
|
||||||
|
|
||||||
|
screen = np.concatenate ([orig_img_gc_before_layers_masked,
|
||||||
|
orig_img_gc_layers_masked,
|
||||||
|
orig_img,
|
||||||
|
orig_img_lmrked,
|
||||||
|
orig_img_result_pinked,
|
||||||
|
orig_img_result,
|
||||||
|
], axis=1)
|
||||||
|
|
||||||
|
io.show_image (wnd_name, screen.astype(np.uint8) )
|
||||||
|
|
||||||
|
|
||||||
|
while True:
|
||||||
|
io.process_messages()
|
||||||
|
|
||||||
|
for (x,y,ev,flags) in io.get_mouse_events(wnd_name):
|
||||||
|
pass
|
||||||
|
#print (x,y,ev,flags)
|
||||||
|
|
||||||
|
key_events = [ ev for ev, in io.get_key_events(wnd_name) ]
|
||||||
|
for key in key_events:
|
||||||
|
if key == ord('1'):
|
||||||
|
pass
|
||||||
|
if key == ord('2'):
|
||||||
|
pass
|
||||||
|
if key == ord('3'):
|
||||||
|
pass
|
||||||
|
|
||||||
|
if ord(' ') in key_events:
|
||||||
|
break
|
||||||
|
|
||||||
|
import code
|
||||||
|
code.interact(local=dict(globals(), **locals()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#original_mask = np.ones(original_img.shape[:2],np.uint8)*2
|
||||||
|
#cv2.drawContours(original_mask, points, -1, (1,), 1)
|
||||||
+1
-1
@@ -63,7 +63,7 @@ def add_landmarks_debug_images(input_path):
|
|||||||
|
|
||||||
if img is not None:
|
if img is not None:
|
||||||
face_landmarks = dflimg.get_landmarks()
|
face_landmarks = dflimg.get_landmarks()
|
||||||
img = LandmarksProcessor.draw_landmarks(img, face_landmarks, transparent_mask=True)
|
LandmarksProcessor.draw_landmarks(img, face_landmarks, transparent_mask=True)
|
||||||
|
|
||||||
output_file = '{}{}'.format( str(Path(str(input_path)) / filepath.stem), '_debug.jpg')
|
output_file = '{}{}'.format( str(Path(str(input_path)) / filepath.stem), '_debug.jpg')
|
||||||
cv2_imwrite(output_file, img, [int(cv2.IMWRITE_JPEG_QUALITY), 50] )
|
cv2_imwrite(output_file, img, [int(cv2.IMWRITE_JPEG_QUALITY), 50] )
|
||||||
|
|||||||
@@ -48,13 +48,13 @@ class SampleProcessor(object):
|
|||||||
is_face_sample = sample.landmarks is not None
|
is_face_sample = sample.landmarks is not None
|
||||||
|
|
||||||
if debug and is_face_sample:
|
if debug and is_face_sample:
|
||||||
sample_bgr = LandmarksProcessor.draw_landmarks (sample_bgr, sample.landmarks, (0, 1, 0))
|
LandmarksProcessor.draw_landmarks (sample_bgr, sample.landmarks, (0, 1, 0))
|
||||||
|
|
||||||
close_sample = sample.close_target_list[ np.random.randint(0, len(sample.close_target_list)) ] if sample.close_target_list is not None else None
|
close_sample = sample.close_target_list[ np.random.randint(0, len(sample.close_target_list)) ] if sample.close_target_list is not None else None
|
||||||
close_sample_bgr = close_sample.load_bgr() if close_sample is not None else None
|
close_sample_bgr = close_sample.load_bgr() if close_sample is not None else None
|
||||||
|
|
||||||
if debug and close_sample_bgr is not None:
|
if debug and close_sample_bgr is not None:
|
||||||
close_sample_bgr = LandmarksProcessor.draw_landmarks (close_sample_bgr, close_sample.landmarks, (0, 1, 0))
|
LandmarksProcessor.draw_landmarks (close_sample_bgr, close_sample.landmarks, (0, 1, 0))
|
||||||
|
|
||||||
params = image_utils.gen_warp_params(sample_bgr, sample_process_options.random_flip, rotation_range=sample_process_options.rotation_range, scale_range=sample_process_options.scale_range, tx_range=sample_process_options.tx_range, ty_range=sample_process_options.ty_range )
|
params = image_utils.gen_warp_params(sample_bgr, sample_process_options.random_flip, rotation_range=sample_process_options.rotation_range, scale_range=sample_process_options.scale_range, tx_range=sample_process_options.tx_range, ty_range=sample_process_options.ty_range )
|
||||||
|
|
||||||
|
|||||||
+29
-27
@@ -108,43 +108,45 @@ class DFLJPG(object):
|
|||||||
|
|
||||||
return inst
|
return inst
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise Exception("Corrupted JPG file: %s" % (str(e)))
|
raise Exception ("Corrupted JPG file: %s" % (str(e)))
|
||||||
|
|
||||||
return None
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def load(filename):
|
def load(filename):
|
||||||
inst = DFLJPG.load_raw (filename)
|
try:
|
||||||
inst.dfl_dict = None
|
inst = DFLJPG.load_raw (filename)
|
||||||
|
inst.dfl_dict = None
|
||||||
|
|
||||||
for chunk in inst.chunks:
|
for chunk in inst.chunks:
|
||||||
if chunk['name'] == 'APP0':
|
if chunk['name'] == 'APP0':
|
||||||
d, c = chunk['data'], 0
|
d, c = chunk['data'], 0
|
||||||
c, id, _ = struct_unpack (d, c, "=4sB")
|
c, id, _ = struct_unpack (d, c, "=4sB")
|
||||||
|
|
||||||
if id == b"JFIF":
|
if id == b"JFIF":
|
||||||
c, ver_major, ver_minor, units, Xdensity, Ydensity, Xthumbnail, Ythumbnail = struct_unpack (d, c, "=BBBHHBB")
|
c, ver_major, ver_minor, units, Xdensity, Ydensity, Xthumbnail, Ythumbnail = struct_unpack (d, c, "=BBBHHBB")
|
||||||
#if units == 0:
|
#if units == 0:
|
||||||
# inst.shape = (Ydensity, Xdensity, 3)
|
# inst.shape = (Ydensity, Xdensity, 3)
|
||||||
else:
|
else:
|
||||||
raise Exception("Unknown jpeg ID: %s" % (id) )
|
raise Exception("Unknown jpeg ID: %s" % (id) )
|
||||||
elif chunk['name'] == 'SOF0' or chunk['name'] == 'SOF2':
|
elif chunk['name'] == 'SOF0' or chunk['name'] == 'SOF2':
|
||||||
d, c = chunk['data'], 0
|
d, c = chunk['data'], 0
|
||||||
c, precision, height, width = struct_unpack (d, c, ">BHH")
|
c, precision, height, width = struct_unpack (d, c, ">BHH")
|
||||||
inst.shape = (height, width, 3)
|
inst.shape = (height, width, 3)
|
||||||
|
|
||||||
elif chunk['name'] == 'APP15':
|
elif chunk['name'] == 'APP15':
|
||||||
if type(chunk['data']) == bytes:
|
if type(chunk['data']) == bytes:
|
||||||
inst.dfl_dict = pickle.loads(chunk['data'])
|
inst.dfl_dict = pickle.loads(chunk['data'])
|
||||||
|
|
||||||
if (inst.dfl_dict is not None) and ('face_type' not in inst.dfl_dict.keys()):
|
if (inst.dfl_dict is not None) and ('face_type' not in inst.dfl_dict.keys()):
|
||||||
inst.dfl_dict['face_type'] = FaceType.toString (FaceType.FULL)
|
inst.dfl_dict['face_type'] = FaceType.toString (FaceType.FULL)
|
||||||
|
|
||||||
if inst.dfl_dict == None:
|
if inst.dfl_dict == None:
|
||||||
|
return None
|
||||||
|
|
||||||
|
return inst
|
||||||
|
except Exception as e:
|
||||||
|
print (e)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
return inst
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def embed_data(filename, face_type=None,
|
def embed_data(filename, face_type=None,
|
||||||
landmarks=None,
|
landmarks=None,
|
||||||
|
|||||||
+11
-7
@@ -249,17 +249,21 @@ class DFLPNG(object):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def load(filename):
|
def load(filename):
|
||||||
inst = DFLPNG.load_raw (filename)
|
try:
|
||||||
inst.fcwp_dict = inst.getDFLDictData()
|
inst = DFLPNG.load_raw (filename)
|
||||||
|
inst.fcwp_dict = inst.getDFLDictData()
|
||||||
|
|
||||||
if (inst.fcwp_dict is not None) and ('face_type' not in inst.fcwp_dict.keys()):
|
if (inst.fcwp_dict is not None) and ('face_type' not in inst.fcwp_dict.keys()):
|
||||||
inst.fcwp_dict['face_type'] = FaceType.toString (FaceType.FULL)
|
inst.fcwp_dict['face_type'] = FaceType.toString (FaceType.FULL)
|
||||||
|
|
||||||
if inst.fcwp_dict == None:
|
if inst.fcwp_dict == None:
|
||||||
|
return None
|
||||||
|
|
||||||
|
return inst
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
return inst
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def embed_data(filename, face_type=None,
|
def embed_data(filename, face_type=None,
|
||||||
landmarks=None,
|
landmarks=None,
|
||||||
|
|||||||
Reference in new issue
Block a user