Canon 5D Mark II / 5D2

Started by ted ramasola, March 27, 2014, 08:34:06 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


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:
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.


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 


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


Quote from: masc on August 03, 2021, 07:31:30 PM
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


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.


Quote from: Hisham on August 03, 2021, 07:48:28 PM
..... 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  & download "" 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
#filename: S-curve_for_CineStyle.mga
#type: 3D cube file
#format: 1.00
#owner: technicolor
#title: S-curve_for_CineStyle
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 ,

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


Thank You very much really for All Your help


Hello everyone !
Very long time user of ML, first time poster  :)

Up until now I was only recording in camera on my 5d mark II and ML worked flawlessly.
I wanted to do some talking heads video so I bought an HDMI USB capture card (Avermedia live streamer cap 4k) and it works fine.

Except my 5d mk II is stuck in 480p.

I only use LiveView without recording and "Force HDMI-VGA" is unchecked. I tried my APN on a monitor and my HC amplifier (it has a scaler so I can check the HDMI input signal properties) : eveveryone is saying the output is 480p.
I tried a bunch of ML parameter combinations, reverted back to the official Firmware, cleared the settings, re installed ML, installed older ML versions, nothing worked.

I read everything I could find on this forum and others. A few people seem to face the issue but it would appear they find a solution at some point.

Do any of you have any idea about what else I could try ? 


Hello @liteo

You can force 1080i output on 5D2 by using the following module:
HDMI Output Settings (


Hello @theBilalFakhouri

IT WORKS !!! A massive thanks to you for your module  :)

Your module wouldn't work with the latest release from the iso-research branch on my 5D2.
I had to use a custom crop_rec_4k release (official release of crop_rec_4k for 5D2 doesn't exist) mentionned here
The bitbucket to download the release no longer exists but can be found here


Is there a capability for 5D2 to record in 10 and/or 12 bit lossless?

Is there a card overclock for 5D2?
Canon EOS 5D Mk III + Canon 24-105 F/4 L IS USM + SanDisk Exreme Pro 64 GB (SD, ML Nightly.2021Feb07.5D3113) + SanDisk Extreme Pro 128 GB (CF).


5D3.113 | EOSM.202