かの有名なあの東方二次創作ソング、「bad apple!」のMVをPythonでやってみたって話

Overview

bad apple!!

bad apple!のスクショ

内容

このプログラムは、bad apple!(feat. nomico)のPVをPythonを用いて再現しよう!という内容です。 実はYoutube並びにGithub上に似たようなプログラムがあったしなんならそっちの方が結構良かったりするんですが、一応公開しますw

使い方

  • このプログラムをダウンロードします。上部の「Code」という緑のボタンから「Download ZIP」を選択、その後解凍します

  • まず、badapple.pyと同じ階層に、badapple.mp3とbadapple.mp4を置きます(既に用意はしてますが、著作権とかの問題があり次第削除します)

  • badapple.pyを普通に動作させます

  • データ生成が完了したらエンターキーを押して、楽しみます

データの保存について

v.1.1.0から、各フレームを表現する文字列(以下、ドットファイル)が保存できるようになりました。
これによって、いちいち待つことなく、すぐに再生することが可能になります。

使い方

  • まず、選択肢の「2」を選ぶ

  • 現在の設定に合わせたドットファイルを、badapple.pyと同じ階層にあるdotsフォルダの中に生成

  • その後、選択肢の「3」を選ぶ

  • 先ほど生成したファイル名を入力し、再生

  • 楽しむ

注意

ドットファイルはテキストファイル(txt)で保存されますが、なんと一つのファイルあたり100MBは超えます。というか私の時は300MB超えました。なので、容量には充分注意をして、生成しまくらないようにしてください。

あと、そのテキストファイルを生で見ようとすると重くなるので、あまり直視しないようにお願いします。

自動フレーム調整機能について

v.1.1.0から、自動で、fpsに合わせたフレーム調整を行うことができます。これにより、ある程度高画質なドットファイルでも、少しカクカクするかもしれませんが再生することができるようになりました。
なお、この機能は完璧なものではありません。遅れるもんは遅れます。抗えません。無駄な抵抗をせず、画質を落としましょう。

なお、再生時に「debug_fps」と入力すると、現在のfpsと、通常のfpsに合わせて調整するフレーム数をみることができますが、これをONにするとfps落ちるので、なんかおかしいという時のみ活用してください。

Q&A

  1. サイズが収まらない
    申し訳ありませんが、badapple.py内の「CUSTOM」というコメントがある箇所の数値を調整してください

  2. 音とズレる
    1番と同様、badapple.py内の「CUSTOM」というコメントがある箇所の数値を調整してください。
    原因は多分、描画するときの処理時間があるからだと思いますので、描画するときの文字数を減らすなどの対策を行うと良いかもしれません

  3. ウインドウが自動的に閉じない
    ウインドウを閉じる方法がよくわからなかったので、申し訳ありませんが手動でウインドウを閉じてください

  4. エラー吐きまくってる
    ライブラリのインストールをしていないのかもしれません。
    この作品では、

  • openCV
  • pygame
  • fpstimer
  • tkinter
  • screeninfo

が必要です。

  1. どう足掻いてもズレる
    他のアプリのウインドウをできるだけ閉じることをお勧めします。また、なぜか1回目はズレるんですが、2回目は普通になる時が結構あるので、何回か試してみるのもいいかもしれません。

  2. ウインドウを動かそうとするとズレる
    仕方ないものです。

  3. 特にない
    bad apple!!を楽しんでください

感想

小さい頃から、bad apple!!のPVのアレンジ(?)をめちゃくちゃ見てて、「うわぁ、こういうのやりたいなぁ」と思ってたので、どんな形であれ自分の手でアレンジができたのは本当に嬉しいです。もちろん、改善すべき点なんてあげればキリがないんですが、今はもうちょっとだけ幻想入りさせてもらいます。。。

そもそも、「bad apple!!」とは?

元々は、東方旧作の弾幕STGシリーズ、「東方幻想郷」の3面ステージの道中BGM。
それをnomicoがカバーした「bad apple!! feat. nomico」と、そのPVが爆発的人気を誇り、今や東方projectの顔とも呼べる曲となった。
また、PVが影絵なので、二値化できる作品であり、それを利用して今回のプログラムの他にも様々なオリジナリティのあるアレンジが公開されている。このプログラムでも、PythonのopenCVを用いて動画を二値化しているが、その処理を施しても違和感のない仕上がりとなっている。

実は、PVに関しては絵コンテから、神様が影絵へと変化させたのだが、影絵の元である絵コンテでは、最後に出てくる霊夢、魔理沙は旧作のキャラクターとなっている。

You might also like...
A super easy, but really really bad DBMS

Dumb DB Are you looking for a reliable database management system? Then you've come to the wrong place. This is a very small database management syste

A discord token nuker With loads of options that will screw an account up real bad
A discord token nuker With loads of options that will screw an account up real bad

A discord token nuker With loads of options that will screw an account up real bad, also has inbuilt massreport, GroupChat Spammer and Token/Password/Creditcard grabber and so much more!

Kellogg bad | Union good | Support strike funds

KelloggBot Credit to SeanDaBlack for the basis of the script. req.py is selenium python bot. sc.js is a the base of the ios shortcut [COMING SOON] Set

Python script to commit to your github for a perfect commit streak. This is purely for education purposes, please don't use this script to do bad stuff.

Daily-Git-Commit Commit to repo every day for the perfect commit streak Requirments pip install -r requirements.txt Setup Download this repository. Cr

Instagram-Reports is a tool made to ban any scam or bad person

ABOUT TOOL : Instagram-Reports is a tool made to ban any scam or bad person. Installation : sudo apt-get update -y sudo apt-get upgrade -y apt insta

Some Discord bot block bad words, with this simple hacking tool you will be able to bypass blacklisted words
Some Discord bot block bad words, with this simple hacking tool you will be able to bypass blacklisted words

DISCORD-BAD-WORD-BYPASS-2022 DISCORD BLACKLISTED WORDS HACKING/BYPASS (EDUCATIONAL PURPOSES ONLY) bypass discord blacklisted words. Description Some D

A very bad wordle solver to help me solve the daily wordle

Wordle Solver A very bad wordle solver to help me solve the daily wordle on https://www.powerlanguage.co.uk/wordle/ TODO list take into account letter

A discord token nuker With loads of options that will screw an account up real bad, also has inbuilt massreport, GroupChat Spammer and Token/Password/Creditcard grabber and so much more!
A discord token nuker With loads of options that will screw an account up real bad, also has inbuilt massreport, GroupChat Spammer and Token/Password/Creditcard grabber and so much more!

Installation | Important | Changelogs | Discord NOTE: Hazard is not finished! You can expect bugs, crashes, and non-working functions. Please make an

About A python based Apple Quicktime protocol,you can record audio and video from real iOS devices

介绍 本应用程序使用 python 实现,可以通过 USB 连接 iOS 设备进行屏幕共享 高帧率(30〜60fps) 高画质 低延迟(200ms) 非侵入性 支持多设备并行 Mac OSX 安装 python =3.7 brew install libusb pkg-config 如需使用 g

OHLC Average Prediction of Apple Inc. Using LSTM Recurrent Neural Network
OHLC Average Prediction of Apple Inc. Using LSTM Recurrent Neural Network

Stock Price Prediction of Apple Inc. Using Recurrent Neural Network OHLC Average Prediction of Apple Inc. Using LSTM Recurrent Neural Network Dataset:

Research shows Google collects 20x more data from Android than Apple collects from iOS. Block this non-consensual telemetry using pihole blocklists.

pihole-antitelemetry Research shows Google collects 20x more data from Android than Apple collects from iOS. Block both using these pihole lists. Proj

Unofficial PyTorch implementation of Attention Free Transformer (AFT) layers by Apple Inc.
Unofficial PyTorch implementation of Attention Free Transformer (AFT) layers by Apple Inc.

aft-pytorch Unofficial PyTorch implementation of Attention Free Transformer's layers by Zhai, et al. [abs, pdf] from Apple Inc. Installation You can i

Orthrus is a macOS agent that uses Apple's MDM to backdoor a device using a malicious profile.

Orthrus is a macOS agent that uses Apple's MDM to backdoor a device using a malicious profile. It effectively runs its own MDM server and allows the operator to interface with it using Mythic.

Convert Apple NeuralHash model for CSAM Detection to ONNX.

Apple NeuralHash is a perceptual hashing method for images based on neural networks. It can tolerate image resize and compression.

Find target hash collisions for Apple's NeuralHash perceptual hash function.💣
Find target hash collisions for Apple's NeuralHash perceptual hash function.💣

neural-hash-collider Find target hash collisions for Apple's NeuralHash perceptual hash function. For example, starting from a picture of this cat, we

Applicator Kit for Modo allow you to apply Apple ARKit Face Tracking data from your iPhone or iPad to your characters in Modo.

Applicator Kit for Modo Applicator Kit for Modo allow you to apply Apple ARKit Face Tracking data from your iPhone or iPad with a TrueDepth camera to

Demonstrates iterative FGSM on Apple's NeuralHash model.
Demonstrates iterative FGSM on Apple's NeuralHash model.

apple-neuralhash-attack Demonstrates iterative FGSM on Apple's NeuralHash model. TL;DR: It is possible to apply noise to CSAM images and make them loo

Fast, simple API for Apple firmwares.

Loyal Fast, Simple API for fetching Apple Firmwares. The API server is closed due to some reasons. Wait for v2 releases. Features Fetching Signed IPSW

IDA loader for Apple's iBoot, SecureROM and AVPBooter
IDA loader for Apple's iBoot, SecureROM and AVPBooter

IDA iBoot Loader IDA loader for Apple's iBoot, SecureROM and AVPBooter Installation Copy iboot-loader.py to the loaders folder in IDA directory. Credi

Releases(v.1.2.0)
  • v.1.2.0(Aug 30, 2021)

    バージョン1.2.0リリース

    更新内容

    • バグモードの追加(下の画像参照)
    • 自動的に文字のサイズを調整
    • 白い部分と黒い部分の文字を自由に設定可能(下の画像参照)
    • 終了時に自動的にウインドウを閉じる
    • その他細かいところの修正

    資料

    バグモード

    白い部分と黒い部分の設定例

    Source code(tar.gz)
    Source code(zip)
  • v.1.1.0(Aug 27, 2021)

  • v.1.0.0(Aug 27, 2021)

Owner
赤紫
自分で作ったwebアプリのコードを中心に、適当にアップしていく予定
赤紫
The Open Source Framework for Machine Vision

SimpleCV Quick Links: About Installation [Docker] (#docker) Ubuntu Virtual Environment Arch Linux Fedora MacOS Windows Raspberry Pi SimpleCV Shell Vid

Sight Machine 2.6k Dec 31, 2022
A Tensorflow model for text recognition (CNN + seq2seq with visual attention) available as a Python package and compatible with Google Cloud ML Engine.

Attention-based OCR Visual attention-based OCR model for image recognition with additional tools for creating TFRecords datasets and exporting the tra

Ed Medvedev 933 Dec 29, 2022
RRD: Rotation-Sensitive Regression for Oriented Scene Text Detection

RRD: Rotation-Sensitive Regression for Oriented Scene Text Detection For more details, please refer to our paper. Citing Please cite the related works

Minghui Liao 102 Jun 29, 2022
Face Detection with DLIB

Face Detection with DLIB In this project, we have detected our face with dlib and opencv libraries. Setup This Project Install DLIB & OpenCV You can i

Can 2 Jan 16, 2022
Generating .npy dataset and labels out of given image, containing numbers from 0 to 9, using opencv

basic-dataset-generator-from-image-of-numbers generating .npy dataset and labels out of given image, containing numbers from 0 to 9, using opencv inpu

1 Jan 01, 2022
Code release for our paper, "SimNet: Enabling Robust Unknown Object Manipulation from Pure Synthetic Data via Stereo"

SimNet: Enabling Robust Unknown Object Manipulation from Pure Synthetic Data via Stereo Thomas Kollar, Michael Laskey, Kevin Stone, Brijen Thananjeyan

68 Dec 14, 2022
Detect handwritten words in a text-line (classic image processing method).

Word segmentation Implementation of scale space technique for word segmentation as proposed by R. Manmatha and N. Srimal. Even though the paper is fro

Harald Scheidl 190 Jan 03, 2023
Histogram specification using openCV in python .

histogram specification using openCV in python . Have to input miu and sigma to draw gausssian distribution which will be used to map the input image . Example input can be miu = 128 sigma = 30

Tamzid hasan 6 Nov 17, 2021
A python scripts that uses 3 different feature extraction methods such as SIFT, SURF and ORB to find a book in a video clip and project trailer of a movie based on that book, on to it.

A python scripts that uses 3 different feature extraction methods such as SIFT, SURF and ORB to find a book in a video clip and project trailer of a movie based on that book, on to it.

tooraj taraz 3 Feb 10, 2022
This repository provides train&test code, dataset, det.&rec. annotation, evaluation script, annotation tool, and ranking.

SCUT-CTW1500 Datasets We have updated annotations for both train and test set. Train: 1000 images [images][annos] Additional point annotation for each

Yuliang Liu 600 Dec 18, 2022
TableBank: A Benchmark Dataset for Table Detection and Recognition

TableBank TableBank is a new image-based table detection and recognition dataset built with novel weak supervision from Word and Latex documents on th

844 Jan 04, 2023
Creating a virtual tv using opencv in python3.

Virtual-TV Creating a virtual tv using opencv in python3. In order to run the code follow the below given steps: Make sure the desired videos which ar

Vamsi 1 Jan 01, 2022
a deep learning model for page layout analysis / segmentation.

OCR Segmentation a deep learning model for page layout analysis / segmentation. dependencies tensorflow1.8 python3 dataset: uw3-framed-lines-degraded-

99 Dec 12, 2022
A python programusing Tkinter graphics library to randomize questions and answers contained in text files

RaffleOfQuestions Um programa simples em python, utilizando a biblioteca gráfica Tkinter para randomizar perguntas e respostas contidas em arquivos de

Gabriel Ferreira Rodrigues 1 Dec 16, 2021
A curated list of papers and resources for scene text detection and recognition

Awesome Scene Text A curated list of papers and resources for scene text detection and recognition The year when a paper was first published, includin

Jan Zdenek 43 Mar 15, 2022
Markup for note taking

Subtext: markup for note-taking Subtext is a text-based, block-oriented hypertext format. It is designed with note-taking in mind. It has a simple, pe

Gordon Brander 224 Jan 01, 2023
Indonesian ID Card OCR using tesseract OCR

KTP OCR Indonesian ID Card OCR using tesseract OCR KTP OCR is python-flask with tesseract web application to convert Indonesian ID Card to text / JSON

Revan Muhammad Dafa 5 Dec 06, 2021
Genalog is an open source, cross-platform python package allowing generation of synthetic document images with custom degradations and text alignment capabilities.

Genalog is an open source, cross-platform python package allowing generation of synthetic document images with custom degradations and text alignment capabilities.

Microsoft 235 Dec 22, 2022
OCRmyPDF adds an OCR text layer to scanned PDF files, allowing them to be searched

OCRmyPDF adds an OCR text layer to scanned PDF files, allowing them to be searched or copy-pasted. ocrmypdf # it's a scriptable c

jbarlow83 7.9k Jan 03, 2023
Primary QPDF source code and documentation

QPDF QPDF is a command-line tool and C++ library that performs content-preserving transformations on PDF files. It supports linearization, encryption,

QPDF 2.2k Jan 04, 2023