GithubHelp home page GithubHelp logo

davepagurek / jalgorithm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bachili/diffvg

2.0 1.0 0.0 11.6 MB

A Jalgorithm for Japplying Jeans to Jobjects

Home Page: https://people.csail.mit.edu/tzumao/diffvg/

License: Apache License 2.0

C++ 27.93% Python 66.09% C 3.26% Makefile 0.03% CMake 0.93% TeX 1.76%

jalgorithm's Introduction

A Jalgorithm for Japplying Jeans to Jobjects

teaser

Read the paper

For years, society has been plagued by the lack of a conclusive answer to the question of how arbitrary things would wear jeans, if they wore jeans. This paper proposes a jalgorithm to determine the mathematically optimal configuration of pants on a silhouette, leveraging recent insights in the fields of computer vision and differentiable rendering.

This is based off of the diffvg differential vector graphics renderer. It uses a customized loss function to optimize the vertices of pants, based on the following rules:

  1. Duality of man: Pants should bisect the silhouette of the wearer through its center, covering half its area.
  2. No-stretch jeans: Pants, when applied to the wearer in rest position, should not be so deformed that they no longer resemble prototypical jeans.
  3. (Topologically) torn jean avoidance: Limbs should only go through the open ends of pants, and similarly, closed ends of pants should not intersect limbs.
  4. Dress code compliance: Pants should be on the body of the wearer, not off of it.

Read the paper for more details!

You really shouldn't look at the code for this as I wrote it at 1am really quickly and hackily, but if you really want to, it's in apps/pants.py.

Results

Running the Code

  1. Follow the setup instructions from BachiLi/diffvg
  2. cd apps
  3. python pants.py

jalgorithm's People

Contributors

bachili avatar daniel347x avatar davepagurek avatar marcoleewow avatar mgharbi avatar mworchel avatar oeway avatar orenkatzir avatar robinsloan avatar samestep avatar weinman avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.