keplerlab / katna Goto Github PK
View Code? Open in Web Editor NEWTool for automating common video key-frame extraction, video compression and Image Auto-crop/Image-resize tasks
Home Page: https://katna.readthedocs.io/
License: MIT License
Tool for automating common video key-frame extraction, video compression and Image Auto-crop/Image-resize tasks
Home Page: https://katna.readthedocs.io/
License: MIT License
I extracted images from video.
It looks like image sequence is wrong.
How do I fix it?
Hi, congratulations o your work! :-)
So, I'm trying to use katna on a windows 10 machine with 16gb ram, python 3.8 and katna 0.9.0.
I am testing using a 2,6gb video and my memory keeps reaching 100% and the script eventually crashes. I also tried setting the Katna.config.FrameExtractor.max_frames_in_chunk from 2500 to 100 and Katna.Video.n_processes to 1, but still got the same problem. Any idea of how to solve this?
This is a snippet of the code I'm running:
if __name__ == "__main__":
# initialize video module
vd = Video()
print('vd.n_processes:')
print(vd.n_processes)
# number of images to be returned
no_of_frames_to_returned = 12
diskwriter = KeyFrameDiskWriter(location=out_path)
# extract keyframes and process data with diskwriter
vd.extract_video_keyframes(
no_of_frames=no_of_frames_to_returned, file_path=video_file_path,
writer=diskwriter
)```
it seems the "key frames extraction methods" works well, is there any referring papers I can get more detail info from?
I tried to use this module to detect keyframes, it's returning me an empty list? can you tell me what is the possible reason for that?
Hello,
it would be have AUR package so user will be able to install katna throw package manager.
i want to know how i can extract the corinates of the smart cropped image in respect to the original image like
crop{
x:
y:
weigth:
height:}
Is it possible to compute timestamp for extracted frames as frame metadata?
The sorting of the output key frame images is random, not the order of video frames. It is highly recommended that the name of the output image is the frame ID.
when i use kanta to process my video , it send this erro.could you tell me how to solve it?
pip3 install katana
installs a different package from pypi.
Can this be excluded form the documentation and readthedocs pages please?
Or Can we create a new pypi target for the project?
I have found new erro. I use
imgs = vd.extract_video_keyframes(no_of_frames = no_of_frames_to_return, file_path= video_file_path)
to extract keyframe frome my video.
is it can be trained in my dataset?
as the doc has say, video must create in main.
i have a project, which need to use video extract function, but there are other processes.
how can i pass video object to other processes since it's contain pool.
thanks for answering.
Using the example "crop all images in a single directory", if I use:
# crop dimensions
crop_width = 512
crop_height = 512
Then I'll also get images that are 460x460, as well as 512x512. Is there a way to force the specified dimensions only?
Hello, the link mentioned in the readme - https://keplervaani.com/katna/tutorials.html is unavailable. Can something be done to get it up and running? Thanks!
after i extract the key frames ,can i locating which frame positon of the result?
thks
Hi, thanks for the wonderful tool!
I wonder where I can make some modifications to let the output key frames named by their exact frame id in the original video frame sequence ;D
I use the basic extract_video_keyframes function in Colab. Sometimes it works but most of the time it takes a pretty long time to extract keyframes. I only want to extract the single one frame from a 15s video. Has anybody also face this problem? Or is there anything wrong with my environment settting?
Can you please help me for sorting the extracted images from video. The extracted Images are not in sequence as per video playback.
Haven't tried yet, but am wondering what is the best mechanism for doing less work for a given video to speed up?
Can we just skip N frames in the range
here?
katna/Katna/frame_extractor.py
Line 98 in 5e2e570
I'm aiming to find the places of the algorithm that takes the longest time and try to minimize it,
Can a possible way to do so will be to consider a video as a collection of 1 frame for every 1 sec and then doing the same pipeline?
How long it takes to get 5-10 frames from a 1,5,10,15,20,25,30 min videos? with how many cores?
Thanks
The specified method isn't working.
ValueError Traceback (most recent call last)
in ()
4
5 #instantiate the video class
----> 6 vd = Video()
7
8 #number of key-frame images to be extracted
2 frames
/usr/lib/python3.6/multiprocessing/pool.py in init(self, processes, initializer, initargs, maxtasksperchild, context)
165 processes = os.cpu_count() or 1
166 if processes < 1:
--> 167 raise ValueError("Number of processes must be at least 1")
168
169 if initializer is not None and not callable(initializer):
ValueError: Number of processes must be at least 1
Memory not getting cleared and python crashing when running script on >30 videos
when I call the extract_video_keyframes method
No matter what The parameter 'no_of_frames' set to,
only 4 frames of images will be returned
this is my code
from Katna.video import Video
from Katna.writer import KeyFrameDiskWriter
vd = Video()
diskwriter = KeyFrameDiskWriter(location="selectedframes")
video_file_path = 'D:/video/color.avi'
no_of_frames_to_returned = 40
frame = vd.extract_video_keyframes(
no_of_frames=no_of_frames_to_returned, file_path=video_file_path,
writer=diskwriter
)
my video have 171 frames and no_of_frames is equal to 40, but only return four frames.
please help me ,please
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.