Skip to content

Piccoku is an iOS app that turns your photos into haiku-style poetry

Notifications You must be signed in to change notification settings

kothariaditya/piccoku

Repository files navigation

Piccoku

Piccoku uses computer vision, synonyms, grammar, and syntax rules to write you a haiku based on user-generated photos, attempting to distill the artistic essence of smartphone snapshots into poetry. The haiku is a style of poetry characterized by 3 lines in specific syllable patterns.

The haiku is generated by our algorithm, then overlaid onto your image, creating your "piccoku" (picture + haiku), which can easily be shared through social media channels or messaging applications.

To see a gallery of all piccokus, check piccoku.com.

Inspiration

We all know a picture is worth a thousand words, but how about 17 syllables? This project was born from the synthesis of computer science, photography, and poetry. We really wanted to explore the possibilities of applying machine learning to artistic creations.

How we built it

We used Microsoft Azure's Computer Vision API to extract keywords from the user-submitted images. Then, the keywords were added to phrases from DataMuse API (synonyms, syntax, grammar, syllable count). We had a web app built through Rails, primarily for data persistence. Communication between the iOS app and web app is facilitated by exposed endpoints that acted as RESTful APIs.

https://ancient-plateau-48847.herokuapp.com/

GET /

Example Response 200 OK: {
    "id"         : 92,
    "user_name"  : null,
    "url"        : "<insert encoded base64String here>",
    "created_at" : "2018-03-04T23:23:34.401Z",
    "updated_at" : "2018-03-04T23:23:34.401Z",
    "line1"      : "other small inside",
    "line2"      : "The Black elegant warm ",
    "line3"      : "indoor floats and slept"
}

POST /images/create

Example Data: {
    "url"   : "<insert encoded base64String here>",
    "name"  : "Billy",
    "line1" : "other small inside",
    "line2" : "The Black elegant warm ",
    "line3" : "indoor floats and slept"
}

We built the iOS application entirely in Swift.

The web app is running on Heroku due to the ease of configuration and usage. The design was created using HTML/CSS, and uses Javascript to retrieve information from the API.

About

Piccoku is an iOS app that turns your photos into haiku-style poetry

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published