Comments (6)
me too,
How to fix errors?
plsss
from sis.
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
Line 27 in d5c687d
from sis.
thx . It has fixed
from sis.
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.
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.
Thanks
from sis.
Related Issues (20)
- 500 internal server error HOT 3
- Can use face to array in feature_extractor.py? HOT 4
- getting server error while running server.py HOT 1
- May I know which Nearest Neighbor Algo is Used. HOT 2
- Tensorflow version HOT 2
- Getting internal server error while running flask app on default route http://127.0.0.1:5000/ HOT 1
- Tensorflow version issue HOT 2
- i have a problem. HOT 3
- Can I replace VGG16 with MobileNet? HOT 1
- I am getting error while running the project HOT 1
- Server error HOT 1
- using postgres CUBE data extension ? HOT 3
- Hello, when running server.py file, I got:
- Getting 0.0.0.0 refused to connect HOT 1
- Benchmark HOT 1
- Is there a way to run this with Javascript (by converting it or some) ?
- Juui
- Is it possible to replace model or add new img、fearture and use them while server.py running? HOT 1
- Image folder
- Problem in downloading weights
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sis.