Author Topic: Canon 5D Mark II / 5D2  (Read 737421 times)

An147

  • New to the forum
  • *
  • Posts: 5
Re: Canon 5D Mark II / 5D2
« Reply #925 on: July 11, 2021, 07:43:53 PM »
Hi guys!
I have an idea of some autofocus module:
1. Need to copy Deep Neural Network basics (rewrite in C/C++?)
2. There is Tiny YOLOv3 for constrained environments: https://pjreddie.com/darknet/yolo/
The bad part is that weight file still too big (33.7 Mb), can we locate it in fragmented shoot_malloc memory?
3. Make a small JPG/any other fast format dump from the video stream
4. Analyze it using YOLO, detect e.g. faces, optionally draw bounding boxes around on LiveView
5. Saving size of bounding box and it's position
6. If bounding box became bigger - focusing front, if became smaller - focusing back
7. Also we have info about focal length and resolution, so we can calculate physical size of subject in bounding box, isn't it? It can help sometimes I think.

The most difficult part is to run all this stuff inside small memory and I'm not sure about CPU capabilities.

The other workaround is to train own DNN, not so powerful but enough to test and with small weights file.
What do you think?

P.S. The awesome part about YOLO is that it can detect not only faces, but subject. E.g. you can give the camera a command: "keep in focus this banana please" or "keep in focus this one horse please".
P.S.S. We will need an interface to switch between the targets (joystick?) and a targets description itself (type in a keyboard? predefined choise menu: animals, people faces, cars etc.).

I have 5D Mark II. so I'm asking here.
Also I get some old knowledge of C/C++, and some ASM, but never developed any low-level things, only video-games.

Hisham

  • New to the forum
  • *
  • Posts: 5
Re: Canon 5D Mark II / 5D2
« Reply #926 on: August 03, 2021, 07:14:20 PM »
hello to all
 I tried ML on my 5d mark 2 long times ago and the Moire was very bad also the fast CF cards are far expensive for me so vaf is not an option for me. my main work is Short films and I need very stable recording. that said my 3 questions now
1- is can I stick to the h.264 since I don't need raw right now and still use the great ml features like focus peeking and many others?
2- is it possible to increase h.264-bit rate a bit little as far as my Cards can handle ( about 50mbs cards ) ?
3 - using raw but something lite like 1280 by 720 raw ( my guess is that Moire may be more severe ) ?
what is the best option available for me in Your opinion?
thank You in advance and Sorry for my bad English 

masc

  • Contributor
  • Hero Member
  • *****
  • Posts: 1865
Re: Canon 5D Mark II / 5D2
« Reply #927 on: August 03, 2021, 07:31:30 PM »
@Hisham:
1: yes
2: yes
3: not really, you just can crop.
No matter if you use RAW or h.264: you'll always have moiree with 5D2, and you'll always need CF. Btw: Komputerbay CF cards aren't really expensive.
5D3.113 | EOSM.202

Hisham

  • New to the forum
  • *
  • Posts: 5
Re: Canon 5D Mark II / 5D2
« Reply #928 on: August 03, 2021, 07:48:28 PM »
@Hisham:
1: yes
2: yes
3: not really, you just can crop.
No matter if you use RAW or h.264: you'll always have moiree with 5D2, and you'll always need CF. Btw: Komputerbay CF cards aren't really expensive.
Thank You for Your Fast response and Your help
I understand that moiree pattern will be always present but I noticed it is far more severe when I tried ml in the past, I do have cf cards but not that fast for raw and Komputerbay CF cards not present in my country ( Egypt ) and If I try to get it out of my country shipping will be huge + taxes, about improving h.264 bit rate what are the setting you recommend for me and any other advice You recommend in my case will be very much appreciated .. thank You again and again

Skinny

  • Freshman
  • **
  • Posts: 83
Re: Canon 5D Mark II / 5D2
« Reply #929 on: August 03, 2021, 09:30:40 PM »
if you use 10 or 12 bits and change aspect ratio from 16:9 to 1:2,40 or something like that, you can have continuous recording with relatively slow cards. Try resolutions such as 1880x720 or so... and it depends on what you want to shoot, but sometimes you don't need continuous recocording. Sometimes 20-30 seconds is enough.

About moire - it is present in h.264 recordings as well, the reason you see it more in RAW is because the raw footage is much sharper. Vintage lenses wide open can reduce such artefacts, and remember to keep problematic objects (grids, fences, sharp diagonal lines) just slightly out of focus... And if you uploading to youtube, it will be less detailed anyway so nobody will notice any small imperfections :)


And I found a way to significantly reduce aliasing and moire, by using 2x anamorphic adapter. It requires to compress the height 2x in post, so you have twice the vertical pixels and details. It is almost 3x1 mode, but not exactly... And I think anamorphic adapter acts as a VAF filter if focus is not 100% perfect. You can even tweak it to slightly blur vertically or horisontally, because the whole system is dual focus.

reddeercity

  • Contributor
  • Hero Member
  • *****
  • Posts: 2293
Re: Canon 5D Mark II / 5D2
« Reply #930 on: August 05, 2021, 02:37:59 AM »
..... about improving h.264 bit rate what are the setting you recommend for me and any other advice You recommend in my case will be very much appreciated ..
Before raw video , I used H264 + Log picture profile & set the bite rate to the highest or near that , i would get
.mov file at about 65Mb/s to 70Mb/s , then  i just de-log it to Rec709 with a (rec709 Lut)

Go to https://www.technicolor.com/cinestyle  & download "technicolor_cinestyle_v1.0.zip" file
you get the Technicolor_CineStyle_v1.0.pf2 (picture profile) & a S-curve for de-loging
The de-logling file is normally a 3d-LUT but the technicolor one is a .mga file if you open it up in a text you can see all the valves
Code: [Select]
#HEADER
#filename: S-curve_for_CineStyle.mga
#type: 3D cube file
#format: 1.00
#created:
#owner: technicolor
#title: S-curve_for_CineStyle
#END
channel 3d
in 35937 out 65536

format lut values
red green blue
0 0 0
1 0 0 128
2 0 0 641
3 0 0 1409
4 0 0 2434
5 0 0 3844
6 0 0 5445
7 0 0 7367
8 0 0 9545
9 0 0 11915
10 0 0 14478
11 0 0 17233
12 0 0 20179
13 0 0 23190
14 0 0 26329
15 0 0 29532
16 0 0 32735
17 0 0 35939
18 0 0 39142
19 0 0 42217
20 0 0 45292
21 0 0 48174
22 0 0 50929
23 0 0 53555
24 etc. ...

You may able to just rename it to 3d lut not sure never try it thou .
plus there a text with S-curve so you may able to convert it to  a 3d/1d lut i think.
ARRI has a free LUT generator ,
https://www.arri.com/en/learn-help/learn-help-camera-system/tools/lut-generator

This just a quick test , but it may work didn't test it  but there other free lut generator
plus /Blackmagic Resolve also has the ability to create LUT also.

If i can find my old S-curve .mga file i converted to a 3d-LUT I'll post a link to it.
Here you go
CineStyle_LUT_to_Converted_3d_LUT.zip


Hisham

  • New to the forum
  • *
  • Posts: 5
Re: Canon 5D Mark II / 5D2
« Reply #931 on: August 05, 2021, 08:35:45 AM »


Thank You very much really for All Your help