diff --git a/b b/b index 76dbeb7168c90a0cd061f0dbcde95f3724123e28..a77e05cb66dba18688565911354234c3ff36e0e9 160000 --- a/b +++ b/b @@ -1 +1 @@ -Subproject commit 76dbeb7168c90a0cd061f0dbcde95f3724123e28 +Subproject commit a77e05cb66dba18688565911354234c3ff36e0e9 diff --git a/dox/misc2 b/dox/misc2 index 68667ebaa33081da7612c7d02b0852a014a9af51..cfbef0425eee563e012a5b9b0d0cd2e6075031e9 100644 --- a/dox/misc2 +++ b/dox/misc2 @@ -1,3 +1,11 @@ +SW viewer [optional] +############################### + how? + Wie ruft man die index.html auf der VM auf? + Wie kommunizieren SW REC und Viewer? + eg. OnStopButtonClicked( cmd( ../camTrack3000 --stop ) ) ?? + REST-Server/ HTTP-Json / .. +############################### vimba: GVSPAdjustPacketSize - find max size automatically if size < 1500 > enable jumboframes @@ -8,3 +16,33 @@ check: StatFramesDropped == 0 run as root. (or workaround p159 to start app as root and drop rigths immediatly afterwards) +############################### + +## SW from tboy old workstation + https://ctrax.sourceforge.net/ + walking fly tracker + HOBOWare Lite + temperature logger + StreamPix5 + realtime digital video recording to PC memory or hdd + batch processor + https://www.norpix.com/products/streampix/streampix.php + + Matlab (.m files) + any2ufmf + fviewflytrax + avidemux + yEd - graph editor - .graphml files + batchprocessor + process sequence files to avi + ssdcleanup + +## Emilio general critique +############################### + > !! if beetle runs in circle it is in "escape mode" which doesnt represent "natural" behaviour (explore, quick move from a to b) + -> think about different setup. Bigger Arena? + > fps can be low. Try 3! + Depends on movement speed and estimated error + calc error by comparing distance of 40fps with 3fps + > duration of video can be short. eg 10 minutes. + -> no need for many fridges diff --git a/dox/notes b/dox/notes index 9c379c0646e207af626b92cefa8f28f8d78cfbe7..bdede4a34b78e7739c5c96e53296ef1d3a87e9b5 100644 --- a/dox/notes +++ b/dox/notes @@ -1,36 +1,19 @@ -v## SW from tboy old workstation -https://ctrax.sourceforge.net/ - walking fly tracker -HOBOWare Lite - temperature logger -StreamPix5 - realtime digital video recording to PC memory or hdd - batch processor - https://www.norpix.com/products/streampix/streampix.php - -Matlab (.m files) -any2ufmf -fviewflytrax -avidemux -yEd - graph editor - .graphml files -batchprocessor - process sequence files to avi -ssdcleanup - -############################### -## Emilio +## NOTES ############################### -> !! if beetle runs in circle it is in "escape mode" which doesnt represent "natural" behaviour (explore, quick move from a to b) - -> think about different setup. Bigger Arena? -> fps can be low. Try 3! - Depends on movement speed and estimated error - calc error by comparing distance of 40fps with 3fps -> duration of video can be short. eg 10 minutes. - -> no need for many fridges +"i conduct experiments in a lab, that i build up in a prestigious scientific institute" +"as a craftsman, i hone my skill to build/create things" +"i use my skills to earn €" +"i live and work with integrity" +------------------------------- +4-6h/d @ 4-5/w -> finetune DW/SW +get feedback (occassionaly) +------------------------------- -############################### -## Software A - Frame grab -############################## + + +############################################################## +## Software A - Frame grab - recorder - ctb +############################################################# # setup Vimba > see Vimba_installation_under_Linux.pdf @@ -88,16 +71,13 @@ pixelformat: RGB8 > different options. eg 10bit/12bit RGB/MONO. @ 30 Mins -> 127.1 GB with 60 recordings: 7.6TB -Storage: -ws1: - 2TB: 2*1TB (7200RPM) +Storage old ws: + 2TB: 2*1TB (7200RPM = 6GB/s) 8Gb DDR3 RAM Intel Xeon 3.6Ghz (4 cores) -ws2: 4TB: 3 (7200RPM = 6GB/s!) + 1 - 8GB DDR3 RAM - -default bandwidth:115MBps + default bandwidth:115MBps +------------------------------- Save "reasonable" settings in XML. If dark, set ExposureTimeAbs Q: how to set fps to 3? @@ -140,8 +120,8 @@ PCA? frameProcessor = std::make_shared<FrameProcessor>(); -########### -libarchive stuff +## libarchive stuff +############################### archive_read_xxx() archive_write_xxx() struct archive_entry @@ -166,7 +146,11 @@ command arg parser cv::Ptr<cv::BackgroundSubtractorMOG2> mog; #endif - +############################### +WS / VM + > 8 cores, 16GB RAM, 2 TB for 1cam + > 48 cores, 128GB RAM, 6 TB for 6cam +############################### > What Tboy do... why did he do it? > forked branch bgslib_qtgui_2.0.0 @@ -265,58 +249,8 @@ Challenges: Occlusion, (Sensor-)Noise, changing external conditions( lighting, S > pre-training if lack of data > corrupt data to guarantee robust learning -###### -# AI # -###### -Convolutional Neural Networks (CNNs) - https://www.researchgate.net/publication/337401161_Fundamental_Concepts_of_Convolutional_Neural_Network (2020 37p) - > Kernel - > filter? - > preprocessing > Training > Parameter init > regularization > optimize - - -RGB-D - RGB + depth >> eg Kinect-Sensors -KNN - k-nearest neighbors algorithm -Monte Carlo tree search algorithm (alphaGo...) -RGB-D descriptor that relies on a K-Means -HMP - hierarchical matching pursuit ( hierarchical sparse-coding method; learn features from multiple channel input) -encoding depth information into three channels (HHA encoding) feature hierachy -cascade of Random Forest classifiers that are fused in a hierarchical manner ?? #Random Forest - -metrics: - recall - how many relevant items are retrieved? - precision - how many retrieved items are relevant? - > https://en.wikipedia.org/wiki/Recall_(information_retrieval) - -? -automatically learn a fusion strategy for the recognition -task – in contrast to simply training a linear classifier on -top of features extracted from both modalities - -MISRE - Multiple Input Structures with Robust Estimator -gradient-based learning - > MNIST supervised image classification - MNIST - large db of hand-written digits (used for ML and ImagePRocessing) - > also see classifiers: https://en.wikipedia.org/wiki/MNIST_database#Classifiers -multimodal learning - -the parameters of all layers were adapted using a fixed learning rate schedule - -At test time the task of the CNN is to assign the correct class label to a previously unseen object instance. - -Tasks: -Classification, clustering, regression, Summarization, Categorization, Natural language processing, - -################################## -# STAT -################################## -Regression -Hadamard Product -Bernoulli Distribution -Discrete Uniform Distribution -################################## # CMAKE ################################## sublime: install package CMAKE (syntax hilight) @@ -335,9 +269,4 @@ apt install libarchive-dev python3-pybind11 frame = new IplImage(img_input); #endif -## hardware tower old - (opt/later) setup tower1 (defunct again!) as cheap testing machine! - > get NIC working - > give name connect inet - --> as terminal to connect to server - --> later: use for DMX lighting + diff --git a/dox/notes_A b/dox/notes_A index 9aa3e93a8ede250b73be3b88dbb2726fb1a11f10..b9614b05af213d22b84d021afcfccdc60e8d011a 100644 --- a/dox/notes_A +++ b/dox/notes_A @@ -98,5 +98,11 @@ Prosilica GX: 2 ethernet ports... configure LAG (Link aggregate group) -> double available bandwith to 240 MB/s! -##################### +## hardware tower old +############################### + (opt/later) setup tower1 (defunct again!) as cheap testing machine! + > get NIC working + > give name connect inet + --> as terminal to connect to server + --> later: use for DMX lighting diff --git a/dox/notes_B b/dox/notes_B index fbe91d194fa8fe6f25af17c67cf4a4f97e1b8dc1..a48007ba699a2a7af5979097ce339e4e036e10fa 100644 --- a/dox/notes_B +++ b/dox/notes_B @@ -8,23 +8,34 @@ Does ############################### use opencv to convert raw cam images into JPEG pixel format ############################### -Software Setup: - > deploy to VM - -> ssh-connection - > configure - -> folder, length, cams - > .. + +map cam -> MAC -> IP -> ID -> name + cam1 000A4708ED3F 172.18.227.210 04ytr allied-alviumg1-240c-04ytr.idiv.de + cam2 000A471C0C9D 172.18.227.211 04ytp allied-alviumg1-240c-04ytp.idiv.de + cam3 000A47372777 172.18.225.164 04ytn allied-alviumg1-240c-04ytn.idiv.de + cam4 000A471D2A66 172.18.227.213 04ytm allied-alviumg1-240c-04ytm.idiv.de + cam5 000A471D208D 172.18.225.129 04ytt allied-alviumg1-240c-04ytt.idiv.de + cam6 000A47139EA6 + +## connect VM +ssh kr69sugu@idivtibcam01.usr.idiv.de + - see `cmds "login ssh without password"` for config + + +#old vm + #tibcamtrack.idiv.de (172.18.225.181) +#?? WS ??? + #idivlabo2KARL.idiv.de (172.18.226.44) ? + +------------------------------- * camera sends the raw pictures to a storage server via a network (IP/UDP) connection * internal real time clock and delivers high precision TIME STAMPS, which were simultaneous recorded for every frame (use milliseconds) -* compress frames as jpeg - used opencv version 3.2 imwrite() with parameter: +* compress frames as jpg + - used opencv version 3.2 imwrite() with parameter: IMWRITE_JPEG_QUALITY 100; IMWRITE_JPEG_OPTIMIZE 1; IMWRITE_JPEG_RST_INTERVAL 4; -## deploy -operating on the storage server -VM on ssh thomasboy@172.18.115.7 -> ask Dirk! # build/setup VimbaX > download from https://www.alliedvision.com/en/products/software/vimba-x-sdk/ @@ -36,9 +47,32 @@ VM on ssh thomasboy@172.18.115.7 -> ask Dirk! . SetGenTLPath.sh sudo VimbaGigETL_Install.sh #add api to path +## All APIs cover the following functions: + Listing currently connected cameras + Controlling camera features + Receiving images from the camera + Notifications about camera connections or disconnections + + + > browse other examples a bit: + list cams / features / actioncommands + eventhandling?? + + > read Manuals + >Vimba, C++, GigE-TL,(ImgTransform,),Cam Technical Docu + pdf "${HOME}/vimba_5_1/Documentation/Vimba Manual.pdf" "${HOME}/vimba_5_1/VimbaCPP/Documentation/Vimba CPP Manual.pdf" "${HOME}/vimba_5_1/VimbaGigETL/Documentation/VimbaGigETLFeaturesManual.pdf" "${HOME}/vimba_5_1/VimbaImageTransform/Documentation/Vimba ImageTransform Manual.pdf" "${HOME}/vimba_5_1/Documentation/Vimba Viewer Guide.pdf" + + From Thomas: + * recording single frames in data structure + * used Vimba.2.1 (1.6 more likely) + * compress each frame with loosely jpg compression + (used framework opencv version 3.2. imwrite function with parameter: IMWRITE_JPEG_QUALITY 100 ; IMWRITE_JPEG_OPTIMIZE 1; IMWRITE_JPEG_RST_INTERVAL 4;) + * stores timestamps for each frame in milliseconds + ## SETUP GT1920C: > connect lap and cam directly via ethernet > set MTU to 8228 (jumbo frames/packets) + > GVSPAdjustPacketSize: 8228 > set fixed IP for eth-adapter first and then cam (use Vimbaviewer -> force IP) eth 169.254.100.1 cam ip 169.254.x.x # on restart will pick random IP... @@ -54,12 +88,6 @@ VM on ssh thomasboy@172.18.115.7 -> ask Dirk! -> for multiple cams calc bandwith and use switch - - - - - - > list currently connected cameras > control cam features > receive images @@ -261,3 +289,13 @@ GetStreamBufferAlignment? what is it? EventCameraDiscovery -> listen to find plugged cams + + DONT do a diskbench to get writing speed (calculate needed speed with 3 cameras) to see if frames will be dropped or not... + writing speed of one of the workstations is 150MB/sec + prosilica gtx1920 needs 3x 107.53 MB/sec for BGR. 1x for MONO + avi uncompressed + 1280x1280 @ 40 fps is limit for your CPU oO + CPU can compress 47mio pix/second + 17x1936x1456=47mio -> 17fps @ full res + suggested CPU i7 3840 + reduce ROI diff --git a/dox/timeplan-milestones.ods b/dox/timeplan-milestones.ods index 0496f530cc6e32c26c9c1843055248b52c8ffeab..f6177144252286938371e5018a87c4f4c0619189 100644 Binary files a/dox/timeplan-milestones.ods and b/dox/timeplan-milestones.ods differ diff --git a/dox/todo_ct b/dox/todo_ct index 4481e82cb2351b7d3eb2f125cd9285815fdb63a7..78545c217930a2dd1a56bc592f0bf54ade43bbd7 100644 --- a/dox/todo_ct +++ b/dox/todo_ct @@ -5,91 +5,13 @@ CAMTRON PROCESSING PIPELINE C) background-subtraction D) process scripts X) HPC - Z) laptop/fon maintenance ########################### "tackle long-term complex projects from beginning to end" -sort ct: - > folders, files, ... naming convention - > README + Description - > merge doc? - > b) exclude SDK / examples from repo - -PRIO: -> update opencv -> eval how much work to fix? -> update algorithm for bgs -> eval how much work to fix? - -A) -########################### - > TEST CAM! GET RUNNING PICTURES! - 1. use virtual machine - > 8 cores, 16GB RAM, 2 TB for 1cam - > 48 cores, 128GB RAM, 6 TB for 6cam - - 2. use laptop - - - - > light (opt/later) - > find hardware (Boxes, DMX per unit, DMX splitter/controller) - > setup hardware for 1 unit - > check software - > get infrared LEDs. ask if andy ordered them? - > attach IR-LEDs (solder) - - > arenas - > verglasungsfolie - > 1 floor wooden plate with circle >> really needed? - > 1 floor glass plate - > 1 floor wooden plate - - > how to connect seamlessly? - > o-ring: https://www.o-ring.de/o-ring-fpm-90/item-anfragemenge-6-categoryId-or-itemId-100022-search2-580.00-search3--search7-.html - - >> or use poisonous electro-harz zum giessen. Wie Form bauen? - - - - * setup 1 fridge - > attach cam arm to wood - > get video in VV - > get video in SW-A via SDK - > cam calibration (Use Viewer? Or own SW?) - > configure cam settings - * get video for 3 cams in one workstation - > what SW? - > calculate supported framerate+resolution+codec for hardware (CPU,RAM,HDD...) - > or do tests and see if frames are dropped - - - DONT do a diskbench to get writing speed (calculate needed speed with 3 cameras) to see if frames will be dropped or not... - writing speed of one of the workstations is 150MB/sec - prosilica gtx1920 needs 3x 107.53 MB/sec for BGR. 1x for MONO - avi uncompressed - 1280x1280 @ 40 fps is limit for your CPU oO - CPU can compress 47mio pix/second - 17x1936x1456=47mio -> 17fps @ full res - suggested CPU i7 3840 - reduce ROI - - - - # Documentation - > sketch - > chamber: cam height+resolution+arena diameter for pixel to cm/mm ratio - > lab: chambers+workstations+HPC - - > costs. update with what we actually buy! - > sketch: technical: cam (QuantumEfficiency) + IRLED - > sketch: setup plan for a chamber - > copy last setup plan from thomas - - - B) recorder - camera produces frames and timestamps ########################### (depends on cam in A)!!! - > use new api Vimba X + > use new api VimbaX > read manual (c++ / vimba) ============================ > wait and detect cams @@ -97,6 +19,17 @@ B) recorder - camera produces frames and timestamps > build GUI --> Q: might a console app be feasable?? ============================ + > get pix, using + - laptop + - virtual machine + > get video via vimbax-SDK + > cam calibration (Use Viewer? Or own SW?) + > configure cam settings + * get video for 3 cams simultaneously + > what SW? + > calculate supported framerate+resolution+codec for hardware (CPU,RAM,HDD...) + > or do tests and see if frames are dropped + > central config > threads for started recordings [PID] > storage folder @@ -105,44 +38,24 @@ B) recorder - camera produces frames and timestamps > load settings with sw > how and where to store frames? - All APIs cover the following functions: - Listing currently connected cameras - Controlling camera features - Receiving images from the camera - Notifications about camera connections or disconnections - - - > browse other examples a bit: - list cams / features / actioncommands - eventhandling?? - - > read Manuals - >Vimba, C++, GigE-TL,(ImgTransform,),Cam Technical Docu - pdf "${HOME}/vimba_5_1/Documentation/Vimba Manual.pdf" "${HOME}/vimba_5_1/VimbaCPP/Documentation/Vimba CPP Manual.pdf" "${HOME}/vimba_5_1/VimbaGigETL/Documentation/VimbaGigETLFeaturesManual.pdf" "${HOME}/vimba_5_1/VimbaImageTransform/Documentation/Vimba ImageTransform Manual.pdf" "${HOME}/vimba_5_1/Documentation/Vimba Viewer Guide.pdf" - - From Thomas: - * recording single frames in data structure - * used Vimba.2.1 (1.6 more likely) - * compress each frame with loosely jpg compression - (used framework opencv version 3.2. imwrite function with parameter: IMWRITE_JPEG_QUALITY 100 ; IMWRITE_JPEG_OPTIMIZE 1; IMWRITE_JPEG_RST_INTERVAL 4;) - * stores timestamps for each frame in milliseconds - -SW viewer [optional] -############################### - how? - Wie ruft man die index.html auf der VM auf? - Wie kommunizieren SW REC und Viewer? - eg. OnStopButtonClicked( cmd( ../camTrack3000 --stop ) ) ?? - REST-Server/ HTTP-Json / .. - - - - - +A) +########################### + > VM + > light + > 2*LEDs: 1*day + 1*night + > find ecolux hw (Boxes, DMX per unit, DMX splitter/controller) + > arenas + > Acrylzylinder in 2 teile gesaegt. + > floor + > gips+color+lack.. C) background subtraction ########################### + eval how much work to, update + > opencv + > bgs-algorithm + ctb - calculates centroid points of all frames in a record > build > find test data (cp to 00 - ..) @@ -177,36 +90,31 @@ X) HPC - High Performance Cluster or > II) vimba-software directly to HPC? -## NOTES +BACK-BURNER 2D ############################### -"i conduct experiments in a lab, that i build up in a prestigious scientific institute" -"as a craftsman, i hone my skill to build/create things" -"i use my skills to earn €" -"i live and work with integrity" -------------------------------- -4-5h/d @ 4-5/w -> finetune DW/SW -get feedback (occassionaly) +> Documentation + > sketch + > chamber: cam height+resolution+arena diameter for pixel to cm/mm ratio + > lab: chambers+workstations+HPC -milestone 1: build up hardware - > fridges,cams,light,arena,workstation, -milestone 2: get videodata - > 2.1 via vv - > 2.2 via own SW! -milestone 3: collect all data using 1 camunit -milestone 4: collect all data using 6 camunits -milestone 5: conduct experiments -milestone 6: analyze I - get simple vars - movement: calc coordinates (roi,bgs substraction,bgs midpoint,..) - aggregate CSV (coord + time + temp/rH) -milestone 7: analyze II - get more vars - > calc speed,angles,distance + > costs. update with what we actually buy! + > sketch: technical: cam (QuantumEfficiency) + IRLED + > sketch: setup plan for a chamber + > copy last setup plan from thomas -> 5 & 6 could be swapped! Done ####################### +> get video in VV +> connect VM. ssh and rdp +> sort ct a bit: + > folders, files, ... naming convention + > README + Description + > merge doc? + > b) exclude SDK / examples from repo +> attach cam arm to wood (DONE) > test run 1 cam to estimate hw requirements > test bottleneck (CPU,HDD,ethernet,) > storage: 10s hochrechnen