is there a fast way to find that the uploaded image is similar to an image that exists in a specific folder that contains thousand images?

from cv2 import cv2
import numpy as np
import os
import io
import flask
from flask import Flask,request, jsonify

app = flask.Flask(__name__)
app.config(“DEBUG”) = True
path = ‘images’

@app.route(‘/check’, methods=(‘POST’))
def api_id():
f = request.files(‘imagefile’).read()
npimg = np.frombuffer(f,np.uint8)
captured = cv2.imdecode(npimg,cv2.IMREAD_COLOR)
myList = os.listdir(path)
print(‘Total Classes Detected’, len(myList))
for cl in myList:
image_to_compare = cv2.imread(f'{path}/{cl}’,0)

# Initiate BRISK descriptor
BRISK = cv2.BRISK_create()

# Find the keypoints and compute the descriptors for input and training-set image
keypoints1, descriptors1 = BRISK.detectAndCompute(image_to_compare, None)
keypoints2, descriptors2 = BRISK.detectAndCompute(captured, None)

# create BFMatcher object
BFMatcher = cv2.BFMatcher(normType = cv2.NORM_HAMMING,
crossCheck = True)

# Matching descriptor vectors using Brute Force Matcher
matches = BFMatcher.match(queryDescriptors = descriptors1,
trainDescriptors = descriptors2)

# Sort them in the order of their distance
matches = sorted(matches, key = lambda x: x.distance)

number_keypoints = 0
if len(keypoints1) = 50 :
r1 = {“ID”: os.path.splitext(cl)(0) ,”SIMILAR”:”true” }
return jsonify(r1)

r2 = {“SIMILAR”: “false”}
return jsonify(r2)

posts – Alt text attributes not showing over portfolio images

I´ve been searching almost all posts regarding this issue but haven´t found a solution for my theme. Maybe there´s a kind expert mind that can support me. I´m using a theme that doesn´t allow updates nor support. It´s a grid-based minimal design. As I´m a motion designer would like that when the viewer hover´s the cursor over the images on the page the information text displays as it used to, now it doesn´t happen anymore and I´m a bit frustrated as need showing my work to potential clients.

This is my website not sure if I should share anything else to get some advice?

thank you in advance for any help

plugins – How to disallow contributors to delete their uploaded images?

I allowed contributors to upload images via the following code:

if ( current_user_can('contributor') && !current_user_can('upload_files') )
    add_action('admin_init', 'allow_contributor_uploads');
function allow_contributor_uploads() {
    $contributor = get_role('contributor');

Now I need to disallow them to delete the images they uploaded. Is there an easy way to do it? I know of User Role Editor plugin but I don’t want to install it just for this one thing.

css – Custom hero images for wordpress

How I can add custom hero images to my wordpress site.
I have WPBakery plugin. Website is done and it uses old revolution slider 5 and I cant make similar hero slide like I needed.

My css and html code look like this:

.wrapper {
  height: 100vh;
  display: flex;

.wrapper section {
  flex: 1;
  display: flex;

.wrapper section .button {
  margin: auto;
  padding: 10px 15px;
  background: #000;
  color: #fff;

.wrapper section:first-child {
  background: url( center/cover;

.wrapper section:last-child {
  margin-left: -10vw;
  clip-path: polygon(10vw 0, 100% 0, 100% 100%, 0 100%);
  background: url( center/cover;

body {
  margin: 0;


<main class='wrapper'>
    <a class='button' href='#'>Codepen</a>
    <a class='button' href='#'>Github</a>

You will get Amazon, eBay & e-commerce Photo Editing for $6

You will get Amazon, eBay & e-commerce Photo Editing

have so many experiences in all kinds of e-commerce photo editing, resizing, and retouching.

I do follow e-commerce photo editing guidelines. You will get perfect size images for all kinds of the marketplace.

Your images will be fantastic to view on the e-commerce website.

20 images


password for cloud images?

what is the password for the "ubuntu" and/or "root" user on the cloud images?

i see this has gone unanswered for a while:

i am using the bionic ova in this case:

here is someone using openstack that also needs password:
Default username/password for Ubuntu Cloud image?

ER-Diagram for Users, Images and Likes

I’m looking to create a database (using Django) where:

  • A user uploads photos.
  • A user upvotes/downvotes photos of other users.

I came up with this ER diagram:
enter image description here

My questions are:

  • Is a vote better as an entity or as an attribute of the photo?
  • If a vote should remain an entity, how do I show in its attributes that the primary key of the vote is the combined foreign keys of the user and the photo?

Any constructive comments/recommendations are also welcome.

centos – How can I best get the mpt2 drivers back in to Centos8 [for maas images and openstack ironic/image builder]

I need the mpt2sas drivers to get Centos8 to work with my servers. Thanks to them using the rhel nutered kernel the device id’s have been removed and wont load with out using a dd disk. I have both maas and openstack ironic/image service for openstack. In order to get those drivers back on the images that those 2 systems build/upload as far as I can tell I need either a custom vanilla rpm with the proper drivers or to find a way to get those build systems to pull the dd disk in during build time.

I am not sure which option would be more realistic to accomplish. maas has the ks boot dd option which i was not able to get to work when using packer-maas I haven’t had much experience with packer or ks so it may be something I did wrong.

The other option I had no issues making the kernel but am at a loss on how to build the rpm of it as all the instructions I have found were from the 2.6 kernel era. I was expecting to have to use a local rpm repo to mirror the centos8 repo and make my vanilla kernel be listed as the latest of the kernel series.

Any suggestions on how to make this work would be greatly appreciated.

computer vision – What can help more with matching the features between the left and right images?

I am trying to understand ways that can help with matching the features between the left and right images. I know there are typically a couple of constraints that cause problems for similarity constraints such as occlusion, repetitions (with similar elements), textureless surfaces, Non-Lambertian Surface and etc.

Would the Wide stereo baseline potentially help with this issue? I know the wider the stereo baseline, the more possibility of occlusions occurring, so it does not seem viable. Or would having the appearance of many textures in the image help more with this for better matching?

macos – Batch convert BMP to both TIFF and JPEG, then have the converted images moved into respective folders

I’m trying to modernise a film scanning workflow and need some guidance on how to automate my tasks more efficiently.

So let me first describe the situation and workflow that I need.

The film scanner produces a folder with the actual film scans (.bmp) alongside cache/metadata files that are of no use at all (shown here as .xx and .zz). A sample directory is as follows:

    - 01.xx
    - 02.xx
    - 03.xx
    - 01.zz
    - 02.zz
    - 03.zz
    - 01.bmp
    - 02.bmp
    - 03.bmp

I need the final result to follow this structure:

        - 01.tiff
        - 02.tiff
        - 03.tiff
        - 01.jpg
        - 02.jpg
        - 03.jpg

Essentially the useless metadata files need to be deleted, and the .bmp files need to be converted to both .tiff and .jpeg files in their own subfolders with the Job Number as well.

Ideally I would like to also include LZW compression for the .tiff conversion if possible.

Currently I’m using a combination of manual copy/paste/delete, alongside 2 Automator Applications, 1 each for .jpeg and .tiff conversion. I’m only using a basic Get Specified Finder Items along with Change Type of Images.

It works, but it’s not perfect as lots of manual steps still need to be done. Especially when I have to repeat all the steps for multiple jobs.

The ideal solution would allow me to simply drag 1 or multiple Job folders into an Automator Application and have it do all the image conversion, subfolder creation, and deletion of unnecessary files without any intervention on my end.

However, I can’t seem to find a way to get the other steps done within Automator, and I get quite confused when I look at sample bash scripts that use sips. Many of the solutions I’ve seen online only solve one part of the problem that I’m facing (eg, just the image conversion, or just the folder creation), and I’m having trouble understanding the scripting language properly to combine them all together.

Any help with this would be greatly appreciated.

Thank you