Saravanan666/pypi-org huggingface dataset:
Package: bbo-labelgui
BBO-labelguiGUI for guided data labelingInstallation(You do not need to clone this repository.)Install AnacondaStart Anaconda Prompt (Windows) / terminal (linux) and navigate into repository directoryCreate conda environmentconda env create -f https://raw.githubusercontent.com/bbo-lab/ACM-traingui/master/environment.ymlUpdateStart Anaconda Prompt (Windows) / terminal (linux) and navigate into repository directoryUpdate withconda env update -f https://raw.githubusercontent.com/bbo-lab/ACM-traingui/master/environment.yml --prune.RunningStart Anaconda Prompt (Windows) / terminal (linux) and navigate into repository directorySwitch to environmentconda activate bbo_acm-trainguiRun withpython -m labelgui [options ...]OptionsLabeling modeRun withpython -m labelgui [base data directory].
This starts a GUI in drone mode, for the use by assistants with limited options to influence how the program runs and were it saves. This expects the following file structure:[base data directory]/pose/data/users/{user1,user2,...}/labeling_gui_cfg.py
[base data directory]/pose/users/{user1,user2,...} will be presented in a selection dialog on startup. Marking results will be placed in[base data directory]/users/Check modeRun withpython -m labelgui [directory of labels.npz] --check [bbo_calibcam calibration npy] # to use specified npy or
python -m labelgui [directory of labels.npz] --check [labeling_gui_cfg.py folder] # to use standardCalibrationFile from labeling_gui_cfg.py or
python -m labelgui [directory of labels.npz] --check '-' # or
python -m labelgui [directory of labels.npz] --check # to use backup labeling_gui_cfg.py in labels.npy folder. (Will often fail due to different paths between checker und labeler, as relative pathes are resolved, here).This gives sorted text output of 3d and reprojections errors. Reporjection errors above 5-10px usually indicate errors in labeling and respective frames have to be checked.Join modeRun withpython -m labelgui [configdir of ACM-dlcdetect] --check [multiple directories containing labels.npz files] [--strict].
This joins all marked labels in the labels.npz files into the labels.npz file in the dlcdetect configuration. Marked labels overwrite existing labels framewise.--strictonly merges frames where all cameras have marked points.Compile to execonda activate bbo_acm-traingui.Install pyinstaller: `pip install pyinstaller.If present, empty dist/ dirctory.pyinstaller --onefile traingui.py.Distribute exe file in dist/ folder.Note: It might be necessary to remove mkl:conda install -c conda-forge nomkl.TODODocument configDocument sketch file (2d sketch of animal. If not presented, 3d wireframe is shown instead)Documentmodel file
Package: bbo-multitrackpy
Detection of LED head stage based on MTT files, used by the BBO lab at MPI for Neurobiology of BehaviorInstallationWindowsInstall AnacondaOpen Anaconda prompt via Start MenuCreate conda environment usingconda env create -f conda env create -f https://raw.githubusercontent.com/bbo-lab/multitrackpy/master/environment.ymlUsageSwitch to multitrackpy environment:conda activate multitrackpyRun the program withpython -m multitrackpy -h:usage: __main__.py [-h] --mtt_file MTT_FILE --video_dir VIDEO_DIR
                   [--linedist_thres LINEDIST_THRES] [--corr_thres CORR_THRES]
                   [--led_thres LED_THRES] [--n_cpu N_CPU]
                   START_IDX END_IDX
__main__.py: error: the following arguments are required: START_IDX, END_IDX, --mtt_file, --video_dir
Package: bbo-svidreader
videoreaderVideoreader, currently a pyav v3 wrapper, with the following features:Reading CCV-FilesPreemptive cached video accessSimoultanous threaded reading of multiple video filesEffects applied by a pipelined graph-structureSyntaxThe syntax is mostly orientated on ffmpeg, generally [<input1>][<input2>]<effect=arg0=<arg0>>[<output>]Effects are sepperated by simikolonInputs/Outputs of effects are defined in squared bracketsarguments can be defined by effectrun_pipeline.pyThis is a simple tool if you want to use the videoreader from the commandline. You can define the following options:'-i', '--input' <Can define multiple input-files>'-o', '--output' <Define where to write output>'-g', '--filtergraph' <The filtegraph which is applied>Examples:python3 svidreader/run_pipeline.py -i ../test/cubes.mp4 --filtergraph "contrast" --output test.csvList of effects:scaleScales input by a given factorscale: float, factor of scalingarangeAranges multiple inputs into a gridncols: int, number of columnsviewerViews the last read input
backend: string, Backend to be used, values are matplotlib, ffplay, opencvbgr2grayConverts each RGB-input-frame to three grayscale-outputscacheAdds a cache with saves the last shown framestblendSubtraction of the previous to the current frameperprojectionPerspective projection from different camera-models
Package: bboxconverter
bboxconverterbboxconverter is a Python library that enables seamless conversion of bounding box formats between various types and file formats. It provides an easy-to-use syntax for reading and exporting bounding box files.IntroductionWhat is a bounding box?Bounding boxes are a crucial component of object detection algorithms, which are used to identify and classify objects within an image or video. A bounding box is a rectangle that surrounds an object of interest in the image, and is typically represented by a set of coordinates that define the box's position and size.Various types and formatWhen you work with bounding box you have severals things to consider.The bounding box could be stored indifferent typeslike:Top-Left Bottom-Right (TLBR), (x_min, y_min, x_max, y_max)Top-Left Width Height (TLWH), (x_min, y_min, width, height)Center Width Height (CWH), (x_center, y_center, width, height)Which are popular amongdifferent formatslike :COCO(Common Objects in Context)Pascal VOC(Visual Object Classes)YOLO(You Only Look Once)Furthermore, the bounding box could be stored indifferent file formatslike:csvxmljsonmanifestparquetpickleInstallationpipinstallbboxconverterorgitclonehttps://github.com/ODAncona/bboxconverter.gitcdbboxconverter
poetryinstallSee theinstallationguide for more informations.UsageThe goal of this library is to seamlessly convert bounding box format using easy syntax.It should be a breeze like...importbboxconverterasbc# Input file pathinput_path='./examples/example.csv'# Output file pathoutput_path='./examples/output/example.json'# Mapping between the input file and the bboxconverter formatbbox_map=dict(class_name='class',file_path='name',x_min='top_left_x',y_min='top_left_y',width='w',height='h',image_width='img_size_x',image_height='img_size_y',)# Read the input fileparser=bc.read_csv(input_path,mapping=bbox_map)# Export the file to the desired formatparser.export(output_path=output_path,format='coco')parser.export(output_path=output_path,format='voc')parser.export(output_path=output_path,format='yolo')DocumentationYou can find the documention online atbboxconvert.readthedoc.ioChangelogSee theCHANGELOGfile for details.ContributingContributions are welcome! Please read thecontributing guidelinesfirst.LicenseThis project is licensed under the GPLV3 License - see theLICENSEfile for details.AcknowledgmentsPascal VOCCOCOYOLOAlbumentationPyodi
Package: bbox-merger
Bounding Box MergerMerge your AI predicted Bounding boxes to get a single bounding box for
each object.Example UsageMerge Boxesfrombbox_mergerimportmerge_boxesboxes=[[0,0,2,2],[1,1,3,3],[4,4,6,6]]merged_boxes=merge_boxes(boxes)print(merged_boxes)Output: [[0.0, 0.0, 3.0, 3.0], [4.0, 4.0, 6.0, 6.0]]Calculate IoUfrombbox_mergerimportcalculate_ioubox1=[0,0,2,2]box2=[1,1,3,3]merged_boxes=calculate_iou(box1,box2)print(merged_boxes)Output: 0.14285714285714285ExampleBefore Merging Bounding BoxesAfter Merging Bounding Boxes
Package: bboxpy
bboxpyManage your Bouygues Bbox in PythonEasily manage your Bbox in Python.
Check your config, configure your dhcp, disable your wifi, monitor your LAN activity and many others, on LAN or remotely.bboxpy is a python library implementing fir the Bbox.This project is based on stilllman/aiofreepybox, which provides the same features as aiofreepybox in a synchronous manner.InstallUse the PIP package manager$pipinstallbboxpyOr manually download and install the last version from github$gitclonehttps://github.com/cyr-ius/bboxpy.git
$pythonsetup.pyinstallGet started# Import the bboxpy package.frombboxpyimportBboxfrombboxpy.exceptionsimportBboxExceptionasyncdefasync_main()# Instantiate the Sysbus class using default options.bbox=Bbox(hostname="https://192.168.1.254",pass='xxxxxx')# Connect to the livebox with default options.awaitbbox.async_login()try:device_info=awaitbbox.device.async_get_bbox_info()print(device_info)exceptBboxExceptionaserror:logger.error(error)# Do something useful, rebooting your livebox for example.awaitbbox.device.async_reboot()# Properly close the session.awaitbbox.async_logout()if__name__=="__main__":loop=asyncio.get_event_loop()loop.run_until_complete(async_main())
Package: bboxtools-2
BboxtoolsInstallationgitclonehttps://github.com/ODAncona/bbox-tools.gitcdbbox-tools
python3setup.pyinstallorpipinstallbboxtoolsSee theinstallationguide for more information.IntroductionWhat is a bounding box?Bounding boxes are a crucial component of object detection algorithms, which are used to identify and classify objects within an image or video. A bounding box is a rectangle that surrounds an object of interest in the image, and is typically represented by a set of coordinates that define the box's position and size. These boxes can be used to locate and extract objects from an image, and can also provide important information about the size, shape, and orientation of the objectsVarious types and formatWhen you work with bounding box you have severals things to consider.First, the bounding box could be stored indifferent typeslike:Top-Left Bottom-Right (TLBR), (x_min, y_min, x_max, y_max)Top-Left Width Height (TLWH), (x_min, y_min, width, height)Center Width Height (CWH), (x_center, y_center, width, height)Which are popular amongdifferent formatslike :COCO (Common Objects in Context)Pascal_voc (Visual Object Classes)YOLO (You Only Look Once)Furthermore, the bounding box could be stored indifferent file formatslike:csvxmljsonmanifestparquetpickleGoalThe goal of this library is to seamlessly convert bounding box format using easy syntax.It should be a breeze like...importbboxtoolsasbt# Input file pathinput_path1='./examples/example1.csv'# Output file pathoutput_path2='./examples/output/test2.json'# Mapping between the input file and the bboxtools formatbbox_map=dict(class_name='class',file_path='name',x_min='top_left_x',y_min='top_left_y',width='w',height='h',image_width='img_size_x',image_height='img_size_y',)# Read the input fileparser=bt.read_csv(input_path1,mapping=bbox_map)# Export the file to the desired formatparser.export(output_path=output_path2,format='coco')DocumentationAPI ReferenceBBoxHow to guideInstallationParse bboxExport bboxTutorialsPrepare datasetExplanationObject detection and bboxContributingContributions are welcome!LicenseThis project is licensed under the GPLV3 License - see theLICENSEfile for details.AcknowledgmentsPascal VOCCOCOYOLOAlbumentation
Package: bbox-utils
Utilities to easily convert between different bounding box formats (YOLO, XYWH, XYXY, etc.).DescriptionYou can find documentation for the project athere.2D Bounding Box ConversionsList of points [top left, top right, bottom right, bottom left]XYWH: top left, width, heightXYXY: top left, bottom rightYOLO3D Bounding Box ConversionsYou can create a 3D bounding box with either:A center point, width, height, depth, and rotationThe back-bottom-left point, width, height, depth, and rotationYou can convert between the two forms and also get a triangular polygon to use for plotting triangular meshes.The majority of the 3D Bounding Box implementation comes from thebbox PyPI package.VisualizationsYou can usebbox-utilsto visualize annotations within point clouds or images.To use point clouds, you will need to installopen3dandplotlywith either:pip3 install open3d plotly==4.14.3
pip install
# or
conda install -c open3d-admin open3d
conda install -c plotly plotly=4.14.3At the time of writing this,open3drequires Python < 3.9To use images, you will need to installOpenCV:pip3 install opencv-python
# or
conda install opencv -c conda-forgeMaking Changes & ContributingThis project usespre-commit, please make sure to install it before making any
changes:pip install pre-commit
cd bbox-utils
pre-commit installIt is a good idea to update the hooks to the latest version:pre-commit autoupdateNoteThis project has been set up using PyScaffold 4.0rc1. For details and usage
information on PyScaffold seehttps://pyscaffold.org/.
Package: bboxvis
Point Cloud Visualization toolExamplea=VisCanvas(server=False)bbox=np.array([-23.70159063222195,16.49008742319191,0.5517544258809011,3.518475404486515,1.5305968264604937,1.7465252991680738,3.1246051953112426,])bbox2=np.array([-26.157840946004853,18.46808565785399,0.5425958214403117,3.518475404486515,1.5305968264604937,1.7465252991680738,3.1231877554048766])a.add_bbox(bbox,color=(0,1,1,1),name='bbox1')a.add_bbox(bbox2,color=(1,1,0,1),name='bbox2')a.run()
Package: bbox-visualizer
bbox-visualizerThis is a simple library which has different functions that lets users draw different types of visualizations. Useful for visualizing objects after object detection.The bounding box points are expected in the format:(xmin, ymin, xmax, ymax)Documentation:https://bbox-visualizer.readthedocs.io.Free software: MIT licenseInstallation:pip install bbox-visualizerUsage:import bbox_visualizer as bbvPhotos byJoshua Earle,Jonas WeckschmiedandSherzod MaxonUnsplash.imagefunctionbbv.draw_rectangle(img, bbox)bbv.add_label(img, label, bbox, top=True)bbv.draw_rectangle(img, bbox)bbv.add_T_label(img, label, bbox)bbv.draw_flag_with_label(img, label, bbox)bbv.draw_rectangle(img, bbox)bbv.add_label(img, label, bbox, top=False)bbv.draw_rectangle(image, bbox, is_opaque=True)bbv.add_label(img, label, bbox, draw_bg=False, top=False)bbv.draw_multiple_rectangles(img, bboxes)bbv.add_multiple_labels(img, labels, bboxes)bbv.draw_multiple_flags_with_labels(img, labels, bboxes)bbv.draw_multiple_rectangles(img, bboxes)bbv.add_multiple_T_labels(img, labels, bboxes)There areoptionalfunctions that can draw multiple bounding boxes and/or write multiple labels on the same image, but it is advisable to use the above functions in a loop in order to have full control over your visualizations.bbv.draw_multiple_rectangles(img, bboxes)bbv.add_multiple_labels(img, labels, bboxes)bbv.add_multiple_T_labels(img, labels, bboxes)bbv.draw_multiple_flags_with_labels(img, labels, bboxes)bboxesandlabelsare lists in the above examples.CreditsThis package was created with Cookiecutter and theaudreyr/cookiecutter-pypackageproject template.
Package: bbox-visualizer2
BBox-Visualizer2This is a python package for visualizing bounding boxes and adding labels to a given image. The creation of this package is inspired byshoumikchow/bbox-visualizer, but I re-implement it throughPillowinstead ofcv2.The format of a bounding box is(xmin, ymin, xmax, ymax).InstallationFromPypipip install bbox-visualizer2From sourcegit clone https://github.com/fansuregrin/bbox-visualizer2.git bbv2
cd bbv2
python3 -m pip install --upgrade build
python3 -m build
pip install dist/bbox_visualizer2-0.0.2-py3-none-any.whlUsageYou can seedemosfor details.Multiple bboxes visualizationCode examplesclasses=['person','bird','cat','cow','dog','horse','sheep','aeroplane','bicycle','boat','bus','car','motorbike','train','bottle','chair','diningtable','pottedplant','sofa','tvmonitor',]font_path='assets/fonts/LXGWWenKai-Regular.ttf'img_path='assets/images/000623.jpg'pil_img=Image.open(img_path)img=np.asarray(pil_img,dtype=np.uint8)xml_filepath='assets/annotations/000623.xml'boxes,labels=get_annot_info(xml_filepath,classes)bbox_visualizer=bbv.BBoxVisualizer(classes,font_path)img=bbox_visualizer.visualize_bbox(img,boxes,labels)Single bbox visualization(1) Label on the top of the bboxCode exampleslabel='cow'box=[299,160,446,252]color=(255,255,0)text_color=(0,0,0)img1=bbv.draw_rectangle(img,box,bbox_color=color,thickness=1)img1=bbv.add_label(img1,label,box,size=12,draw_bg=True,text_bg_color=color,alpha=0.5,text_color=text_color,top=True,font_fp=font_path)(2) Label inside the boxCode exampleslabel='cow'box=[299,160,446,252]color=(255,255,0)text_color=(0,0,0)img2=bbv.draw_rectangle(img,box,bbox_color=color,thickness=3)img2=bbv.add_label(img2,label,box,size=12,draw_bg=True,text_bg_color=color,alpha=0.5,text_color=text_color,top=False,font_fp=font_path)(3) Set the box to opaqueCode exampleslabel='cow'box=[299,160,446,252]color=(255,255,0)text_color=(0,0,0)img3=bbv.draw_rectangle(img,box,bbox_color=color,is_opaque=True,alpha=0.5)img3=bbv.add_label(img3,label,box,size=12,draw_bg=True,text_bg_color=color,alpha=0.5,text_color=text_color,top=False,font_fp=font_path)
Package: bbp
BBP - Better Boto PaginatorTheboto3module haspaginationfunctionality.
So if you're trying to enumerate a long list of resources, the paginator will provides an easier way to fetch chunk after chunk of the resource list, compared to rawlist_calls.The problem with how the module exposes these pages is that you end up with a list of lists.
For example, to get a list of all objects within an S3 bucket, you can do:import boto3
client = boto3.client('s3')
paginator = client.get_paginator('list_objects_v2')
objects = [p['Contents'] for p in paginator.paginate(Bucket='my-bucket')]This returns a list of lists of object information.
Do you remember off the top of your head how to flatten a list of lists into one list?
I sure don't.
Yes I could have a for loop and append to a list each iteration, but that feels like more effort than should be required.Even if you're not loading the whole resource list into a list in memory, and are instead processing within a for loop, you end up with a messy nested for loop.for page in paginator.paginate(Bucket='my-bucket'):
    if ['Contents'] in page:
        for element in page['Contents']:
             process(element)I find this a bit awkward.
What I really want is:for element in function(Bucket='my-bucket'):
   process(element)Wherefunctionis smart enough to either return the next item on the page it already has in memory,
or fetch the next page with a new API call and return the first item of that.This library provides that function.Installationpip install bbpUsageHere's an example of how to use it for theLambdaListFunctionspaginator.from wrapper import paginator
from pprint import pprint
for lam in paginator('lambda', 'list_functions', 'Functions'):
    pprint(lam) # process just one element at a timelambdais what you would pass toboto3.client()list_functionsis what you would pass toclient.get_paginator()Functionsis the key within the response tolist_objects_v2which contains the list of resources for each page.
This varies for each type of pagination call. You have to look upthe documentation.
Eventually I'll try to get this tool to lookup/remember that.Here's another example, using theS3ListObjectsV2paginator.
In this example we need to pass in the bucket name as an extra argument.
Just specify this as aname=valuepair at the end of the argument list.for obj in paginator('s3', 'list_objects_v2', 'Contents', Bucket='mybucket'):
    pprint(obj) # process a single resources3is what you would pass toboto3.client()list_objects_v2is what you would pass toclient.get_paginator()Bucket='mybucket'and any othername=valuearguments are what get passed tothe paginator.PackagingThis is my first ever package on PyPI.
I usedthis guideto learn how to do this.
Package: bbpmf
betabernsumSums of beta-bernoulli variablesInstallationFor Python:pip3installbetabernsumorpip3 install --user betabernsumFor R:library(devtools)install_github("anthony-aylward/betabernsum")ExamplesIn Python:frombetabernsumimportbbs_pmf,bbs_cdf,bbs_testhelp(bbs_pmf)help(bbs_cdf)help(bbs_test)bbs_pmf(5,[30,12],[4,5],[6,5],independent=False)bbs_cdf(5,[30,12],[4,5],[6,5],independent=False)bbs_test(5,[30,12],[4,5],[6,5],independent=False)In R:library(betabernsum)help(dbbs)help(pbbs)help(bbs_test)dbbs(5,c(30,12),shape1=c(4,5),shape2=c(6,5),independent=FALSE)pbbs(5,c(30,12),shape1=c(4,5),shape2=c(6,5),independent=FALSE)bbs_test(5,c(30,12),shape1=c(4,5),shape2=c(6,5),independent=FALSE)
Package: bbprc
BitBucket Pull Request commenterThis simple utility just sends comment to BitBucket server pull request.
It is useful in CI automation to comment PR with build results and include
some data from output text file.ExampleSend content of output.txt for some build to BitBucket pull request comment:bbprc--server%bitbucket_url%--token%bitbucket_password%\--project%bitbucket_project%\--repo%bitbucket_repo%\--greeting"%system.teamcity.buildConfName%"\--pr%teamcity.build.branch%\--file%teamcity.build.checkoutDir%/output.txtAuthenticationFor security reasons it only supportspersonal access tokenas a bearer for authentication.Requirementsrequests
Package: bbprepared
bbpreparedA general toolkit for working with building blocks for construction of larger molecules.The library is built off ofstk, which comes with the pip install.Installationbbpreparedis apipinstallable library:$ pip install bbpreparedThe code can be also installed following these steps:clonebbpreparedfromhereCreate acondaormambaenvironment:$ mamba create -n NAME python=3.11Activate the environment:$ conda activate NAMEFrombbprepareddirectory, install pip environment:$ pip install .or for development,$ pip install -e .UsageTo be completed, but see tests for examples.AcknowledgementsThis work is a mixture of codes developed throughout my postdoc in theJelfs Group, and thePavan Group, and during my time as a developer ofstkandstkowith Lukas Turcani.
Package: bbprop
bbpropThis package provides a statistical test for the difference of beta-binomial proportions.Installationpip3installbbproporpip3 install --user bbpropHypothesis test detailsThe aim of the test is to determine whether two values drawn from beta-binomial distributions are significantly different from one another.The null hypothesis of the test is that two random variablesB0andB1have beta-binomial distribtions with parameterstheta0 = (n0, alpha0, beta0)andtheta1 = (n1, alpha1, beta1), respectively.The test statistic is the valuex = abs(b0/n0 - b1/n1)whereb0andb1are the number of successes drawn fromB0andB1.The p-value is then the probability thatxis greater than or equal to its observed value, given the predefined null distribution.Examplesfrombbpropimportbbprop_cdf,bbprop_testhelp(bbprop_cdf)help(bbprop_test)bbprop_cdf(0.1,[30,12],[4,5],[6,5])bbprop_test(0.1,[30,12],[4,5],[6,5])
Package: bb-pytest
bb_pytestbb_pytest is a library that adds aBuildbotbuildstep that can
parse py.test output and generate correct status text at completion of
tests.ArgumentsThis test step used ShellMixin. So besides the
arguments listed below the following steps will also be accpeted and
will behave as per the ShellCommand step: workdir, haltOnFailure,
flunkOnWarnings, flunkOnFailure, warnOnWarnings, warnOnFailure,
want_stdout, want_stderr, timeouttestpathThe PYTHONPATH to use when running the tests.pythonThe python executable to use.pytestThe pytest executable to use.pytestModeThe mode that should used to track the progress of the step. Valid
options are “pytest” or “xdist”.pytestArgsThe pytest arguments to be passed on command lineverboseThe pytest ‘-v’ argument, also used to properly process output from pytest. (‘-v’ shall not be used in pytestArgs)Examplefrombb_pytestimportstepfrombuildbot.processimportfactoryf=factory.BuildFactory()f.Factory.addStep(Pytest(pytest="pytest",pytestArgs=['-u','-i'],testpath=None,tests=[""],flunkOnFailure=True))ChangelogRelease 0.3 24/08/2020updated to buildbot 0.9.X.Release 0.2 10/04/2013Fixed testcounting.Updated the error states to match the trial step.Added support for counting errors.Release 0.1 23/03/2013Initial release.