Perception-0.8.2


توضیحات

Perception provides flexible, well-documented, and comprehensively tested tooling for perceptual hashing research, development, and production use.
ویژگی مقدار
سیستم عامل -
نام فایل Perception-0.8.2
نام Perception
نسخه کتابخانه 0.8.2
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Thorn
ایمیل نویسنده info@wearethorn.org
آدرس صفحه اصلی -
آدرس اینترنتی https://pypi.org/project/Perception/
مجوز Apache-2.0
# perception ![ci](https://github.com/thorn-oss/perception/workflows/ci/badge.svg) `perception` provides flexible, well-documented, and comprehensively tested tooling for perceptual hashing research, development, and production use. See [the documentation](https://perception.thorn.engineering/en/latest/) for details. ## Background `perception` was initially developed at [Thorn](https://www.thorn.org) as part of our work to eliminate child sexual abuse material from the internet. For more information on the issue, check out [our CEO's TED talk](https://www.thorn.org/blog/time-is-now-eliminate-csam/). ## Getting Started ### Installation `pip install perception` ### Hashing Hashing with different functions is simple with `perception`. ```python from perception import hashers file1, file2 = 'test1.jpg', 'test2.jpg' hasher = hashers.PHash() hash1, hash2 = hasher.compute(file1), hasher.compute(file2) distance = hasher.compute_distance(hash1, hash2) ``` ### Examples See below for end-to-end examples for common use cases for perceptual hashes. - [Detecting child sexual abuse material](https://perception.thorn.engineering/en/latest/examples/detecting_csam.html) - [Deduplicating media](https://perception.thorn.engineering/en/latest/examples/deduplication.html) - [Benchmarking perceptual hashes](https://perception.thorn.engineering/en/latest/examples/benchmarking.html) ## Supported Hashing Algorithms `perception` currently ships with: - pHash (DCT hash) (`perception.hashers.PHash`) - Facebook's PDQ Hash (`perception.hashers.PDQ`) - dHash (difference hash) (`perception.hashers.DHash`) - aHash (average hash) (`perception.hashers.AverageHash`) - Marr-Hildreth (`perception.hashers.MarrHildreth`) - Color Moment (`perception.hashers.ColorMoment`) - Block Mean (`perception.hashers.BlockMean`) - wHash (wavelet hash) (`perception.hashers.WaveletHash`) ## Contributing To work on the project, start by doing the following. ```bash # Install local dependencies for # code completion, etc. make init - To do a (close to) comprehensive check before committing code, you can use `make precommit`. To implement new features, please first file an issue proposing your change for discussion. To report problems, please file an issue with sample code, expected results, actual results, and a complete traceback. ## Alternatives There are other packages worth checking out to see if they meet your needs for perceptual hashing. Here are some examples. - [dedupe](https://github.com/dedupeio/dedupe) - [imagededup](https://idealo.github.io/imagededup/) - [ImageHash](https://github.com/JohannesBuchner/imagehash) - [PhotoHash](https://github.com/bunchesofdonald/photohash) ```


نیازمندی

مقدار نام
- Cython<4,>=3
- numpy<2.0,>=1.26
- opencv-contrib-python-headless<5.0,>=4.10
- pandas
- pdqhash
- Pillow
- pywavelets<2.0.0,>=1.5.0
- tqdm
- validators<1.0,>=0.22
xtr scipy;
xtr matplotlib;
xtr imgaug;
xtr tabulate;
xtr scikit-learn;
xtr ffmpeg-python;
xtr aiohttp;
xtr python-json-logger;
- rich<14.0.0,>=13.7.0
xtr networkit<12,>=11;
xtr faiss-cpu<2.0.0,>=1.8.0.post1;


زبان مورد نیاز

مقدار نام
<4.0,>=3.10 Python


نحوه نصب


نصب پکیج whl Perception-0.8.2:

    pip install Perception-0.8.2.whl


نصب پکیج tar.gz Perception-0.8.2:

    pip install Perception-0.8.2.tar.gz