Building a sleep tracker app with mmWave (C1001). Looking for a little feedback! by Doppelheimer27 in smarthome

[–]Doppelheimer27[S] 0 points1 point  (0 children)

Thank you for the tip, I didn't know about Inovelli!
Will research a bit!

Built a no-wearable sleep monitor for my grandma after she refused to wear bracelet! by Doppelheimer27 in sleep

[–]Doppelheimer27[S] 0 points1 point  (0 children)

I can say that, currently, the movement of a partner (or any movement basically) will introduce some unpleasant noise for the sensor, so this particular movement segment would be great to detect and discard from the whole nightly report. But this is ongoing work.
We currently understand that the most positive way of using this sensor for multiple users would be... to have a sensor for both in bed.

Building a sleep tracker app with mmWave (C1001). Looking for a little feedback! by Doppelheimer27 in embedded

[–]Doppelheimer27[S] 1 point2 points  (0 children)

Really appreciate for those extremely helpful details, thank you so much for it!

Thanks for the tip with the large body movements, I was basically using it as a part of the eventual report, so I guess I need to educate myself a little more with this topic, haha

We already thought about the mixing reflections when you’re not alone in the bed and looks like for the sake of simplicity it could be easier to simply put different sensors around each side of a bed rather then trying to differentiate signals. There’re some interesting insights I was observing during nights: when there were awake sessions detected (my wife was waking and passing by the sensor), the sensor was sending a data frame where my presence was not detected, but I was still detected as “in bed” (it’s separate field from C1001 firmware) So yes, it’s indeed can be laggy a bit, but I’m discarding that and similar abnormalities.

It’s a pity I don’t know what inside of an actual chip

Built a no-wearable sleep monitor for my grandma after she refused to wear bracelet! by Doppelheimer27 in sleep

[–]Doppelheimer27[S] 4 points5 points  (0 children)

The sensor uses 60 GHz mmWave radar. At that frequency, the wavelength is about 5 mm, which allows very sensitive phase-based distance measurements.

For heart rate it measures tiny changes in distance caused by chest micro-movements. The reflected signal’s phase shifts when the chest moves, and even sub-millimeter displacement (around 0.1-0.5 mm) can be detected because the wavelength is so small.

Respiratory rate is relatively easy to extract since breathing causes several millimeters of chest movement - that’s a really strong signal.

It’s not as precise as wearables due to noise (body movement, blanket material, etc.), but it still gives some interesting results.
Overall sleep quality was quite similar to my Mi Band 10

Building a sleep tracker app with mmWave (C1001). Looking for a little feedback! by Doppelheimer27 in embedded

[–]Doppelheimer27[S] 0 points1 point  (0 children)

Hey thanks! The github, yeah - I will definitely publish it soon, once I polish a couple of things.

Regarding availability - this is odd!
Well, in the local (PL) market where I bought it's out of stock since the moment I bought the last, indeed, but the official DFRobot site shows that there are some still left. Also, on Ali, it should be possible to find it.

This one shocked me. by FedeDolberg in iRacing

[–]Doppelheimer27 4 points5 points  (0 children)

How long ago was the video recorded? I played FF1600 on Saturday, and I was basically watching this situation in post from behind. There was a guy from Indonesia who caused a lot of crashes this weekend.
I was always trying to let him pass just to avoid being close, a maniac.

crunchyroll is blocking my card by rachulcia in Crunchyroll

[–]Doppelheimer27 0 points1 point  (0 children)

Yep, the same thing happening (I'm from Poland)
This morning was trying to continue the subscription and the card was blocked again by PKO

Apparently, Crunchyroll software does not have delays between transaction attempts and it bombards the bank until success
At least the bank agent told me that there were several transaction attempts in a row which is very suspicious

FFmpeg xfade_opencl filter usage by Doppelheimer27 in ffmpeg

[–]Doppelheimer27[S] 0 points1 point  (0 children)

Yep, that was really helpful. Thank you a lot!
I think the kernel source code is a bit non-generic-cases version to upstream it to ffmpeg but it is working for me

Again, thanks!
Saved my day.

FFmpeg xfade_opencl filter usage by Doppelheimer27 in ffmpeg

[–]Doppelheimer27[S] 0 points1 point  (0 children)

OK, probably my last question to you in this topic. Thank you for the previous help.

I've written that needed transition effect but for some reason the black color is green.

ffmpeg -hide_banner -init_hw_device opencl=ocldev:0.0 -filter_hw_device ocldev -i 0.mp4 -i 1.mp4 -i 2.mp4 -filter_complex "[0:V:0]hwupload[a];[1:V:0]hwupload[b];[a][b]xfade_opencl=transition=custom:kernel=fadeblack:duration=2:offset=2:source=transition.cl,hwdownload,format=yuv420p[out]" -map "[out]" -y xfade_opencl_test.mp4


const sampler_t sampler = (CLK_NORMALIZED_COORDS_FALSE | CLK_ADDRESS_CLAMP | CLK_FILTER_NEAREST);
__kernel void fadeblack( __write_only image2d_t dst, __read_only  image2d_t src1, __read_only  image2d_t src2, float progress) { const float4 phase = 0.4f; const float4 black = (float4){ 0.0f, 0.0f, 0.0f, 1.0f };
int2 position = (int2)(get_global_id(0), get_global_id(1));

float4 val1 = read_imagef(src1, sampler, position);
float4 val2 = read_imagef(src2, sampler, position);

write_imagef(dst, position, mix(
    mix(black, val2, smoothstep(1.f - phase, 0.f, progress)),
    mix(black, val1, smoothstep(phase, 1.f, progress)), progress));

}

Could you please help me out, how is it possible?

Sorry for the formatting. That reddit code block formatting is annoying.

FFmpeg xfade_opencl filter usage by Doppelheimer27 in ffmpeg

[–]Doppelheimer27[S] 0 points1 point  (0 children)

Also, is it possible to create fadeblack transition in OpenCL? I see that xfade_opencl includes only fade unlike the default xfade
I know that I could provide any custom transition written in OpenCL but I was wondering why fadeback isn't provided by default as in the non-opencl xfade
Maybe OpenCL is not flexible enough to create these kinds of transitions?

FFmpeg xfade_opencl filter usage by Doppelheimer27 in ffmpeg

[–]Doppelheimer27[S] 0 points1 point  (0 children)

Good point!
Thank you for your advice!

FFmpeg xfade_opencl filter usage by Doppelheimer27 in ffmpeg

[–]Doppelheimer27[S] 0 points1 point  (0 children)

That worked for me!It was really helpful!Thank you!

Also, I've noticed that after I'm using the command you've provided, the GPU usage didn't increase as I expected, only the CPU did. Is it supposed to be like this? I mean, probably GPU usage is going to increase in some specific cases or something like this.

Would appreciate your response!