Giter Club home page Giter Club logo

Comments (6)

nguyennd42 avatar nguyennd42 commented on June 6, 2024 1

me too,
How to fix errors?
plsss

from sis.

matsui528 avatar matsui528 commented on June 6, 2024

Hi,

It seems the problem is an invalid name of the file in WIndows. Please make sure an uploaded image is correctly saved with the name static/uploaded/2018-03-24T17:14:22.047335_203006213_202149811_225504129_2017_12_28_And_1514462132702-1244746321.jpg I guess a semicolon is prohibited for the filename in Windows.

You can edit this line to some valid name, then it would work

sis/server.py

Line 27 in d5c687d

uploaded_img_path = "static/uploaded/" + datetime.now().isoformat() + "_" + file.filename

from sis.

wzc118 avatar wzc118 commented on June 6, 2024

thx . It has fixed

from sis.

khalid5454 avatar khalid5454 commented on June 6, 2024

I change this line from
uploaded_img_path = "static/uploaded/" + datetime.now().isoformat() + " _" + file.filename
#TO
uploaded_img_path = "static/uploaded/" + " _" + file.filename

#It working
but I am not getting the first two pics, like if I pass 10 value so the first two is missing and 8 are recommended ...

Sometimes it is working like recommend the exact amount of images

#Code--------------------------

img = Image.open(file.stream) # PIL image
uploaded_img_path: Union[str, Any] = "static/uploaded/"+ "_" + file.filename
img.save(uploaded_img_path)

    query = fe.extract(img)
    dists = np.linalg.norm(features - query, axis=1)  # Do search
    ids = np.argsort(dists)[:10]  # Top 10 results
    scores = [(dists[id], img_paths[id]) for id in ids]

##-----------------------------------
WHY I am not getting first two recommended pictures.
##Any Solution
@wzc118 @matsui528

from sis.

matsui528 avatar matsui528 commented on June 6, 2024

I guess it doesn't work if file.filename is same for two images. Please try this:

uploaded_img_path = "static/uploaded/" + datetime.now().strftime('%Y_%m_%d_%H_%M_%S') + "_" + file.filename

from sis.

khalid5454 avatar khalid5454 commented on June 6, 2024

Thanks

from sis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.