Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    glopesdev
    @glopesdev
    That is likely the source of the problem
    Bonsai doesn’t know about zeroMQ, it just calls your code with the current frame
    Can you debug your code step by step inside visual studio? To understand which line blocks?
    Will lose net access soon, but i would try step by step debugging and understanding the problem better
    I don’t think bonsai is doing much to influence this, unless there is some weird configuration difference which has nothing to do with cameras
    It could be that some DLL dependency is not loading or something that NetMQ is not finding
    I remember they had a lot of idiosyncrasies in the way they load their dependencies
    There were many special cases which were hard to understand
    Can Hicabi Tartanoglu
    @caniko_gitlab
    It seems that you were right. I am so sorry, thanks for the help
    The firewall was blocking the connection, and so the node blocked the entire thread
    glopesdev
    @glopesdev
    :thumbsup: great, glad to hear that
    labaccount
    @hatohato_gitlab
    Hi, first, thanks for contributing this helpful software! I was wondering if it's possible for a Basler Pylon camera acquisition to enable the option "pylon.GrabStrategy_LatestImageOnly" that is available in their python API? It seems that without this option, when running at fast frame rates (~200hz), the frame queue will occasionally fill up and slow the downstream processing considerably. Since I am trying to run a real-time detection, it's important to have the thread run consistently at the highest possible speed.
    Vincent Prevosto
    @vncntprvst
    Hi. Is there a way to get the size of a Tuple without using numpy? When I'm using the default len() method, it returns "TypeError: len() of unsized object".
    Pedro Ferreira
    @PedroACFerreira
    First of all, congrats on Bonsai 2.4, I had been using the preview for quite some time, it's a wonderful piece of software!
    Now, a quick question - how can the run time of a workflow be optimized? I have a batch of 1h videos to run through a workflow, and Bonsai is taking about 20-30min to run each, while only using about 20% of my CPU (i7-9750H) capacity. Is it possible to have Bonsai use more resources to process the videos faster?
    labaccount
    @hatohato_gitlab
    @glopesdev is the GrabStrategy a parameter I can set somehow in the Pylon node?
    Antão Almada
    @aalmada
    @glopesdev I submitted a PR for OpenCV.NET. It would be great if you could check it out. https://bitbucket.org/horizongir/opencv.net/pull-requests/4/add-support-for-netstandard-20/diff
    Antão Almada
    @aalmada
    @glopesdev I developed a new Bonsai package. I can add it using the 'Package Manager' but the contents don't show up on the 'Toolbox'. Is there a log of the package load?
    glopesdev
    @glopesdev
    @aalmada there may be a couple of reasons why it's not loading, and unfortunately for now there are different logs for it
    if it's because of a missing dependency, you will have to look into the assembly Fusion logs or dependency walker (depends.exe) for native dependencies
    but another, maybe more likely reason is that the package is not being scanned for dependencies at all
    this is easier to check in the Bonsai.config file
    in that file you will see all the installed packages in the <Packages> section, but below that you have another section called <AssemblyReferences>
    in order for the package to be scanned for toolbox operators, there must be a reference to the package assembly name in that section
    are you using the VStudio template for Bonsai packages to create the package? That should set things up correctly such that installing the package will also include it in the assembly references
    glopesdev
    @glopesdev
    @hatohato_gitlab not yet, but we could easily add it, would you mind raising an issue in the repo? https://bitbucket.org/horizongir/bonsai.pylon/issues?status=new&status=open
    Kouichi C. Nakamura
    @kouichi-c-nakamura
    Hello, I'm very new to Bonsai, and trying to understand what it is good for. Currently, we're trying to establish probe recording with Open Ephys + licking detection with piezoelectric in Arduino-controlled behavioral task + video recording. This is probably similar to what Bonsai users are doing. At the moment, we save Open Ephys data (30k Hz), behavioral data (CSV table, 100 Hz), and video (30 Hz) separately. In order to make sense of data, we need to align the timings of these different data files post hoc according to shared TTL pulse signals etc, which probably works OK, but is a bit awkward. I'm sure Bonsai can do many things, but does it offer a solution to this time alignment issue somehow??? Thanks.
    glopesdev
    @glopesdev
    @kouichi-c-nakamura welcome to the forums. Electrophysiology data usually requires sub-millisecond synchronization precision if you are aligning behavior events to spiking activity. In general, no software solution is possible to solve the time alignment automatically because there are unpredictable latencies between the different devices you are using to acquire data.
    There are in general 2 solutions to this problem:
    1. Arrange suitable timing event signals in hardware that can be used as alignment markers, exactly as you are doing. Depending on how you arrange your hardware, experiment protocol, and workflows, solutions can actually be surprisingly elegant, but they have to be designed case-by-case. Its actually not too bad once you get the hang of how to solve it and there are lots of examples in the forums. You can also ask questions here.
    glopesdev
    @glopesdev
    1. Take advantage of an integrated hardware eco-system where the clocks of every device can be automatically aligned in hardware to make sure that when data is logged, the timestamps follow the same exact master clock. So far, such a solution was not available in Bonsai. However, recently the Open-Ephys group has developed and announced their next generation system which will take advantage of the Harp eco-system to provide just such a capability. In this system if all the hardware components support the Harp ecosystem (ephys, behavior, video) or if they can be triggered externally, all the event timestamps will automatically be aligned when data arrives in Bonsai.
    haha, that was supposed to be number 2, but I guess i took too long to write it and gitter split the chat message
    anyway, those are the two most common possibilities, i hope this description helps
    labaccount
    @hatohato_gitlab
    @glopesdev Great. I added the issue as a proposed enhancement.
    glopesdev
    @glopesdev
    @hatohato_gitlab perfect, I just pushed a fix to it. I want to update the pylon runtime version before I release the nuget, but you could use it right away if you are able to build the package from source.
    Kouichi C. Nakamura
    @kouichi-c-nakamura
    @glopesdev Thanks a lot for the detailed reply. This is very helpful, and I'm looking forward to seeing the future when the Harp thing is supported by many devices and our life is easier ;)
    James Roach
    @roachj_gitlab
    Hi, I'm just getting started with bonsai. I'm looking for a way to control the final quality of our video output. Could someone point me to the compression codecs are supported buy the VideoWriter object and whether there is anyway to set the quality for the video written? Thanks.
    glopesdev
    @glopesdev
    @roachj_gitlab VideoWriter supports several codecs listed here: http://fourcc.org/
    however, VideoWriter doesn't allow you to really fine-tune all their parameters. for that the best option is to use ffmpeg directly, as suggested here: https://groups.google.com/d/msg/bonsai-users/xwqMzIbyeC4/5o-bCWdCgIIJ
    James Roach
    @roachj_gitlab
    Thanks for the information.
    James Roach
    @roachj_gitlab
    @glopesdev Hi, I appreciate your help so far. I've been trying to use the example you provided to output the video into ffmpeg directly using a named pipe and have some follow up questions. Do we need to create the named pipe ourselves using an executable? You mention that ffmpeg needs to be called before starting bonsai, but that the imagewriter node creates the pipe. Calling ffmpeg before the pipe is created results in an error, naturally. Do you have more info on how to implement this?
    glopesdev
    @glopesdev
    @roachj_gitlab the ffmpeg executable needs to be called on a separate process. Previously, this would be done in a separate commandline outside of Bonsai, or invoked through a Python script. Nowadays, you can use the StartProcess operator to call ffmpeg. Make sure that the ffmpeg executable is in the PATH environment variable, or that the path to it is specified in StartProcess.
    Regarding calling ffmpeg before creating the pipe, if I did mention it then that was an error on my part. The pipe needs to be created by ImageWriter before calling ffmpeg. You can do this with StartProcess by using DelaySubscription, or Delay on the input to a python script, depending on how you choose to call ffmpeg. There should be some working examples in the forums. Otherwise, please post full error message and your current workflow.
    wzq663856650
    @wzq663856650
    I made a customized source for my camera. It is a DLL.
    Now I can open bonsai by adding a command line and find it in the source tab.
    But adjusting the command line is not user-friendly. Is there any other way for bonsai to find the source of my DLL and the camera module in it?
    The command line I'm currently using is
    E:\bonsai\Bonsai.exe --lib:"D:\bin."
    glopesdev
    @glopesdev
    @wzq663856650 by default Bonsai will look in the same directory where the Bonsai executable is, and in the Extensions folder of the workflow you are opening. If you need to specify a custom folder then you need to use the --lib command.
    You can also add the DLL to the Extensions folder of the Bonsai install directory. Either should work
    Saudruch
    @Saudruch

    Hi all, I am looking all over the internet for the Bonsai.PointGrey package/module which vanished from the Nuget website. This is the dead link: https://packages.nuget.org/api/Bonsai.PointGrey/2.3.1 .

    The thing is, it can be searched in Bonsai Package Manager but when I install it, it doesn't appear in the Modules section on the left. There is also PointGrey2 package which actually works and can be installed, but I need specifically the Bonsai.PointGrey package. Could anyone help me with this? Thank you.

    edit: I think I actually found the package (not sure if its the exact one) https://bitbucket.org/horizongir/bonsai.pointgrey/src/default/ but it's not in the .nupkg format and I have no idea how to install it to Bonsai

    glopesdev
    @glopesdev
    @Saudruch according to your description, I believe the package is installed but it's not loading correctly because you either don't have the FlyCapture driver installed, or the version that is currently installed is not compatible with the Bonsai package version
    Saudruch
    @Saudruch
    @glopesdev Thanks for the reply! The problem is i installed and reinstalled both the FlyCapture drivers (newer and older SDK) and Bonsai (v 2.3 and 2.4) more then 5 times already, testing all possible combinations and it just doesn't work. My suspicion about the driver missing came from the fact that I cannot find PointGrey drivers anywhere on nuget.org and link from the Bonsai Package Manager leads to the dead link I posted above. Also if I install any other package I found (found some old PointGrey 2.0 or package called PointGrey2 or Spinmaker) it appears in the Modules section but not this one.
    Saudruch
    @Saudruch
    @glopesdev So I managed to solve the problem by installing the Bonsai on a completely new computer, you were right that it's probably some compatibility issue, my theory about missing package was wrong. Thank you for your help!