Find the korean drama just with screenshot
- Code fork from nafis by @salismazaya
- @asmindev
The video is split into frames (in my case, I split 2 frames/second), then the frames are saved as a vector/matrix and the default model used is the resnet-18.
Clone the project and highly recommended to make a virtual enviroment
git clone https://github.com/asmindev/trace-scene
Go to the project directory
cd trace-scene
Install dependencies
pip install -r requirements
Adding video to database follow this instruction
Start the server
python3 app.py
Testing
curl -X POST -F "file=@path/to/your/file.jpg" http://localhost:5000/search
Folder videos structure
videos
│ ├── Series-name-1
│ │ ├── 001.mp4 # eps 1
│ │ └── 002.mp4 # eps 2
│ │
│ ├── Series-name-2
│ │ ├── 001.mp4
│ │ ├── 002.mp4
│ │ └── 002.mp4
│ │
│ ├── Series-name-3
│ │ ├── 001.mp4
│ │ └── 002.mp4
│ │
│ └── Series-name-4
│ ├── 001.mp4
│ ├── 002.mp4
│ └── 002.mp4
│
├── bulk_split_video.py
├── add_to_database.py
└── app.py
Splitting video and save to pickle
python3 bulk_split_video.py
Add pickle to vector database
python3 add_to_database.py
Server: Flask
Database: Chromadb
Machine Learning: pytorch, img2vec