Saravanan666/pypi-org huggingface dataset:
Package: cv2watermark
Puts watermark on images using relative or absolute coordinates.fromcv2watermarkimport(merge_image_percentage_height,merge_image_percentage_width,merge_image_percentage_height_position,merge_image_percentage_width_position,merge_image,)# Allowed image formats: url/path/buffer/base64/PIL/npi2=r"https://www.python.org/static/img/psf-logo.png"# Transparent image from URL doesn't work! You have to download it beforei2=r"F:\neuedownloads\psf-logo.png"i1=r"https://github.com/hansalemaos/screenshots/raw/main/splitted1.png"merg1=merge_image(back=i1,front=i2,x=10,y=30,save_path="f:\\cv2mergepics\\merg1.png")merg2=merge_image_percentage_width(back=i1,front=i2,x=10,y=30,front_percentage_width=80,save_path="f:\\cv2mergepics\\merg2.png",)merg3=merge_image_percentage_width_position(back=i1,front=i2,percentx=50,percenty=60,front_percentage_width=30,save_path="f:\\cv2mergepics\\merg3.png",)merg4=merge_image_percentage_width(back=i1,front=i2,x=110,y=10,front_percentage_width=60,save_path="f:\\cv2mergepics\\merg4.png",)merg5=merge_image_percentage_width_position(back=i1,front=i2,percentx=50,percenty=10,front_percentage_width=40,save_path="f:\\cv2mergepics\\merg5.png",)merg6=merge_image_percentage_height(back=i1,front=i2,x=20,y=50,front_percentage_height=40,save_path="f:\\cv2mergepics\\merg6.png",)merg7=merge_image_percentage_height_position(back=i1,front=i2,percentx=20,percenty=40,front_percentage_height=40,save_path="f:\\cv2mergepics\\merg7.png",)
Package: cva
cva -- Calculus of Variations=============================The cva library (pronounced see-va) implements a solver for problemsin the domain of the calculus of variations.  This includes suchproblems as finding geodesics on arbitrary surfaces, finding minimalpaths in curved spacetime, or basically any path minimization problemthat can be defined in terms of a surface or hypersurface model with anattached metric.Quickstart----import cvacva.examples.case01_torus()----Provides:1. Models2. Metrics3. Views4. SolverDocumentation:1. The mathematical foundations on which the cva library is based:Whitinger, Robert, "An Algorithm for the Machine Calculation of Minimal Paths" (2016).Electronic Theses and Dissertations. Paper 3119.   http://dc.etsu.edu/etd/3119Download pdf: http://dc.etsu.edu/cgi/viewcontent.cgi?article=4521&context=etd2. Docstrings are provided with the library functions3. Runable examples are provided as starting pointsUtilities:do_testrun the cva test suite
Package: cval
CvalA layer of protection for evalView Examples·Report BugInstallationI know many people don't care about the motives behind a program, so I have put the installation at the top.Unix and Macpython3-mpipinstallcvalWindowspy-mpipinstallcvalAboutA decently simple script that uses regular expression to add a layer of protection to eval. Why? Well I keep seeing"eval really is dangerous"and"eval is a bad practice". All these statements have some validity to them, and there is almost always a better way to do what you want to acomplish. Cval tackles the"eval really is dangerous"mindset, if you must use eval for a public project use cval.ExploitingIencourageyou to break my script, report any bugs or vulnerabilitieshere, thanks!ExamplesThese examples are focused purely on security rather then real world practical examples.Disable module importing# :NOTE: modules is False by default, and the reason we allow function calls#        is to see the error given when trying to import a module.cval('__import__("os")',calls=True,modules=False)Output:cval.IllegalSource: Cval panicked due to an attempted illegal import of the module "os"Allow certain modulescval('__import__("os")',allowed_modules=["os"],allowed_calls=["import"])Disable function callscval('print("Hello, World!")',calls=False)Output:cval.IllegalSource: Cval panicked due to an illegal function call in source! Attemped call to "print"Allow certain function callscval('print("Hello, World!")',allowed_calls=["print"])Block access to global variablesfoo="bar"deffoobar():# :NOTE: `globals` doesn't need to be passed in this case#        this is only done here for claritycval('print(foo)',globals=globals(),allowed_calls=["print"])# Will not be able to access "foo"foobar()Output:cval.SuspiciousSource: Cval found global variable "foo" in the source, killing for safety.Allow some access to global variablesfoo="bar"deffoobar():cval('print(foo)',globals=globals(),allowed_global_vars=["foo"],allowed_calls=["print"])foobar()Output:barAllow access to all global variablesfoo="bar"bar="foo"deffoobar():cval('print(bar+foo")',globals=globals(),allowed_global_vars=["*"],allowed_calls=["print"])foobar()Output:foobarBlock access local variablesdeffizzbuzz():fizz="buzz"cval('print(fizz)',locals=locals())# Will not be able to access "fizz"fizzbuzz()Output:cval.SuspiciousSource: Cval found local variable "fizz" in the source, killing for safety.Allow some access to local variablesdeffizzbuzz():fizz="buzz"cval('print(fizz)',locals=locals(),allowed_local_vars=["fizz"],allowed_calls=["print"])fizzbuzz()Output:buzzAllow access to all local variablesdeffizzbuzz():fizz="buzz"buzz="fizz"cval('print(buzz+fizz)',locals=locals(),allowed_local_vars=["*"],allowed_calls=["print"])fizzbuzz()Output:fizzbuzz
Package: cv-algorithms
cv_algorithmsA Python package (Python3 ready!) that contains implementations of various OpenCV algorithms are are not
available in OpenCV or OpenCV-contrib. This package is intended to be used with OpenCV 3.Some performance-critical algorithms are written in optimized C code. The C code is accessed usingcffiCurrently implemented:Morphological algorithmsGuo-Hall thinning (C-optimized)Zhang-Suen thinning (C-optimized)Difference-of-Gaussian transformAlgorithms on contoursMasking extraction of convex polygon area from image without rotationScale around reference point or centerFast computation of center by coordinate averagingCenter-invariant rescaling of upright bounding rectangle by x/ factorsFilter by min/max areaSort by areaCreate binary contour maskGrassfire transformColorspace metrics & utilities:Convert image to any colorspace supported by OpenCVExtract any channel from any colorspace directlyEuclidean RGB distanceOther structural algorithmsWhich neighboring pixels are set in a binary image?Algorithms on text renderingCenter text at coordinatesAuto-scale text to fix into boxOther algorithmsRemove n percent of image bordersPopcount (number of one bits) for 8, 16, 32 and 64 bit numpy arraysResize an image, maintaining the aspect ratioAs OpenCV's Python bindings (cv2) represents images asnumpyarrays, most algorithms generically work withnumpy1  arrays.InstallationInstall thestableversion:pip install cv_algorithmsHow to install thebleeding-edgeversion from GitHubpip install git+https://github.com/ulikoehler/cv_algorithms.gitHow tobuild yourself- we usePoetry:poetrybuildPotentially, you need toinstall OpenCVif not already present. I recommend first trying to install without that, since modern Python versions will take care of that automatically.UsageDifference of Gaussian transform documentation & exampleGrassfire transform documentation & exampleThinning documentation & exampleHere's a simple usage showcase:import cv_algorithms
# img must be a binary, single-channel (grayscale) image.
thinned = cv_algorithms.guo_hall(img)ContributionsContributions of any shape or form are welcome. Please submit a pull
request or file an issue on GitHub.Copyright (c) 2016-2022 Uli Köhler <cv_algorithms@techoverflow.net>
Package: cvapianalyser
CV-APIAnalysercvapianalyser is a Python library for analysing the api traffic captured by CloudVector's APIShark against an APISPEC for identifying the gap in API coverage mostly useful in a QA environment to understand the gap in test coverage.Visithttps://www.cloudvector.com/api-shark-free-observability-security-monitoring-tool/#apisharkInstallationUse the package managerpipto install foobar.pipinstallcvapianalyserUsagecvapianalyser****************************************************************************************************CloudVectorCommunityEdition-Coverageanalysisplugin****************************************************************************************************EnterCommunityEdition(CE)hostinformat<host>:<port>:x.x.x.x:yEnteryourCommunityEdition(CE)username:sandeepCommunityEdition(CE)password:EnterrecordinginCEtocomparewith:recording1instead of giving inputs every single time you can also alternatively create a file called my_cesetup.yaml in the path from where you are running the toolce_host:ce_username:ce_recording:input_apispec:you can have multiple such my_cesetup.yaml for different CE setup or different recordings and run them from specific paths for its corresponding reportsLicenseMIT
Package: cvapirisk
APISpARCAPI Specification Analysis for Risks and ComplianceAPI Sparc is a tool that will analyse API Specification for Security Risks and Compliance violations.API Specification captures the design of an API and is an integral part of API development process. The design of an API is captured in various formats such as Swagger, OpenAPI, RAML, etc.API Sparc analyses API specifications written in Swagger or OpenAPI format against the security best practices and then provides an assessment score and severity. The API Sparc tool also provides a language to codfiy your custom Risk and Compliance voilation rules too.Learn more about the security best practices that is supported out of the box in this tool here -https://www.cloudvector.com/api-security-checklist-secure-api-design/
Package: cvascode
CV as Codecvascode is command-line tool which aims to make maintaining your CV/Résumé less painful by maintaining it 'as code'. This tool enables you to seperate your CV into the data, and the template allowing the content of your cv and the apperence to be maintained seperately.What are the advantages of using cvascode?With well written templates updating the content does not destroy the appearence.Changing the appearence does not accidentally delete important data.Maintaining multiple versions and styles of your CV is made easier.CV styles and templates can be easily shared.cvascode enforces a basic yet flexible data schema in an effort to allow interoperability between templates.Installcvascode can be installed via pippip install cvascode
Package: cvat-cli
Command-line client for CVATA simple command line interface for working with CVAT tasks. At the moment it
implements a basic feature set but may serve as the starting point for a more
comprehensive CVAT administration tool in the future.Overview of functionality:Create a new task (supports name, bug tracker, project, labels JSON, local/share/remote files)Delete tasks (supports deleting a list of task IDs)List all tasks (supports basic CSV or JSON output)Download JPEG frames (supports a list of frame IDs)Dump annotations (supports all formats via format string)Upload annotations for a task in the specified format (e.g. 'YOLO ZIP 1.0')Export and download a whole taskImport a taskInstallationpip install cvat-cliUsage$cvat-cli--help

usage:cvat-cli[-h][--version][--authUSER:[PASS]][--server-hostSERVER_HOST][--server-portSERVER_PORT][--debug]{create,delete,ls,frames,dump,upload,export,import}...

PerformcommonoperationsrelatedtoCVATtasks.

positionalarguments:{create,delete,ls,frames,dump,upload,export,import}optionalarguments:-h,--helpshowthishelpmessageandexit--versionshowprogram'sversionnumberandexit--authUSER:[PASS]defaultstothecurrentuserandsupportsthePASSenvironmentvariableorpasswordprompt(default:currentuser)--server-hostSERVER_HOSThost(default:localhost)--server-portSERVER_PORTport(default:8080)--debugshowdebugoutputExamplesCreate a task with local images:cvat-cli--authusercreate--labels'[{"name": "car"}, {"name": "person"}]'"test_task""local""image1.jpg""image2.jpg"List tasks on a custom server with auth:cvat-cli--authadmin:password\--server-hostcvat.my.server.com--server-port30123\ls
Package: cvat-connector
CVAT API Client LibraryThis is a client library to interact with CVAT Server.Not everything is implemented at the moment.UsageCreate a new client instance with CVAT Server URLfromcvat_connectorimportCVATConnectorcvat_client=CVATConnector("https://cvat.mydomain.com")Login to with your credentialscvat_client.login("myuser","passw0rd")Fetch users etc.users=cvat_client.get_all_users()forusername,user_detailsinusers.items():print(f"{username}id is{user_details['id']}")Logout when you are done.cvat_client.logut()
Package: cvat-data-flow
CVAT DATA FLOWNewAdd support for export in YOLOv8 segmentation and detection formats (for segmentationdataset_format = "yolo_seg")Add support for installation via pipAdd support for downloading multiple tasks from different projectsOverviewThis utility facilitates the download of datasets fromCVAT, preparing them for training and testing purposes. Key features include:Downloading datasets from CVAT in any supported format.Merging multiple tasks to form a consolidated dataset.Randomly segmenting the dataset into training, validation, and testing subsets.Local InstallationClone the repository:gitclonehttps://github.com/ai-iaguzhinskii/cvat_data_flow.gitInstall the dependencies:pip3install-rrequirements.txtConfigurationEdit the configuration as per your requirements in theconfig_file:[CVAT]URL=# URL of the CVAT server, e.g., http://localhost:8080LOGIN=# CVAT user login, e.g., adminPASS=# CVAT user password, e.g., admin[DOWNLOAD]TASKS_IDS=# Task IDs for downloading, e.g., [111, 222, 333]PROJECTS_IDS=# Project IDs for downloading, e.g., [111, 222, 333][DATASET]FORMAT=# Desired dataset format. Refer to CVAT documentation for options, e.g., coco# For YOLOv8 segmentation and detection formats use "yolo_seg" and "yolo_det" respectivelySAVE_PATH=# Directory to save the downloaded datasets, e.g., /home/user/datasetsSPLIT=# Define random splits for the dataset, e.g., {"train": 0.8, "val": 0.1, "test": 0.1}[OPTIONS]ONLY_BUILD_DATASET=# Toggle to build dataset only if tasks are previously downloaded, e.g., TrueLABELS_MAPPING=# Define label mappings, e.g., {"car": "vehicle", "person": "pedestrian"}DEBUG=# Toggle debug mode, e.g., TrueUsageTo run the program:python3cvat_data_flow/main.pyNote: Ensure to replace placeholders in the configuration with actual values before executing.Installation via PIPThe utility can be installed via pip:pip3installcvat-data-flowUsage as a Python PackageThe utility can also be used as a Python package. Here's an example:fromcvat_data_flowimportCVATDataFlowcvat_data_flow=CVATDataFlow(url='http://cvat.example.com',login='username',password='password',save_path='/path/to/save/dataset',projects_ids=[1,2,3],only_build_dataset=False,dataset_format='coco',split=[('train',0.7),('val',0.2),('test',0.1)],labels_mapping={'person':'person','car':'vehicle'})cvat_data_flow.download_data()cvat_data_flow.build_dataset()LicenseThis project is licensed under the MIT License - see theLICENSEfile for details.
Package: cvat-manifest-builder
cvat-manifest-builderInstallation & Use# Install cvat-manifest-builder>pipinstallcvat-manifest-builder

>cvat-manifest-builder--help
usage:cvat-manifest-builder[-h]--output_manifest_fileOUTPUT_MANIFEST_FILE--input_data_pathINPUT_DATA_PATH

BuildsaCVATmanifestfilefromadirectoryofimages.

optionalarguments:-h,--helpshowthishelpmessageandexit--output_manifest_fileOUTPUT_MANIFEST_FILEPathtotheoutputmanifestfile.--input_data_pathINPUT_DATA_PATHPathtothedatadirectory.
Package: cvat-reader
cvat_readerPackage to read cvat training set zip file into numpy array image and annotations.The cvat format is usefull because it contains the original video file. The original video file has two main advantage over image files:The original video file is much better compressed than a bunch of image files.The image files are re-compressed versions of the video file and therefore lower in qualityInstallpipinstallcvat_readerExampleimportcv2fromcvat_readerimportopen_cvatwithopen_cvat("training.zip")asdataset:print(dataset.labels)labels={}forlabelindataset.labels:h=label['color'].lstrip('#')labels[label['name']]=tuple(int(h[i:i+2],16)foriin(0,2,4))forframeindataset:ifframe.annotations:img=frame.image.copy()forlabelindataset.labels:forannotationinframe.annotations:color=labels[annotation.label](x1,y1),(x2,y2)=annotation.bounding_boxcv2.rectangle(img,(x1,y1),(x2,y2),color)cv2.imshow('image',img)cv2.waitKey(0)By default the video is loaded and all image data is put in theframe.imageattribute. When you are only interested in the data, or have an other way to process the video you can passload_video=Falsetoopen_cvatand the images are not loaded. When you passload_video=Falsethis library does not depend on cv2 or numpy.fromcvat_readerimportopen_cvatdefprocess_annotations(frame_id,annotations):...withopen_cvat("training.zip",load_video=False)asdataset:print(dataset.labels)forframeindataset:""">>> frame.imageNone"""ifframe.annotations:process_annotations(frame.frame_id,frame.annotations)Supportcvat_readercurrently supports the following types of annotations:BoundingBoxMedia types supported:all types cv2 supportsChangelog0.3.1 (2021-12-03)Bugfix:Fix typing0.3.0 (2021-12-03)Feature:Addoccluded,outsideandattributestoAnnotation. WhenAnnotationis interpolated theoccluded,outsideandattributesfields are copied from thefirstnon-interpolated annotation.0.2.1 (2021-11-04)Bugfix:Include last frameIncludevideo_fileinDataset0.2.0 (2021-11-04)Feature:Addload_videoflag toopen_cvatto specify if video should be loaded too. This removes the dependecy on cv2/numpy when you don't need the video, or use another tool for processing.0.1.2 (2021-10-26)Bugfix:Stop iteration when last frame is reached0.1.1 (2021-10-25)Bugfix:data directory sometimes contains non-video files. Those files should not be picked as video files. This bugfix solves this by verifying if cv2 can load the file.0.1.0 (2021-10-22)Feature:Properly read tracks and interpolate
Package: cvat-sdk
SDK forComputer Vision Annotation Tool (CVAT)This package provides a Python client library for CVAT server. It can be useful for
workflow automation and writing custom CVAT server clients.The SDK API includes several layers:Server API wrappers (ApiClient). Located in atcvat_sdk.api_client.High-level tools (Core). Located atcvat_sdk.core.PyTorch adapter. Located atcvat_sdk.pytorch.Auto-annotation support. Located atcvat_sdk.auto_annotation.Package documentation is availablehere.Installation & UsageTo install a prebuilt package, run the following command in the terminal:pipinstallcvat-sdkTo use the PyTorch adapter, request thepytorchextra:pipinstall"cvat-sdk[pytorch]"To install from the local directory, followthe developer guide.After installation you can import the package:importcvat_sdk
Package: cvault
Credential Vault (cvault) is a place where you can save your memory about credentials, e.g. account and password, along with some helpful description.InstallationTo install dependencies and the cvault program.$pythonsetup.pyinstallThen initialize the vault (database).$cvaultinit</path/to/vault>UsageThere are two modes in cvault:interactive mode: cvault will open up a dialog, and you can interact with itnon-interactive mode: saves entry with one shot, no more dialogInteractive Mode$cvaultAnd follow the instructions to achieve the goal.Non-interactive Mode$cvaultsave<account><password><description># save a new entry$cvaultremove<id># remove certain entry$cvaultlist[-v]# list all the entries reside in the vault$cvaultshow<id># show the exact entry
Package: cvbase
# Introduction[![PyPI Version](https://img.shields.io/pypi/v/cvbase.svg)](https://pypi.python.org/pypi/cvbase)[![Python Version](https://img.shields.io/pypi/pyversions/cvbase.svg)]()[![Build Status](https://travis-ci.org/hellock/cvbase.svg?branch=master)](https://travis-ci.org/hellock/cvbase)[![Coverage Status](https://codecov.io/gh/hellock/cvbase/branch/master/graph/badge.svg)](https://codecov.io/gh/hellock/cvbase)`cvbase` is a miscellaneous set of tools which maybe helpful for computer vision research.It comprises the following parts.- IO helpers- Image/Video operations- OpenCV wrappers for python2/3 and opencv 2/3- Timer- Progress visualization- Plotting tools- Object detection utilsTry and start with```shellpip install cvbase```See [documentation](http://cvbase.readthedocs.io/en/latest) for more features and usage.## Some popular featuresThere are some popular features such as progress visualization, timer, video to frames/frames to videos.- Progress visualizationIf you want to apply a method to a list of items and track the progress, `track_progress`is a good choice. It will display a progress bar to tell the progress and ETA.```pythonimport cvbase as cvbdef func(item):# do somethingpasstasks = [item_1, item_2, ..., item_n]cvb.track_progress(func, tasks)```The output is like the following.![progress](docs/_static/progress.gif)There is another method `track_parallel_progress`, which wraps multiprocessing andprogress visualization.```pythonimport cvbase as cvbdef func(item):# do somethingpasstasks = [item_1, item_2, ..., item_n]cvb.track_parallel_progress(func, tasks, 8)# 8 workers```- TimerIt is convinient to computer the runtime of a code block with `Timer`.```pythonimport timewith cvb.Timer():# simulate some code blocktime.sleep(1)```Or try a more flexible way.```pythontimer = cvb.Timer()# code block 1 hereprint(timer.since_start())# code block 2 hereprint(timer.since_last_check())print(timer.since_start())```- Video/Frames conversionTo split a video into frames.```pythonvideo = cvb.VideoReader('video_file.mp4')video.cvt2frames('frame_dir')```Besides `cvt2frames`, `VideoReader` wraps many other useful methods to operate a video like a list object, like```video = cvb.VideoReader('video_file.mp4')len(video)  # get total frame numbervideo[5]  # get the 6th framefor img in video:  # iterate over all framesprint(img.shape)```To generate a video from frames, use the `frames2video` method.```pythonvideo = cvb.frames2video('frame_dir', 'out_video_file.avi', fps=30)```- Video editing (needs ffmpeg)To cut a video.```pythoncvb.cut_video('input.mp4', 'output.mp4', start=3, end=10)```To join two video clips.```pythoncvb.concat_video(['clip1.mp4', 'clip2.mp4'], 'output.mp4')```To resize a video.```pythoncvb.resize_video('input.mp4', 'resized.mp4', (360, 240))# orcvb.resize_video('input.mp4', 'resized.mp4', ratio=2)```To convert the format of a video.```pythoncvb.convert_video('input.avi', 'output.mp4', vcodec='h264')```
Package: cv-basic-utils
CV BASIC UTILSA package for reusing functions that repeat during computer vision and machine learning worksInstall from Pypipip install cv_basic_utilsLocal installgit clone https://github.com/jerinka/cv_basic_utilspip3 install -e cv_basic_utilsTest and Coveragecoverage run --source=cv_basic_utils/ -m pytest -v test/ && coverage report -mcoverage html -d coverage_htmlbuildpip install wheelpython setup.py sdist bdist_wheeltestpypipip install twinetwine upload --repository testpypi dist/*pip install -i https://test.pypi.org/simple/ cv_basic_utilspypitwine upload dist/*pip install -U cv_basic_utilsQuick usageimport cv_basic_utils as pk1pk1.subpackage1.moduleA.fun_a()Referencehttps://medium.com/@joel.barmettler/how-to-upload-your-python-package-to-pypi-65edc5fe9c56
Package: cvbinarycanceraiopslibs
IntroductionTODO: Give a short introduction of your project. Let this section explain the objectives or the motivation behind this project.Getting StartedTODO: Guide users through getting your code up and running on their own system. In this section you can talk about:Installation processSoftware dependenciesLatest releasesAPI referencesBuild and TestTODO: Describe and show how to build your code and run the tests.ContributeTODO: Explain how other users and developers can contribute to make your code better.If you want to learn more about creating good readme files then refer the followingguidelines. You can also seek inspiration from the below readme files:ASP.NET CoreVisual Studio CodeChakra Core