かの有名なあの東方二次創作ソング、「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アプリのコードを中心に、適当にアップしていく予定
赤紫
Balabobapy - Using artificial intelligence algorithms to continue the text

Balabobapy - Using artificial intelligence algorithms to continue the text

qxtony 1 Feb 04, 2022
Sign Language Recognition service utilizing a deep learning model with Long Short-Term Memory to perform sign language recognition.

Sign Language Recognition Service This is a Sign Language Recognition service utilizing a deep learning model with Long Short-Term Memory to perform s

Martin Lønne 1 Jan 08, 2022
Image augmentation library in Python for machine learning.

Augmentor is an image augmentation library in Python for machine learning. It aims to be a standalone library that is platform and framework independe

Marcus D. Bloice 4.8k Jan 04, 2023
Can We Find Neurons that Cause Unrealistic Images in Deep Generative Networks?

Can We Find Neurons that Cause Unrealistic Images in Deep Generative Networks? Artifact Detection/Correction - Offcial PyTorch Implementation This rep

CHOI HWAN IL 23 Dec 20, 2022
Hand gesture detection project with aweome UI implementation.

an awesome hand gesture detection project for you to be creative! Imagination is the limit to do with this project.

AR Ashraf 39 Sep 26, 2022
Détection de créneaux de vaccination disponibles pour l'outil ViteMaDose

Vite Ma Dose ! est un outil open source de CovidTracker permettant de détecter les rendez-vous disponibles dans votre département afin de vous faire v

CovidTracker 239 Dec 13, 2022
Unofficial implementation of "TableNet: Deep Learning model for end-to-end Table detection and Tabular data extraction from Scanned Document Images"

TableNet Unofficial implementation of ICDAR 2019 paper : TableNet: Deep Learning model for end-to-end Table detection and Tabular data extraction from

Jainam Shah 243 Dec 30, 2022
Tool which allow you to detect and translate text.

Text detection and recognition This repository contains tool which allow to detect region with text and translate it one by one. Description Two pretr

Damian Panek 176 Nov 28, 2022
Code for the paper "Controllable Video Captioning with an Exemplar Sentence"

SMCG Code for the paper "Controllable Video Captioning with an Exemplar Sentence" Introduction We investigate a novel and challenging task, namely con

10 Dec 04, 2022
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
Pure Javascript OCR for more than 100 Languages 📖🎉🖥

Version 2 is now available and under development in the master branch, read a story about v2: Why I refactor tesseract.js v2? Check the support/1.x br

Project Naptha 29.2k Jan 05, 2023
Handwriting Recognition System based on a deep Convolutional Recurrent Neural Network architecture

Handwriting Recognition System This repository is the Tensorflow implementation of the Handwriting Recognition System described in Handwriting Recogni

Edgard Chammas 346 Jan 07, 2023
Code for the "Sensing leg movement enhances wearable monitoring of energy expenditure" paper.

EnergyExpenditure Code for the "Sensing leg movement enhances wearable monitoring of energy expenditure" paper. Additional data for replicating this s

Patrick S 42 Oct 26, 2022
pyntcloud is a Python library for working with 3D point clouds.

pyntcloud is a Python library for working with 3D point clouds.

David de la Iglesia Castro 1.2k Jan 07, 2023
A simple component to display annotated text in Streamlit apps.

Annotated Text Component for Streamlit A simple component to display annotated text in Streamlit apps. For example: Installation First install Streaml

Thiago Teixeira 312 Dec 30, 2022
CRAFT-Pyotorch:Character Region Awareness for Text Detection Reimplementation for Pytorch

CRAFT-Reimplementation Note:If you have any problems, please comment. Or you can join us weChat group. The QR code will update in issues #49 . Reimple

453 Dec 28, 2022
Official implementation of Character Region Awareness for Text Detection (CRAFT)

CRAFT: Character-Region Awareness For Text detection Official Pytorch implementation of CRAFT text detector | Paper | Pretrained Model | Supplementary

Clova AI Research 2.5k Jan 03, 2023
Motion Detection Squid Game with OpenCV Python

*Motion Detection Squid Game with OpenCV Python i am newbie in python. In this project I made a simple game to follow the trend about the red light gr

Nayan 17 Nov 22, 2022
第一届西安交通大学人工智能实践大赛(2018AI实践大赛--图片文字识别)第一名;仅采用densenet识别图中文字

OCR 第一届西安交通大学人工智能实践大赛(2018AI实践大赛--图片文字识别)冠军 模型结果 该比赛计算每一个条目的f1score,取所有条目的平均,具体计算方式在这里。这里的计算方式不对一句话里的相同文字重复计算,故f1score比提交的最终结果低: - train val f1score 0

尹畅 441 Dec 22, 2022
Read-only mirror of https://gitlab.gnome.org/GNOME/ocrfeeder

================================= OCRFeeder - A Complete OCR Suite ================================= OCRFeeder is a complete Optical Character Recogn

GNOME Github Mirror 81 Dec 23, 2022