Current Server Time: 18:09 (Central Europe)

#apertus IRC Channel Logs

2019/04/02

Timezone: UTC


00:30
intrac
left the channel
00:31
intrac
joined the channel
01:19
araml
left the channel
02:48
aombk
joined the channel
02:48
aombk2
left the channel
05:09
siddhantsahu
BAndiT1983: Is there any plan to add OpenCV to OpenCine?
05:22
BAndiT1983|away
changed nick to: BAndiT1983
05:23
BAndiT1983
siddhantsahu, what should be the purpose of it?
05:33
siddhantsahu
OpenCV has a module "dnn" which implements the most common building blocks layer (Convolution, ReLu, RNN etc.) which can be used for loading, running pre-trained neural networks (inference).
05:34
siddhantsahu
More on it here https://github.com/opencv/opencv/wiki/Deep-Learning-in-OpenCV
05:34
BAndiT1983
and?
05:36
siddhantsahu
It also support multiple computational backends (Intel's Inference Engine) which makes running deep learning neural networks for inference in CPU very efficient.
05:36
siddhantsahu
More on it here https://github.com/opencv/opencv/wiki/Intel%27s-Deep-Learning-Inference-Engine-backend
05:37
BAndiT1983
i don't have time to check your links, please create a proper summary of what needs to be done, planned steps etc.
05:37
siddhantsahu
For T1142 I wish to use some pre-trained neural network models for the task.
05:39
siddhantsahu
Not just for "White balancing" algorithms many state of the art denoising, deblurring, resizing (superresolution) uses neural networks.
05:39
siddhantsahu
It would great over OpenCine users if they can use these algorithms.
05:40
BAndiT1983
neural networks here, neural networks there, hearing this buzzwords every day on the net, but you have to deliver more than an advertisement to get an approval, and this means proper plan
05:40
siddhantsahu
I need user suggestion, if it is only possible to use the "dnn" module only of OpenCV in OpenCine?
05:44
siddhantsahu
So incase OpenCine uses some deep learning algorithms it can use this "dnn" module.
05:44
BAndiT1983
of course, it uses tensorflow to locate humans in the picture and to tell us, if it's donald trump or not
05:45
siddhantsahu
Is it good idea to implement a "dnn" module inside OpenCine or can we use the "dnn" module of OpenCV?
05:45
BAndiT1983
you tell me, i don't have a clue about neural networks
05:47
siddhantsahu
No no the OpenCV's "dnn" module is only used to do the inference
05:48
siddhantsahu
That means once the model is build and trained on a large dataset using some deep learning frameworks like Tensorflow, Caffe, etc.
05:48
siddhantsahu
We get two files
05:49
siddhantsahu
One the models architecture and the trained model's parameter.
05:50
siddhantsahu
These two files are read by the OpenCV's dnn module methods like readNetFromTensorflwo() to load, and do the actual inference.
05:51
siddhantsahu
This module is highly optimized to run on Intel CPU's
05:53
siddhantsahu
So if have a trained model for a specific problem (denoising, deblurring, white balacing ..etc) we can just import and load these two files and do the inference and get our denoised, deblurred and adjusted white balanced image.
05:54
siddhantsahu
Among the two files which we get after training using deep learning frameworks (Tensorflow, Caffe etc) 1.) First the models architecture file, used to build the model 2.) Second are the actual model's parameters.
05:55
BAndiT1983
very nice, but first i would suggest to do more work on challenge code, as i see many problems there and a lot of duplications
05:55
BAndiT1983
off for work, will be back later
05:55
BAndiT1983
changed nick to: BAndiT1983|away
05:56
siddhantsahu
Yes working on the C++ challenge, will send you for review once it's done.
06:09
dcz
joined the channel
07:23
apurvanandan[m]
Hi,
07:24
apurvanandan[m]
In the usb plugin module, in what format video is going to be transmitted at the usb end?
07:24
apurvanandan[m]
For streaming purpose
08:19
sebix
joined the channel
08:53
Bertl_zZ
changed nick to: Bertl
08:53
Bertl
morning folks!
08:59
Bertl
apurvanandan[m]: there are two option here, we can use the FT601 and have raw data and we can use the FT602 which basically creates an UVC device
09:00
Bertl
in the first case it is completely up to us to define the data stream but we will require custom software on both ends
09:01
Bertl
in the second case we are the sender and do not need to bother with the software on the receiver side, but we are limited to the UVC formats and need to set them up properly
09:09
futarisIRCcloud
left the channel
09:13
dcz
left the channel
09:34
danieel
Bertl: what are the most visible differences between a FX3 and FT601 ?
09:35
danieel
if the uvc can bear 422/10b, then sort of log-raw can still be passed through it, but the receiver shall be aware of it being RGGB not YUV
09:36
Bertl
mostly price and that the FX3 requires specific firmware while the FTDI works out of the box
09:37
Bertl
but the FX3 might be more flexible because of this
09:39
Bertl
the RGGB as YCrCb is a nice idea, not sure what software supports this though
09:44
Bertl
haven't checked the UVC specification yet, might as well be that they already have something similar defined
09:47
vup2
The receiver side of the ft601 also does not look too complicated, so i don't think the restriction to UVC would really be worth it
09:48
danieel
uvc1.5 has no mention of raw, bayer, cfa
09:49
danieel
there is a "vendor defined" frame based option though
09:50
vup2
It also has a `uncompressed` payload type
10:09
Bertl
the only reason for using the UVC version would be that it 'works' out of the box on any platform
10:10
danieel
well it could have a fake debayer to yuv as initial mode, that code you already have for the hdmi
10:11
Bertl
yup
10:14
Bertl
but the main plan for the USB interface is to get raw data out
10:19
Bertl
off for now ... bbl
10:20
Bertl
changed nick to: bertl_oO
10:48
dcz
joined the channel
11:49
fizz
joined the channel
11:52
aombk2
joined the channel
11:56
aombk
left the channel
12:10
fizz
left the channel
12:11
aombk
joined the channel
12:12
aombk2
left the channel
12:49
se6astian|away
changed nick to: se6astian
13:21
aombk
left the channel
13:26
aombk
joined the channel
14:00
aombk2
joined the channel
14:01
aombk
left the channel
14:07
aombk
joined the channel
14:09
aombk2
left the channel
14:17
mrohit[m]
Hey se6astian , is there any specific clang-format style in which the C++ challenge code is expected to be formatted in?
14:31
bertl_oO
changed nick to: Bertl
14:31
Bertl
back now ...
14:31
vup2
mrohit[m]: you can use https://github.com/axiom-micro/axiom-control-daemon/blob/master/.clang-format for now
14:32
mrohit[m]
ok, thanks!
14:58
BAndiT1983|away
changed nick to: BAndiT1983
14:59
Bertl
... and off again ... bbl
14:59
Bertl
changed nick to: Bertl_oO
15:02
se6astian
changed nick to: se6astian|away
15:05
illwieckz
left the channel
15:46
dev_
joined the channel
15:47
dev_
Hey BAndiT1983 , free to check the C/C++ challenge right now ?
15:49
BAndiT1983
not really, but i have seen several problems there
15:49
BAndiT1983
like variables starting with upper-case
15:50
BAndiT1983
also too long methods
15:51
BAndiT1983
what should this code do? ->
15:51
BAndiT1983
file << (isdebayered ? "P6" : "P5");
15:51
BAndiT1983
file << std::endl;
15:52
dev_
if the isdebayered is true , then it will write for PPM and is false then it will be grayscale and will write in pgm
15:52
BAndiT1983
AVI generation is not really usable in this form, as size calculation is very rigid
15:52
BAndiT1983
and what does the second line do?
15:53
dev_
ppm is for final debayered image
15:53
dev_
it is for space in ppm file format, "P6 height width 256 "
15:53
BAndiT1983
and why is it in a separate line?
15:54
dev_
it was looking long
15:54
dev_
and messy too becouse of endl , so it shifted it in next line
15:55
saurabh_raj
joined the channel
15:55
BAndiT1983
ehm, don't think so, cause this looks like a waste of lines for unnecessary stuff
15:55
dev_
okay i will change it,1. Captial variable (there are few ) 2. this endl thing
15:56
BAndiT1983
check your code thoroughly, as it's up to you to deliver high quality
15:57
saurabh_raj
Hi BAndiT1983, got a chance to go through my code?
15:57
dev_
Hi saurabh_raj :)
15:57
BAndiT1983
a bit, but i can't figure out with so many abstractions and loops
15:57
BAndiT1983
this hides the target of the code from observer
15:58
BAndiT1983
i know what it should do, but the solution is way too complicated and riddled with unnecessary stuff
15:59
dev_
okay thanks BAndiT1983, if u got time also please check for proposal which i have send to team's email Id
15:59
saurabh_raj
i swtiched from nested loops to single loops and linear arrays.. i m using bilinear interpolation hence the loops.. should i switch to a different debayering algorithm?
16:01
BAndiT1983
it's not about switching to different algorithm, it's about having readable and maintainable code
16:01
dev_
left the channel
16:02
BAndiT1983
i see a lot of nested if/else in the loops and so on, not really performant
16:02
se6astian|away
changed nick to: se6astian
16:02
saurabh_raj
okey.. so apart from the loops, any serious issues?
16:02
aSobhy
left the channel
16:02
BAndiT1983
it's not my task to list every bit of problems there, but i see a lot of C-style code, which is not the goal for C++ challenge
16:03
BAndiT1983
a lot of abstractions which are unnecessary and just obfuscate the dataflow
16:03
BAndiT1983
why do you use so many data classes like pixelmap, raw12, bitmap?
16:03
BAndiT1983
missing blank lines to mark line which belong together, see main.cpp
16:04
saurabh_raj
pixelmap deals with writing ppm files, bitmap for bmp and raw12 loads the find and initializes the vectors
16:04
BAndiT1983
#pragma pack was implemented in GCC, but should be avoided
16:05
BAndiT1983
the structure is not clear, as you mix namespaces, classes etc., should be more clear how the data flows in the pipeline
16:06
saurabh_raj
so.. should I add comments?..
16:06
BAndiT1983
i don't see real OOP there
16:06
BAndiT1983
you can also add comments, but a good code should be readably
16:07
BAndiT1983
struct Streams is unnecesary
16:07
BAndiT1983
channels are hold in vector, which is not performant
16:07
BAndiT1983
usinged char should be replaced by uint8_t or uint16_t, depending on what you use
16:07
BAndiT1983
and so on
16:07
BAndiT1983
it's not my task to complete the challenge
16:08
saurabh_raj
okey.. i will try to make the code more readable and simple...
16:09
saurabh_raj
I was trying to do the writing avi tasks but I keep on getting the error could not demultiplex the file when I play the avi file
16:10
BAndiT1983
take a look at the prototype of OC frame server to get the idea ->
16:10
BAndiT1983
https://github.com/BAndiT1983/OC_FrameServer/tree/dev
16:11
saurabh_raj
thanks.. that really helps... I m sorry to annoy you.. but I am a fresher in college and open source development is new to me.
16:13
BAndiT1983
the main expectation is, that people want to learn new things and for GSoC it's a must, which is clearly defined by google in their FAQs
16:13
BAndiT1983
we have to select best ones and it does involve to avoid too much 'holding hand'
16:13
BAndiT1983
as the mentors do this stuff as volunteers, without payment
16:15
saurabh_raj
yeah.. i understand.. thanks for all the help.. i m really learning a lot..
16:21
dev_
joined the channel
16:21
dev_
left the channel
16:29
saurabh_raj
left the channel
16:32
apurvanandan[m]
In what format would you like the proposal to be in? A google doc, latex pdf or odt?
16:47
BAndiT1983
changed nick to: BAndiT1983|away
17:18
se6astian
PDF seems most universal
17:23
Bertl_oO
changed nick to: Bertl
17:23
Bertl
finally back ...
17:24
Bertl
apurvanandan[m]: bonus points for LaTeX, especially on the CV :)
17:26
mrohit[m]
hey Bertl , should we provide a link to the CV in the proposal or add the CV in the proposal?
17:28
Bertl
a link is probably the best way unless you want to incorporate it into the proposal
17:33
mrohit[m]
okay
17:34
BAndiT1983|away
changed nick to: BAndiT1983
17:57
sebix
left the channel
17:58
BAndiT1983
changed nick to: BAndiT1983|away
18:05
Ashu
joined the channel
18:08
Bertl
hey Ashu! How's going?
18:08
Ashu
Hi Bertl ,
18:09
Ashu
:) yesterday I explaine about how I wish to use GraphicMagick , is it right approach ?
18:09
Ashu
*explain
18:10
Bertl
well, yes and no, you are definitely heading into the right direction there
18:11
Bertl
I haven't evaluated GraphicsMagick yet but I fear that it is still not 'direct' enough for our purpose
18:11
Bertl
the problem I see is this:
18:12
Bertl
you need to do a lot of memory access from the CPU side to collect the data for computation
18:12
Bertl
for example for a histogram, you probably want to look at 20-50% of the image to get it resonably right
18:14
Bertl
the collected data is quite small (histogram will be a few hundred values)
18:14
Bertl
now you need to visualize it with the overlay, which in turn means additional memory access
18:15
Bertl
if the histogram takes up a quarter of the display for example, that means that it has about the same 'memory footprint' bandwidth wise as the data collection
18:16
Bertl
the only difference is that it is written to the memory instead of read
18:16
Bertl
so far everything is 'as expected' and we can't do a lot about it unless we put some of the visualization into the image pipeline
18:17
Bertl
but the sensitive point here obviously is 'reading' (the image data) and 'writing' (the overlay) in an efficient way
18:18
Bertl
the 'usual' PC approach is to reserve a bunch of 'memory' and draw there (with lines and other shapes) till you have something ready to show
18:18
Bertl
then 'simply' copy it over to the 'framebuffer' (overlay)
18:19
Bertl
but in our case, this would mean that you double the amount of memory accessed and with inefficient drawing primitives it will become even more
18:20
Bertl
as the memory bandwidth is limited, this in turn means that the framerate for the overlay drops dramatically
18:21
Bertl
so long story short, the ideal solution would be to not only collect the data in a very efficient way but also write the visualization data as directly as possible with a minimum of buffering or 'drawing' all over the place
18:22
Bertl
that said, a 'render' approach would probably be the best (I think I already mentioned that but probably failed to explain it in more detail)
18:23
Bertl
so we know that 'burst' access to the memory is quite efficient, but we haven't checked if it makes a difference on the total bandwidth or not
18:23
Bertl
(this is something which needs to be tested)
18:23
illwieckz
joined the channel
18:23
Bertl
but we know for sure that a 'single' write to each memory location is preferable to multiple writes
18:25
Bertl
i.e. for a histogram for example, it might make perfect sense to simply scan the 'visual' area column for column and row for row and for each pixel decide how it will look like and then simply write that 'pixel' to the overlay
18:27
Bertl
given that the 'decision' for the 'pixel color' is based on 'small' and 'local' data which is likely already cached and doesn't require any memory access, we are likely to get away without writing or reading anything twice
18:27
Bertl
does that make more sense now?
18:28
Ashu
You are right Bertl ,it makes sense. Using library will definately require a lot of memory access from CPU side .
18:32
Ashu
Probably rather than searching any library which suites our problem , it would be wise to draw graph from the code itself .
18:33
Bertl
at least for something like the histogram it is certainly a good and viable approach
18:33
Bertl
I'm not sure we should reinvent the wheel for more complex drawing though (which cannot be easily generated by 'rendering' the data)
18:34
Bertl
so it is likely to be a balance between our own special 'renderer' and rather generic drawing functions which can accomodate any framebuffer like setup
18:35
Bertl
there is also the 'complication' that it would be nice to find a solution for visualizing the accumulated data via web or similar
18:36
Bertl
note that in this case the drawing should definitely be client side
18:36
Bertl
so only data collection and preprocessing is required
18:37
Bertl
(think histogram on a tablet connected via wifi)
18:47
Ashu
" generic drawing functions " would making these for ourself is better approach ,
18:48
Bertl
I'm fine with that as well
18:51
Ashu
or what option we have other than this , can we find them too ?
18:52
Bertl
haven't checked but it really depends on the visualization we want to do
18:52
Bertl
(which is not set in stone, so we are somewhat flexible there)
18:53
Bertl
you might for example want to investigate 'good' and 'easy' visualizations for the data we want to collect as well as ways to collect them efficiently
18:54
Bertl
have some nice examples (mockups or existing solutions) in your proposal with explanations why they are well suited and how to generate them
18:57
Ashu
Now I can picturize real complications and problem here , It would definately require quality reading ,research and thinking to get optimise and well suited solution to this .
18:58
Bertl
yup, glad you have a more complete picture now
19:00
Ashu
thanku, for explaining things in this depth . I Will come back for discussion after doing little more research. :)
19:00
Bertl
you're welcome!
19:01
Ashu
left the channel
19:20
BAndiT1983|away
changed nick to: BAndiT1983
19:24
intrac
left the channel
19:25
intrac
joined the channel
20:15
Ashu
joined the channel
20:16
se6astian
changed nick to: se6astian|away
20:17
Ashu
left the channel
20:17
rohan_
joined the channel
20:18
rohan_
Hey BAndiT1983: I mailed you my c++ challenge solution today? Did you find time to take a look at it?
20:19
Bertl
probably not, otherwise you would have received an answer :)
20:19
Bertl
s/answer/reply/
20:22
rohan_
No problem. I'll wait :)
20:27
rohan_
left the channel
20:28
BAndiT1983
rohan_, looked at it in the morning, but there are so many inconsistencies there, so i'Ve stopped after short time
20:28
BAndiT1983
i can't understand why you store the images away, reload them again and especially the pile of streams there
20:29
BAndiT1983
please consult C++ guidelines, like class names should start with upper-case and use camel-case
20:30
dcz
left the channel
20:32
BAndiT1983
biggest mistake i see in the challenge code from (almost) all students, is the use of one-letter variables -> f, s etc.
20:33
BAndiT1983
how should someone be able to read this code? any quality assurance in a company would refuse to merge such code into the main branch
20:34
Bertl
it probably depends on the use case though ... because for (i=0; i<10; i++) is as good as for (index=0; index<10; index++) if not even preferable
20:34
Bertl
but those are exceptions to the rule of course
20:38
BAndiT1983
of course, as index it's fine, although sometimes in some advanced code indices should be named properly, but i have a code in front of me with many streams, like f1, f2, f3, f4, f5
20:38
BAndiT1983
and many other vars of such kind, which makes it very hard to understand, besides that the code can be simplified by extracting proper methods and reuse them, instead of doing many if/else or switch case or even plain spaghetti code
20:39
Bertl
yeah, I didn't expect anything else after the comment :)
21:18
BAndiT1983
changed nick to: BAndiT1983|away
21:24
Kjetil
My friend who I sometimes helped with his programming task in uni, kept naming his variables pizza1, pizza2, pizza3. Reading the code was just horrible
21:25
Bertl
that is called obfuscation :)
21:26
Kjetil
He explained it once with something ala. If it is horrible to write, it should be horrible to read
21:26
Bertl
lol, yeah ... sounds legit :)
21:29
rohan_
joined the channel
21:33
rohan_
I understand BAndiT1983. I'll change the code to store the data in arrays instead of files and also follow the c++ guidelines more strictly but is the implementation of Debayer() okay or below par? should I change it to how others have done it?
21:38
rohan_
left the channel
21:41
aSobhy
joined the channel
22:42
AntGeorge
joined the channel
23:01
aombk2
joined the channel
23:02
aombk
left the channel
23:08
AntGeorge
left the channel
23:16
aombk
joined the channel
23:18
aombk2
left the channel
23:29
futarisIRCcloud
joined the channel