Current Server Time: 00:05 (Central Europe)

#apertus IRC Channel Logs

2019/04/02

Timezone: UTC


01:30
intrac
left the channel
01:31
intrac
joined the channel
02:19
araml
left the channel
03:48
aombk
joined the channel
03:48
aombk2
left the channel
06:09
siddhantsahu
BAndiT1983: Is there any plan to add OpenCV to OpenCine?
06:22
BAndiT1983|away
changed nick to: BAndiT1983
06:23
BAndiT1983
siddhantsahu, what should be the purpose of it?
06: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).
06:34
siddhantsahu
More on it here https://github.com/opencv/opencv/wiki/Deep-Learning-in-OpenCV
06:34
BAndiT1983
and?
06: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.
06:36
siddhantsahu
More on it here https://github.com/opencv/opencv/wiki/Intel%27s-Deep-Learning-Inference-Engine-backend
06: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.
06:37
siddhantsahu
For T1142 I wish to use some pre-trained neural network models for the task.
06:39
siddhantsahu
Not just for "White balancing" algorithms many state of the art denoising, deblurring, resizing (superresolution) uses neural networks.
06:39
siddhantsahu
It would great over OpenCine users if they can use these algorithms.
06: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
06:40
siddhantsahu
I need user suggestion, if it is only possible to use the "dnn" module only of OpenCV in OpenCine?
06:44
siddhantsahu
So incase OpenCine uses some deep learning algorithms it can use this "dnn" module.
06:44
BAndiT1983
of course, it uses tensorflow to locate humans in the picture and to tell us, if it's donald trump or not
06:45
siddhantsahu
Is it good idea to implement a "dnn" module inside OpenCine or can we use the "dnn" module of OpenCV?
06:45
BAndiT1983
you tell me, i don't have a clue about neural networks
06:47
siddhantsahu
No no the OpenCV's "dnn" module is only used to do the inference
06:48
siddhantsahu
That means once the model is build and trained on a large dataset using some deep learning frameworks like Tensorflow, Caffe, etc.
06:48
siddhantsahu
We get two files
06:49
siddhantsahu
One the models architecture and the trained model's parameter.
06:50
siddhantsahu
These two files are read by the OpenCV's dnn module methods like readNetFromTensorflwo() to load, and do the actual inference.
06:51
siddhantsahu
This module is highly optimized to run on Intel CPU's
06: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.
06: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.
06: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
06:55
BAndiT1983
off for work, will be back later
06:55
BAndiT1983
changed nick to: BAndiT1983|away
06:56
siddhantsahu
Yes working on the C++ challenge, will send you for review once it's done.
07:09
dcz
joined the channel
08:23
apurvanandan[m]
Hi,
08:24
apurvanandan[m]
In the usb plugin module, in what format video is going to be transmitted at the usb end?
08:24
apurvanandan[m]
For streaming purpose
09:19
sebix
joined the channel
09:53
Bertl_zZ
changed nick to: Bertl
09:53
Bertl
morning folks!
09: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
10: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
10: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
10:09
futarisIRCcloud
left the channel
10:13
dcz
left the channel
10:34
danieel
Bertl: what are the most visible differences between a FX3 and FT601 ?
10: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
10:36
Bertl
mostly price and that the FX3 requires specific firmware while the FTDI works out of the box
10:37
Bertl
but the FX3 might be more flexible because of this
10:39
Bertl
the RGGB as YCrCb is a nice idea, not sure what software supports this though
10:44
Bertl
haven't checked the UVC specification yet, might as well be that they already have something similar defined
10: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
10:48
danieel
uvc1.5 has no mention of raw, bayer, cfa
10:49
danieel
there is a "vendor defined" frame based option though
10:50
vup2
It also has a `uncompressed` payload type
11:09
Bertl
the only reason for using the UVC version would be that it 'works' out of the box on any platform
11:10
danieel
well it could have a fake debayer to yuv as initial mode, that code you already have for the hdmi
11:11
Bertl
yup
11:14
Bertl
but the main plan for the USB interface is to get raw data out
11:19
Bertl
off for now ... bbl
11:20
Bertl
changed nick to: bertl_oO
11:48
dcz
joined the channel
12:49
fizz
joined the channel
12:52
aombk2
joined the channel
12:56
aombk
left the channel
13:10
fizz
left the channel
13:11
aombk
joined the channel
13:12
aombk2
left the channel
13:49
se6astian|away
changed nick to: se6astian
14:21
aombk
left the channel
14:26
aombk
joined the channel
15:00
aombk2
joined the channel
15:01
aombk
left the channel
15:07
aombk
joined the channel
15:09
aombk2
left the channel
15:17
mrohit[m]
Hey se6astian , is there any specific clang-format style in which the C++ challenge code is expected to be formatted in?
15:31
bertl_oO
changed nick to: Bertl
15:31
Bertl
back now ...
15:31
vup2
mrohit[m]: you can use https://github.com/axiom-micro/axiom-control-daemon/blob/master/.clang-format for now
15:32
mrohit[m]
ok, thanks!
15:58
BAndiT1983|away
changed nick to: BAndiT1983
15:59
Bertl
... and off again ... bbl
15:59
Bertl
changed nick to: Bertl_oO
16:02
se6astian
changed nick to: se6astian|away
16:05
illwieckz
left the channel
16:46
dev_
joined the channel
16:47
dev_
Hey BAndiT1983 , free to check the C/C++ challenge right now ?
16:49
BAndiT1983
not really, but i have seen several problems there
16:49
BAndiT1983
like variables starting with upper-case
16:50
BAndiT1983
also too long methods
16:51
BAndiT1983
what should this code do? ->
16:51
BAndiT1983
file << (isdebayered ? "P6" : "P5");
16:51
BAndiT1983
file << std::endl;
16: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
16:52
BAndiT1983
AVI generation is not really usable in this form, as size calculation is very rigid
16:52
BAndiT1983
and what does the second line do?
16:53
dev_
ppm is for final debayered image
16:53
dev_
it is for space in ppm file format, "P6 height width 256 "
16:53
BAndiT1983
and why is it in a separate line?
16:54
dev_
it was looking long
16:54
dev_
and messy too becouse of endl , so it shifted it in next line
16:55
saurabh_raj
joined the channel
16:55
BAndiT1983
ehm, don't think so, cause this looks like a waste of lines for unnecessary stuff
16:55
dev_
okay i will change it,1. Captial variable (there are few ) 2. this endl thing
16:56
BAndiT1983
check your code thoroughly, as it's up to you to deliver high quality
16:57
saurabh_raj
Hi BAndiT1983, got a chance to go through my code?
16:57
dev_
Hi saurabh_raj :)
16:57
BAndiT1983
a bit, but i can't figure out with so many abstractions and loops
16:57
BAndiT1983
this hides the target of the code from observer
16:58
BAndiT1983
i know what it should do, but the solution is way too complicated and riddled with unnecessary stuff
16:59
dev_
okay thanks BAndiT1983, if u got time also please check for proposal which i have send to team's email Id
16: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?
17:01
BAndiT1983
it's not about switching to different algorithm, it's about having readable and maintainable code
17:01
dev_
left the channel
17:02
BAndiT1983
i see a lot of nested if/else in the loops and so on, not really performant
17:02
se6astian|away
changed nick to: se6astian
17:02
saurabh_raj
okey.. so apart from the loops, any serious issues?
17:02
aSobhy
left the channel
17: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
17:03
BAndiT1983
a lot of abstractions which are unnecessary and just obfuscate the dataflow
17:03
BAndiT1983
why do you use so many data classes like pixelmap, raw12, bitmap?
17:03
BAndiT1983
missing blank lines to mark line which belong together, see main.cpp
17:04
saurabh_raj
pixelmap deals with writing ppm files, bitmap for bmp and raw12 loads the find and initializes the vectors
17:04
BAndiT1983
#pragma pack was implemented in GCC, but should be avoided
17:05
BAndiT1983
the structure is not clear, as you mix namespaces, classes etc., should be more clear how the data flows in the pipeline
17:06
saurabh_raj
so.. should I add comments?..
17:06
BAndiT1983
i don't see real OOP there
17:06
BAndiT1983
you can also add comments, but a good code should be readably
17:07
BAndiT1983
struct Streams is unnecesary
17:07
BAndiT1983
channels are hold in vector, which is not performant
17:07
BAndiT1983
usinged char should be replaced by uint8_t or uint16_t, depending on what you use
17:07
BAndiT1983
and so on
17:07
BAndiT1983
it's not my task to complete the challenge
17:08
saurabh_raj
okey.. i will try to make the code more readable and simple...
17: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
17:10
BAndiT1983
take a look at the prototype of OC frame server to get the idea ->
17:10
BAndiT1983
https://github.com/BAndiT1983/OC_FrameServer/tree/dev
17: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.
17: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
17:13
BAndiT1983
we have to select best ones and it does involve to avoid too much 'holding hand'
17:13
BAndiT1983
as the mentors do this stuff as volunteers, without payment
17:15
saurabh_raj
yeah.. i understand.. thanks for all the help.. i m really learning a lot..
17:21
dev_
joined the channel
17:21
dev_
left the channel
17:29
saurabh_raj
left the channel
17:32
apurvanandan[m]
In what format would you like the proposal to be in? A google doc, latex pdf or odt?
17:47
BAndiT1983
changed nick to: BAndiT1983|away
18:18
se6astian
PDF seems most universal
18:23
Bertl_oO
changed nick to: Bertl
18:23
Bertl
finally back ...
18:24
Bertl
apurvanandan[m]: bonus points for LaTeX, especially on the CV :)
18:26
mrohit[m]
hey Bertl , should we provide a link to the CV in the proposal or add the CV in the proposal?
18:28
Bertl
a link is probably the best way unless you want to incorporate it into the proposal
18:33
mrohit[m]
okay
18:34
BAndiT1983|away
changed nick to: BAndiT1983
18:57
sebix
left the channel
18:58
BAndiT1983
changed nick to: BAndiT1983|away
19:05
Ashu
joined the channel
19:08
Bertl
hey Ashu! How's going?
19:08
Ashu
Hi Bertl ,
19:09
Ashu
:) yesterday I explaine about how I wish to use GraphicMagick , is it right approach ?
19:09
Ashu
*explain
19:10
Bertl
well, yes and no, you are definitely heading into the right direction there
19:11
Bertl
I haven't evaluated GraphicsMagick yet but I fear that it is still not 'direct' enough for our purpose
19:11
Bertl
the problem I see is this:
19:12
Bertl
you need to do a lot of memory access from the CPU side to collect the data for computation
19:12
Bertl
for example for a histogram, you probably want to look at 20-50% of the image to get it resonably right
19:14
Bertl
the collected data is quite small (histogram will be a few hundred values)
19:14
Bertl
now you need to visualize it with the overlay, which in turn means additional memory access
19: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
19:16
Bertl
the only difference is that it is written to the memory instead of read
19: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
19:17
Bertl
but the sensitive point here obviously is 'reading' (the image data) and 'writing' (the overlay) in an efficient way
19: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
19:18
Bertl
then 'simply' copy it over to the 'framebuffer' (overlay)
19: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
19:20
Bertl
as the memory bandwidth is limited, this in turn means that the framerate for the overlay drops dramatically
19: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
19: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)
19: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
19:23
Bertl
(this is something which needs to be tested)
19:23
illwieckz
joined the channel
19:23
Bertl
but we know for sure that a 'single' write to each memory location is preferable to multiple writes
19: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
19: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
19:27
Bertl
does that make more sense now?
19:28
Ashu
You are right Bertl ,it makes sense. Using library will definately require a lot of memory access from CPU side .
19:32
Ashu
Probably rather than searching any library which suites our problem , it would be wise to draw graph from the code itself .
19:33
Bertl
at least for something like the histogram it is certainly a good and viable approach
19: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)
19: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
19: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
19:36
Bertl
note that in this case the drawing should definitely be client side
19:36
Bertl
so only data collection and preprocessing is required
19:37
Bertl
(think histogram on a tablet connected via wifi)
19:47
Ashu
" generic drawing functions " would making these for ourself is better approach ,
19:48
Bertl
I'm fine with that as well
19:51
Ashu
or what option we have other than this , can we find them too ?
19:52
Bertl
haven't checked but it really depends on the visualization we want to do
19:52
Bertl
(which is not set in stone, so we are somewhat flexible there)
19: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
19: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
19: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 .
19:58
Bertl
yup, glad you have a more complete picture now
20:00
Ashu
thanku, for explaining things in this depth . I Will come back for discussion after doing little more research. :)
20:00
Bertl
you're welcome!
20:01
Ashu
left the channel
20:20
BAndiT1983|away
changed nick to: BAndiT1983
20:24
intrac
left the channel
20:25
intrac
joined the channel
21:15
Ashu
joined the channel
21:16
se6astian
changed nick to: se6astian|away
21:17
Ashu
left the channel
21:17
rohan_
joined the channel
21:18
rohan_
Hey BAndiT1983: I mailed you my c++ challenge solution today? Did you find time to take a look at it?
21:19
Bertl
probably not, otherwise you would have received an answer :)
21:19
Bertl
s/answer/reply/
21:22
rohan_
No problem. I'll wait :)
21:27
rohan_
left the channel
21:28
BAndiT1983
rohan_, looked at it in the morning, but there are so many inconsistencies there, so i'Ve stopped after short time
21:28
BAndiT1983
i can't understand why you store the images away, reload them again and especially the pile of streams there
21:29
BAndiT1983
please consult C++ guidelines, like class names should start with upper-case and use camel-case
21:30
dcz
left the channel
21:32
BAndiT1983
biggest mistake i see in the challenge code from (almost) all students, is the use of one-letter variables -> f, s etc.
21: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
21: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
21:34
Bertl
but those are exceptions to the rule of course
21: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
21: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
21:39
Bertl
yeah, I didn't expect anything else after the comment :)
22:18
BAndiT1983
changed nick to: BAndiT1983|away
22: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
22:25
Bertl
that is called obfuscation :)
22:26
Kjetil
He explained it once with something ala. If it is horrible to write, it should be horrible to read
22:26
Bertl
lol, yeah ... sounds legit :)
22:29
rohan_
joined the channel
22: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?
22:38
rohan_
left the channel
22:41
aSobhy
joined the channel
23:42
AntGeorge
joined the channel
00:01
aombk2
joined the channel
00:02
aombk
left the channel
00:08
AntGeorge
left the channel
00:16
aombk
joined the channel
00:18
aombk2
left the channel
00:29
futarisIRCcloud
joined the channel