r/Python•
_jaypatel

I made a script that will unwrap your face

I Made This

Posted Mar 31, 2020, 6:45 AM UTC

731117
[deleted]•

[deleted]

290
_jaypatelOP•

Well, I use picasa only for it's photo viewer because it is minimal and responds faster. Talking about windows 7, I don't like windows 8 and 10(I don't know why) and animations in windows 7 are not good. So, to make windows 7 animations snappy, I use high contrast theme :-)

51
teddytroll•

Why not Linux?

32
_jaypatelOP•

I messed up with my boot manager and now I can't boot any OS. Also, I don't want to fix it because I am planning to buy a new laptop :)

28
KAYL_reddit•

just run "bootsect /nt60 (name of your drive): /mbr" in your cmd

it's magic trust me.

20
ThePiGuy0•

Don't you just need to change the boot device in UEFI/BIOS?

The windows boot manager doesn't work with Linux anyway?

Edit: Just seen further down that you sorted it anyway :)

3
wolfEXE57•

Why not just install a new one? Unless im mot properly understanding your issue, couldnt you just dual boot a linux distro and install grub and use that to boot between the two?

2

Shut it down, boot from the Windows installer DVD/USB and run Startup Repair.

2
Jeacom512•

Yea, as soon as win7 got discontinued tried win 10 but heck, Microsoft turned the world's most popular operating system lineage into a pile of freemium and bloatware.

I immediately wiped my HDD, installed Linux and dont regret my decision.

2
Metalsand•

Honeyview is a good, customizable photo viewer for Win 10 and plus.

Windows 10...there are some issues I have here and there, but they ironed out the bugs years ago. I still take exception to how they manage their updates (why no Microsoft, I don't want my custom environmental variables wiped on a yearly basis). Windows 10 is far more beneficial than detrimental, and Win 7 is far too outdated at this point to continue use.

3
_jaypatelOP•

Yeah, I'm trying to install Linux into my PC :)

1
Zarathustra420•

This is understandable, but there are theme settings in Windows 10 to make it look and behave like windows 7.

You should also upgrade (windows 7 --> windows 10 is a free upgrade) because windows 7 has a lot of security vulnerabilities that windows just isn't going to patch.

3
_jaypatelOP•

I've decided to install Linux :)

2
SnowdenIsALegend•

Another Picasa user here JUST because of its amazing viewer! Great work on the code btw!

2
_jaypatelOP•

Thank you:)

2
scinaty2•

Try "jpegview", its lightning fast and very small

2
_jaypatelOP•

Sure, I'll give it a try

2
xdcountry•

This is the comment I was looking for— thank you good sir!

2
zrnest•

I'm impressed that you're impressed that Windows 7 is still being used.

I know (personally, IRL) people who actually do lots of things (at least a famous music producer, and a developer) with old computers/OS/gear because it just works and they are very productive with it.

"Windows 7 is discontinued so don't use it": if you really know what you're doing (power user), it's fine to continue Win 7, XP, etc.

-9
[deleted]•

[deleted]

6
zrnest•

I don't understand why you're so aggressive in your words ('fuck', 'dumb', 'soundcloud reject', 'trolling', etc.), whereas my post was simply factual and polite.

Yes I know them personally IRL. Believe it or not, I do not care.

0
PhiBuh•

I'm genuinely curious: why?

31
_jaypatelOP•

I don't know why I got the the idea of making this. May be quarantine is driving me crazy

42
PhiBuh•

Fair enough, as long as you are having fun and learn something. Good job!

23
_jaypatelOP•

Aw, thank you :)

7
Wilfred-kun•

I can see this being used to texture a 3d model.

15
BeesAndSunflowers•

Well, tbh it's basically a cylinder projection that is a standard preset for unwrapping in 3D software. It's also insufficient for any complicated model - while cylinder is good at unwrapping faces parallel to the cylinder, it gets worse to the point of unusability with perpendicular faces.

Notice this with the face from OPs image - all of the area beneath the chin is contained in just a few lines of pixels, while in reality in should be of similar length as distance between the chin and nose. That's because we don't see it from the front, but there's still skin there that should have detail, impossible to convey with that little of texture area, that on the top of that would be grossly stretched.

But it's a cool project nonetheless.

8
lemon65•

You might be able to apply this to video games, because you're wrapping a 2D image on a 3D model. So taking a video of yourself unwrapping the image and then applying it to a 3D model in the video game itself.

2
mexicanburritoo•

William Osman did this a while ago

10
_jaypatelOP•

Yeah, I've seen his video just now and his code is too simple but it's very confusing

1
Scaliwag•

He just gets the center column of pixels for each frame and pastes it side to side to the output image.

2
_jaypatelOP•

Yeah, I did the same thing but when someone commented about his video here, I checked his code and it was too confusing but it's only about 20 lines. I should modify the code, cuz my code is about 85 lines :)

1
drinfernoo•

his code is too simple but it's very confusing

Well, which is it?

2
DrunkReturn•

Code can be simple but still a mess.

4
_jaypatelOP•

William Osman's code is about 20 lines and very confusing, I was talking about that

2
cnovoa15•

Personally I think it is amazing, lots of work for sure, you should be proud :D

10
_jaypatelOP•

thank you :)

8
kephir•

like, irl, or...?

7
_jaypatelOP•

you need in real life then go to North Korea and just sneeze or cough :)

19
_thekinginthenorth•

Why still Windows 7? Why not Linux

7
_jaypatelOP•

My boot manager was messed up, I fixed it just now. I'm gonna install Ubuntu asap

2
_jaypatelOP•
6
pushp_raj•

Nice

3
nice-scores•

𝓷𝓲𝓬𝓮 ☜(゚ヮ゚☜) #Nice Leaderboard 1. u/nicespammer666 at 12899 nices

2. u/saxobroko at 9101 nices

3. u/AmishMuffin at 8546 nices

...

66270. u/pushp_raj at 2 nices


^(I) ^(AM) ^(A) ^(BOT) ^(|) ^(REPLY) ^(!IGNORE) ^(AND) ^(I) ^(WILL) ^(STOP) ^(REPLYING) ^(TO) ^(YOUR) ^(COMMENTS)

4
[deleted]•

[deleted]

3
_jaypatelOP•

Yes, but it feels snappy. So, I use it

1
[deleted]•

[deleted]

2
_jaypatelOP•

Lol

1
BetaDecay121•

Can you do it with a video of your actual head next?

2
_jaypatelOP•

Actually, I made one and it looks awkward. Because, I don't have a tripod to record it with stability and I also don't have an office chair that will help make a free rotation.

2
BetaDecay121•

Time to engineer your own tripod and swivel chair then ;)

2
_jaypatelOP•

Lmao! I should try one of the 5 minute crafts videos for these(which never work xD)

5
osku654•

Did you consider correcting the shaking and such with software somehow?

2
_jaypatelOP•

Unfortunately, I have Sony Vegas so I can't stabilize it without editing every single keyframe and also my pc will be on fire if I use Adobe after effects.

0
69shaolin69•

Use DaVinci it’s free, and has adobe ace features, don’t use it just give it a shot, DaVinci 16 works on Linux too.

2
nemom•

Ends up looking like the Shatner mask Michael Myers wears in 'Halloween'.

2
AlexBuffet•

But can it rewrap my face?

2
_jaypatelOP•

No, not now :)

2
AlexBuffet•

Well put the work in lazy man! Apart from joking, I think you could actually make real money by creating a program that can unwrap and rewrap your face, it could be plenty useful for 3d graphic games devs, dont you think?

1
_jaypatelOP•

Sounds good, I'll try to make one but I'm still amateur programmer. So, I don't know whether I could make it or not but I'll try :)

2
[deleted]•

Nice!

2
nice-scores•

𝓷𝓲𝓬𝓮 ☜(゚ヮ゚☜) #Nice Leaderboard 1. u/RepliesNice at 4340 nices

2. u/cbis4144 at 1890 nices

3. u/DOCTORDICK8 at 1577 nices

...

243810. u/Hour-Classic at 1 nice


^(I) ^(AM) ^(A) ^(BOT) ^(|) ^(REPLY) ^(!IGNORE) ^(AND) ^(I) ^(WILL) ^(STOP) ^(REPLYING) ^(TO) ^(YOUR) ^(COMMENTS)

2
[deleted]•

Thank you robot! Please keep my place

2
RngdZ•

awesome job!

shouldn't the face be centered instead tho? in my mind it would be more "useful"

2
_jaypatelOP•

Honestly, I was trying to do that by adding more code but then I realized the following process

Consider the 3d model above in the post, if I just combine the same copy of the above 3d model video(which is 12 seconds in length) to itself, I will get a 24 seconds video.

This 24 seconds video will have the head rotation information 2 times. So, I will have more frames with the information for attaching two ends of the faces in the middle.

So, if you want to solve this issue then just make a video in which you make two rotations of your head, that will fix the issue :)

Also, I'll try to add more code to make it work with a single rotation.

2
itsDaco•

William Osman is that you?

2
_jaypatelOP•

No, I'm not

1
MrK_HS•

let meme_man = python(&face).unwrap();

2
_jaypatelOP•

Actually, I searched for meme man's 3d model but no luck or I would have uploaded that meme man's model here xD

1
0AflacksGiven•

didn’t william osman do this?

2
CabajHed•

Ooh, nice.

2
[deleted]•

[deleted]

1
[deleted]•

[deleted]

1