Closed meet-soni5720 closed 1 week ago
Hi, I would like to know what versions of python and numpy are installed in your machine environment?
import numpy
numpy.__version__
Hi, numpy version in my system is 2.1.2, and the Python version is 3.10.15.
I think it should be a mismatch of numpy, could you try this command to install numpy 1, and try again?
pip install numpy==1.26.4
The issue is resolved after updating numpy to 1.26.4, working fine now; Thank you!
I am creating new module for video segmentation, and while converting the processed output from model (numpy array) to videoFrame, the process terminates with floating point exception:
Floating point exception (core dumped)
code part: [followed from colorization demo] rgbinfo = mp.PixelInfo(mp.PixelFormat.kPF_RGB24)
annotated_frame = np.array(annotated_frame) print(f"annotated frame: {annotated_frame}") np_op = mp.from_numpy(annotated_frame) out_f = mp.Frame(np_op, rgbinfo) out_vf = VideoFrame(out_f) out_vf.pts = in_frame.pts out_vf.time_base = in_frame.time_base out_pkt = Packet(out_vf)
output: annotated frame: [[[ 7 9 11] [ 8 10 12] [ 9 11 13] ... [ 5 7 6] [ 4 6 5] [ 4 6 5]]
[[ 7 9 11] [ 8 10 12] [ 9 11 13] ... [ 6 8 8] [ 5 7 6] [ 5 7 6]]
[[ 7 9 11] [ 8 10 12] [ 9 11 13] ... [ 8 11 10] [ 7 9 9] [ 7 9 9]]
...
[[14 16 20] [15 17 21] [16 18 22] ... [13 11 11] [12 9 10] [12 9 10]]
[[13 15 19] [14 16 20] [15 17 21] ... [13 11 11] [12 9 10] [12 9 10]]
[[12 14 18] [13 15 19] [14 16 20] ... [12 9 10] [12 9 10] [12 9 10]]]
Floating point exception (core dumped)
This happens on line: np_op = mp.from_numpy(annotated_frame)
BMF version: BabitMF-GPU==0.0.11
CUDA : 12.1
ffmpeg version:
ffmpeg version 4.2.7-0ubuntu0.1 Copyright (c) 2000-2022 the FFmpeg developers built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)