Saravanan666/pypi-org huggingface dataset:
Package: opencve
Tryfor freeOpenCVE onhttps://www.opencve.ioor checkdocumentationto install it yourself.What is OpenCVEOpenCVEis a platform used to locally import the list of CVEs and perform searches on it (by vendors, products, CVSS, CWE...).Users subscribe to vendors or products, and OpenCVE alerts them when a new CVE is created or when an update is done in an existing CVE.FeaturesExplorethe CVE database and filter the results by Vendor, Product, CVSS score or CWESubscribeto vendors and products extracted from CPEBe notifiedfor new CVE and for CVE updates based on subscriptionsAnalyseall CVE details (vendors, products, CVSS score, CPE, CWE, References...)Createcustom tags (unread, important, devteam...) to organize the CVE listDisplaythe history of each CVE and see their last changes in the homepageRetrievethe last changes in custom reportsCustomizethe notification settings (frequency, filter by CVSS score...)IntegrateOpenCVE with your own tools using the Rest APIYou can usefor freethese features on the public instance:https://www.opencve.io.How does it workOpenCVE uses theJSON feedprovided by theNVDto update the local list of CVEs.After an initial import, a background task is regularly executed to synchronize the local copy with the NVD feed. If a new CVE is added, or if a change is detected, the subscribers of the related vendors and products are alerted.Read theHow It Worksguide to learn in details how OpenCVE works.RequirementsOpenCVE works withPython >=3.7.It uses the JSONB feature for performance, so you will need aPostgreSQLinstance to store the data (CVE, Users, Vendors, Products, Subscriptions, ...). Other engines are not supported.Thepg_trgmmodule of PostgreSQL is required to let you search in the CVEs list. Theupgrade-dbcommand will enable it for you, but you can also do it yourself if you prefer (CREATE EXTENSION pg_trgm). From PostgreSQL 13 this module is considered as trusted, meaning it can be installed by non-superusers with the CREATE privilege.Celery is used to periodically fetch the NVD database and update the list of CVEs. For that you will need a broker : we recommend youRedisfor the ease of installation. Futhermore it is possible that future versions of OpenCVE will use a cache feature, in that case the Redis requirement will already be filled for you.During the import of initial data OpenCVE will download and parse huge files, like the CPE dictionnary. For that we recommend you3.5G RAMat least.InstallationWe provide 2 methods to install OpenCVE :manual installationdocker installationThe second method can be useful if you don't want to manage the dependencies (like PostgreSQL, Redis or Celery).Check these documentations for the details of each step (initial import, admin creation, etc).
Package: opencv-face-recognition
OpenCV Face Recognition Python SDKIntroducing OpenCV-Face-Recognition, the cutting-edge Python SDK that's transforming biometric authentication in security and technology sectors. Our deep learning-driven library offers an array of powerful features including:Face Registration & Search: Easily register individuals using their facial images and swiftly search for registered persons, streamlining user management.Grouping into Collections: Organize individuals into collections for better management and quick retrieval.Face Comparison: Utilize our advanced algorithms to compare two faces and determine if they belong to the same person with unparalleled accuracy.Liveness Checks: Stay ahead of spoofing attempts with our sophisticated liveness checks, ensuring that each photo is genuine.Ideal for applications in attendance checking, access monitoring, building security, criminal identification, and KYC processes, OpenCV-Face-Recognition excels in scenarios demanding high security and precision.Top-Notch Performance Metrics: Standing out in the industry, our library boasts a 99.99% accuracy rate and a less than 1% false non-match rate, backed by a top 8 ranking in NIST evaluations as of Q1 2022. Our unique single-image liveness detection feature not only enhances user experience but also meets Level 2 compliance as per ISO 30107-3 standards.Universal Compatibility: As a JSON REST-based API, our SDK seamlessly integrates into any internet-connected device capable of facial image capture, making it universally adaptable.SaaS Model Licensing: We offer a flexible monthly subscription model, making cutting-edge facial recognition technology accessible and scalable for your organization.Elevate your security and technology features with OpenCV-Face-Recognition – where innovation meets reliability.How to useInstall the package via:pip install opencv-face-recognitionDocumentationOur documentation can be foundhere
Package: opencv-gst-rtmp
What is this?Push opencv frame to rtmp server using gstreamer.Usecases?Modified opencv frame and push to rtmp server.Fundamental?Read opencv frame from appsrc and convert to flv and push to rtmp server using rtmpsink.Test with example:Setup environment:Create virtual environment (Optional):python3 -m venv .venvRun setup_env.shsource setup_env.shRun installpython3 -m pip install .Runpython3 examples/main_frame.pyorpython3 examples/main_stream.pyPlay using ffplay or vlc:ffplay rtmp://localhost:1935/liveBuildInstall wheel:python3 -m pip install wheelBuild:python3 setup.py bdist_wheelInstall:python3 -m pip install build/opencv_gst_rtmp-0.1.0-py3-none-any.whl
Package: opencv-gst-rtsp-server
What is this?Restream rtsp with opencv frame usinggst-rtsp-server.Usecases?Modified opencv frame and restream.Fundamental?There are 2 component: media_factory and server:media_factory(rtsp_media_factory): convert opencv frame to gst buffer.server(rtsp_server): publish buffer to rtsp stream.Test with example:Setup environment:Create virtual environment (Optional):python3 -m venv .venvRun setup_env.shsource setup_env.shRun installpython3 -m pip install .Runpython3 examples/main_frame.pyorpython3 examples/main_stream.pyPlay using ffplay or vlc:ffplay -rtsp_transport tcp rtsp://localhost:8001/streamBuildInstall wheel:python3 -m pip install wheelBuild:python3 setup.py bdist_wheelInstall:python3 -m pip install build/opencv_gst_rtsp_server-0.1.3-py3-none-any.whl
Package: opencv-iav
[![Build Status](https://travis-ci.com/macornwell/opencv-image-and-video.svg?branch=master)](https://travis-ci.com/macornwell/opencv-image-and-video)
[![Coverage Status](https://coveralls.io/repos/github/macornwell/opencv-image-and-video/badge.svg?branch=master)](https://coveralls.io/github/macornwell/opencv-image-and-video?branch=master)
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)# OpenCV Image and Video
If you have wanted to integrate OpenCV in an application for taking pictures, or recording a simple video this is the
library and application to make it happen.## How To Installpip install opencv-iav## Application
The application provided is the ‘opencv_iav’ script. This script allows a user to take a photo or record a video
of a given duration in seconds.
Package: opencv-jupyter-ui
opencv_jupyter_uiAs you know it is not possible to usecv2.imshowin the remote jupyter notebook or colab.
This is the replacement ofcv2.imshowfor jupyter. you need only to replacecv2.imshowtojcv2.imshow. It will works in jupyter or python.Live Demo:Installationpip install -U opencv_jupyter_uiThen activate extensionjupyter nbextension install --user --py ipycanvas
jupyter nbextension enable --user --py ipycanvasorjupyter nbextension install --py --symlink --sys-prefix ipycanvas
jupyter nbextension enable --py --sys-prefix ipycanvasFor jupyter lab please make sure that you have nodejs or install it byconda install -c conda-forge nodejsThen runjupyter labextension install @jupyter-widgets/jupyterlab-manager ipycanvasplease upgrade ipycanvas to version 0.12 for higher performance!pip install -q ipycanvas>=0.12Installation on ColabFor google colab please add the following codes and restart all the cells.!pip install -q ipycanvas==0.11
from google.colab import output
output.enable_custom_widget_manager()Usageimportimport opencv_jupyter_ui as jcv2Showing FrameIt is exactly likecv2.imshowyou just need to changecv2tojcv2.jcv2.imshow('test',frame)more options for showing frameyou can specify target width or height:jcv2.imshow('test',frame,width=100) # scale down/up your image to fit this width
jcv2.imshow('test',frame,100) similar to previous example
jcv2.imshow('test',frame,height=150) # scale down/up your image to fit this height
jcv2.imshow('test',frame,width=100,height=150) # skretch your image to this size
jcv2.imshow('test',frame,color_space='rgb') # color_space=rgb or bgr, default: bgrPlease note that you can also put CSS string instead e.g.,width='100%'but it has higher overheadcv2.waitKeyWhen you use cv2.waitKey, you need to change it to jcv2.waitKey.jcv2.waitKey(1000) # to wait for a button press in one seconddefine more keys:you can define custom keys with this commandjcv2.setKeys(['q','esc','enter','space'])Supported special keys are:esc:27,space:32,enter:10,left:2424832,right:2555904,up:2490368,down:2621440,del:3014656reseting and destroying windows:The following line where you clear the outputjcv2.destroyAllWindows()Exampledef getTestCV2Frame(i): # it generate an example image frame
	import numpy as np
	x = np.linspace(-1, 1, 200)
	y = np.linspace(-1, 1, 200)
	x_grid, y_grid = np.meshgrid(x, y)
	blue_channel = np.array(np.sin(x_grid**2 + y_grid**2) * 255, dtype=np.int32)
	red_channel = (np.zeros_like(blue_channel) + 200*i)%222
	green_channel = np.zeros_like(blue_channel) + 50
	return np.stack((red_channel, blue_channel, green_channel), axis=2)


import opencv_jupyter_ui as jcv2
for i in range(200):
	frame= getTestCV2Frame(i)
	jcv2.imshow('test',frame)
	if jcv2.waitKey(1000)=='q':
		break
jcv2.destroyAllWindows() #optinal, only needed if you don't run it in notebookOutput:running in normal pythonif it is not in jupyter it will display an opencv window. please don't forget to calljcv2.destroyAllWindows()andjcv2.waitkey(100)if it is not in jupyter
Package: opencv-log
AnOpenCVbased visual logger for debugging, logging and testing reporting an image processing code.Why opencv-log?InstallationUse the package managerpipto install.pipinstallopencv-logDocumentation:https://navarasu.github.io/opencv-logA Simple Usageimportcvlogaslogimportcv2# image read using opencvimg=cv2.imread("sample.png")log.image(log.Level.ERROR,img)Just by switching mode, you can use the same line of code for logging and debugging.
Also you can log houghlines, countour and more.Referdocsto get started.ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.ReferGuidelinesfor more information.LicenseMIT
Package: opencv-object-counter
OpenCV2 Object CounterCount objects using opencv2 in this configurable CLI utility. The module uses frame differencing to detect and count objects according to a flexible configuration scheme. This makes it a quick-and-dirty solution that can achieve good accuracy in a variety of cases and doesn't involve the computaional overhead nor complexity of convolutional neural netowrks (CNN).Alternatively, the package can be imported to your own scripts.GatesGatesare the instrument used for counting. They are boxes which detect  objects passing through them. A cooldown is triggered when it detects an object to avoid counting the same object many times. The right cooldown duration will depend on the counting situation. An object is counted if the gate is not on cooldown and the center point of the object and the gate is within the given distance.ConfigurationHere is an annotated example config. A default config is provided inooc/config.json. Runningoocin cli mode requires a config. More details on some of the parameters can be found onhttps://docs.opencv.org/.Note: The comments provided in this snippet are for informational purposes only and render this invalid JSON.{// list of gates that will be used for counting"gates":[{// Starting x and y position (0,0 is top left)// and gate dimnensions"x":350,"y":320,"width":100,"height":100}],"blur":{// openCV2 kernal size// must be positive or odd, or 0 (in which case// they are computed from sigma)"ksize":{"width":21,"height":21},// openCV2 kernal standard deviation"sigma_x":0},// whether or not the video shows. press 'q' to quit"show":true,// whether or not additional video shows/logs print"debug":false}Command Line Arguments-s, --sourcerequiredPath to the video to analyze.Usage:ooc -s /path/to/video.mp4-t, --showDisplays the video if set.-d, --debugRuns in debug mode, which includes visual on the video (if -s is set) and prints logs.-c, --configPath to config file. If not set, the default config is
used.Usage:ooc -s /path/to/video.mp4 -c /path/to/config.jsonExample Runpython ooc/cli.py -s /path/to/video.mp4 -c /path/to/config.json
Package: opencv-pg
OpenCV PlaygroundThe OpenCV Playground is a Qt6 application that brings together improved documentation alongside OpenCV functions with the ability to explore the effects of function parameters on an image in real time.It also comes with a customPipeline Launcherthat allows you to build and interact with your own sequence of image transformations along with custom build functions.Full documentation can be found onRead the Docs.DemoInstallationCurrently tested with python 3.8.10/3.10.0 and opencv-contrib-python-headless 4.8.0.76 on an M1 Mac.From PyPi:pipinstallopencv-pgFrom Github Repo:pipinstallgit+https://github.com/opencv-pg/opencv-pgNote for Linux UsersNOTE:I no longer have access to anything but a Mac (as of1.0.2), so I can't confirm if the below still stands. It did in1.0.1.On Ubuntu 16.04 (others currently untested), there may be missing links to xcb related shared objects.tldr;sudoapt-getinstall--reinstalllibxcb-xinerama0Digging DeeperIf you see errors about xcb, you can perform the following to help troubleshoot. In your terminal, make the following export:exportQT_DEBUG_PLUGINS=1Run opencvpg again and validate the output. The final lines will likely mention details about files not found. Likelylibxcb-xinerama.so.0.Run the following:cdyour_venv/lib/pythonX.X/site-packages/PySide2/Qt/plugins/platforms/
lddlibqxcb.so|grep"not found"This will print any missing links. In our case,libxcb-xinerama.so.0showed up a couple times. Reinstalling the package as follows resolved the issue:sudoapt-getinstall--reinstalllibxcb-xinerama0Once it’s working, you may want to disable thatQT_DEBUG_PLUGINSenv variable so it doesn’t throw extra garbage in your output.UsagePlaygroundTo launch the OpenCV Playground with:The built-in image:opencvpgAn image of your choice:opencvpg--image<path-to-image.png>Without the documentation window:opencvpg--no-docsCustom PipelineThe following is an example of building a custom Pipeline.fromopencv_pgimportPipeline,Window,launch_pipelinefromopencv_pgimportsupport_transformsassuptfromopencv_pgimporttransformsastfif__name__=='__main__':my_image='/path/to/image.png'# Creates two windowspipeline=Pipeline([Window([supt.LoadImage(my_image),supt.CvtColor(),tf.InRange(),supt.BitwiseAnd(),]),Window([tf.Canny(),]),])launch_pipeline(pipeline)Then run the file.DevelopmentInstallationTo install in development mode:gitclonehttps://github.com/opencv-pg/opencv-pg
pipinstall-eopencv-pg/[dev]Running Testscdtests
pytestGenerating DocsGo into the top leveldocsdirectoryrunsphinx-apidoc -f -o source/ ../src/opencv_pgrunmake htmlOutput will be in thedocs/build/html/directory.
Package: opencv-proto
https://github.com/idlesign/opencv-protoWork in progress. Stay tuned.DescriptionAllows fast prototyping in Python for OpenCVOffers primitives and simplified interfaces to streamline prototypes construction in Python.Facilitates:Windows construction and managementTrackbar constructionConfiguration save/load (including trackbar values)Key binding (e.g. for trackbar control, configuration save/load)Video capturing and modificationWork with imagesWork with textFrames transformationSamplesColor PaletteLet’s replace 37 lines of source code fromTrackbar as the Color Palettetutorial withocvproto-based implementation:fromocvproto.toolboximportWindowManager,CanvaswithWindowManager()aswm:rgb=wm.window.add_trackbar_group(['R','G','B'],max=255)for_inwm.app.loop():wm.set_frame(Canvas(512,300,color=rgb))Camera captureNow let’s capture video camera stream intoocvproto.avifile, being able to adjust blur.Let’s also setup config filepath (ocvproto.json) - this allows us to store current trackbar values
(skey) and load them (rkey). It is useful to restore settings between sessions.We bindzkey to take camera shots.fromocvproto.toolboximportWindowManager,CamerawithWindowManager()aswm:wm.app.set_config('ocvproto.json')blur=wm.window.add_trackbar_group(['x','y'],'Blur',default=1)withCamera()ascam:wm.app.bind_key('z',cam.dump_image)for_inwm.app.loop():cam.read()cam.blur(blur)cam.dump()wm.set_frame(cam)Read the documentation.RequirementsPython 3.6+opencv-python(or variants)Quick install with third-parties:$ pip installopencv-proto[all]Documentationhttps://opencv-proto.readthedocs.org/
Package: opencv-python-inference-engine
READMEThis is a pre-builtOpenCVwithInference Enginemodule package for Python3.
You need that module if you want to run models fromIntel's model zoo.It built withffmpegandv4lbut without GTK/QT (use matplotlib for plotting your results).Contrib modules and haarcascades are not included.For additional info visit theproject homepage
Package: opencv-rolling-ball
Rolling ball and sliding paraboloid background subtraction algorithmsFully Ported to Python from ImageJ's Background Subtractor.
Only works for 8-bit greyscale images currently.
Based on the concept of the rolling ball algorithm described
in Stanley Sternberg's article,
"Biomedical Image Processing", IEEE Computer, January 1983.
Imagine that the 2D grayscale image has a third (height) dimension by the image
value at every point in the image, creating a surface. A ball of given radius
is rolled over the bottom side of this surface; the hull of the volume
reachable by the ball is the background.http://rsbweb.nih.gov/ij/developer/source/ij/plugin/filter/BackgroundSubtracter.java.htmlThis algorithms are perfect for microscope images, to distinguish particles
from background.Installationpipinstallopencv-rolling-ballUsageimportcv2fromcv2_rolling_ballimportsubtract_background_rolling_ballimg=cv2.imread(f'path/to/img.tif',0)img,background=subtract_background_rolling_ball(img,30,light_background=True,use_paraboloid=False,do_presmooth=True)Example outputsInputSubtracted backgroundWithout background
Package: opencv-stream
opencv_streamUnder constructionDeveloped by OlivierExamples of How To UseCreating A Streamfromopencv_streamimportVideoStreamer,ModelOutput,Modelimporttimeimportnumpyasnpimportcv2classTempModelOutput(ModelOutput):defto_dict(self)->dict:return{"success":True}defdraw(self,image:np.ndarray)->None:w,h,_=image.shapecv2.putText(image,"Hello from opencv_stream",(w//2,h//2),fontFace=1,fontScale=1,color=(255,0,0))classTempModel(Model):defpredict(self,image:np.ndarray)->ModelOutput:returnTempModelOutput()stream=VideoStreamer.from_webcam()stream.start_with_model(TempModel(),)
Package: opencv-stubs
OpenCV stubsUnofficial python stubs for the opencv-python package.This package includes all the functions, classes and constants (please open an issue if you find a missing one).For some functions, OpenCV may handle more types than defined in this package. If you would like a type/function to be added or modified, please open an issue or a PR. There may also be a few errors as some types have been added progrmmatically. Please open an issue if you see one.
The typing is still a work in progress, if you want a function/method to be added first you can open an issue.The stubs include the docstrings as they are otherwise not available in the IDE (as far as I know).These stubs are a temporary help until official ones are made (seethis issueandthis PR).InstallationThe package is available on pypihere, you can install it with:pip install opencv-stubsThe dependency on opencv is optional, and can be accessed with:pip install opencv-stubs[opencv]pip install opencv-stubs[opencv-contrib]pip install opencv-stubs[opencv-headless]AcknowledgementsA stub file with opencv functions can be found on theMicrosoft stubs repo. This package reused those functions (with some added typing).TODO:Do something aboutcv2.gapi.cv,cv2.utils.cv2andcv2.mat_wrapper.cv(do not duplicate everything if possible).Handle cases likecv2.misc.version.cv2.misc.version.cv2.misc.get_ocv_version().Only include theopencv-contribspecific stubs when usingopencv-stubs[opencv-contrib].
Package: opencv-tools
Simple OpenCV toolsSimple tools I use to make my life easier when working with OpenCV.Not very pythonic:cap = cv.VideoCapture(0)
if not cap.isOpened():
    exit()
while True:
    ret, frame = cap.read()
    if not ret:
        break
    cv.imshow('frame', gray)
    if cv.waitKey(1) == ord('q'):
        break
cap.release()
cv.destroyAllWindows()I like this better:with VideoPreview() as vid:
    for frame in Capture(0):
        vid.show(frame)Maybe not everything is explicit, however it's a lot easier to read.Likely I'm gonna add more stuff in the future.
Package: opencv-torchvision-transforms-yuzhiyang
opencv_torchvision_transformThis is an opencv based rewriting of the "transforms" in torchvisionpackage.All functions depend on only cv2 and pytorch (PIL-free). As thearticlesays, cv2 is three times faster than PIL.Most functions in transforms are reimplemented, except that:ToPILImage(opencv we used :)), Scale and RandomSizedCrop which are deprecated in the original version are ignored.The affine transform in the original one only has 5 degrees of freedom, I implement an Affine transform with 6 degress of freedom called RandomAffine6(can be found in master/cvtorchvision/cvtransforms/cvtransforms.py). The original method(RandomAffine) is still retained and reimplemented with opencv.My rotate function is clockwise, however the original one is  anticlockwise.Adding some new methods which can be found inSupport(the bolded ones).All the outputs of the opencv version are almost the same as the original one's(test in master/cvtorchvision/cvtransforms/cvfunctional.py:  ifname== 'main':...).Support:Compose, ToTensor, ToCVImage, NormalizeResize, CenterCrop, PadLambda(doesn't work well in multiprocess in wihdows)RandomApply, RandomOrder, RandomChoice, RandomCrop,RandomHorizontalFlip, RandomVerticalFlip, RandomResizedCrop,FiveCrop, TenCrop, LinearTransformation, ColorJitter,RandomRotation, RandomAffine,RandomAffine6,RandomPerspectiveRandomGaussianNoise","RandomPoissonNoise","RandomSPNoiseGrayscale, RandomGrayscaleHow to use:git clonehttps://github.com/YU-Zhiyang/opencv_torchvision_transforms.git.Add cvtorchvision to your python path.Add "from cvtorchvision import cvtransforms" in your pythion file.You can use all functions as the original version, for example:transform = cvtransforms.Compose([

         cvtransforms.RandomAffine(degrees=10, translate=(0.1, 0.1), scale=(0.9, 1.1), shear=(-10, 0),

         cvtransforms.Resize(size=(350, 350), interpolation='BILINEAR'),

         cvtransforms.ToTensor(),

         cvtransforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225]),
         ])more details can be found in the examples of officialtutorials.Attention:The multiprocessing used in dataloader of pytorch is not friendly with lambda function in Windows as lambda function can't be pickled (https://docs.python.org/3/library/pickle.html#what-can-be-pickled-and-unpickled).So the Lambda in cvtransform.py may not work properly in Windows.Requirementspython >=3.5.2numpy >=1.10 ('@' operator may not be overloaded before this version)pytorch>=0.4.1torchvision>=0.2.1opencv-contrib-python-3.4.2 (test with this version, but any version of opencv3 is ok, I think)PostscriptWelcome to point out and help to fix bugs !Watches, Stars and Forks won鈥檛 be rejected :smile:ThanksHongChuwho helps a lot.