Generate photo resemples with friends using diffusion model - machine-learning

I have about 1000 photos of my friends.
And I am studing diffusion model(actually I didn't understand perfectly except DDPM).
So I want to bring pretrained Diffusion model and generate new pictures of my friends using own photos.
How can I do that?
Can you give me some ideas or address of github?
I will really appreciate if you consider I am just beginner about ML.
Thank you.
I'm studing DDPM code now.

Related

Too much data to label

I’m working on a personal Data Science project where I try to flag bots on Instagram. I already collected public data about 80k users, labelled ~4k users and managed to get 3k more thanks to similarities (e.g. same comment, same profile pic, same scammy website in bio, etc.). This last step got me more bots but also changed the distribution of the bot/legit user in the labelled dataset.
I heard about semi-supervised learning but I’m still very new in Data Science as this is my first ML project, I don’t feel super confident about using it.
What are my different options? Can I balance the labelled data and stop labelling after a point? Should I label everything? What would you advise me?

Making a model for Nauto hand sign detection

I wanted to make a naruto hand sign detection model to later use it in a AR game and I tried implementing it in fastai using resnet50 after getting crowdsourcing the data( mostly me). But, I got a model predicting only one category for everything.
This is the kaggle link:
https://www.kaggle.com/vikranthkanumuru/naruto-hand-sign-detection-usin-fastai-diff-method
Not sure if this is a problem, but earlier I had around 28 images per group so I made a video of myself doing the various signs and used opencv to save frame by frame. I later removed the ones that did not confine to any group and this increased the size of the dataset from 220mb to 2GB. Was this proper or is it the reason the model is bad?
This is the link to the dataset
https://www.kaggle.com/vikranthkanumuru/naruto-hand-sign-dataset
I am not sure how to proceed further and would appreciate any help. Thank you very much.
Edit: If anyone is interested in the completed thing, here's the link: https://www.linkedin.com/feed/update/urn:li:activity:6640529067936440320/
I have fixed a bit of your code. Have a look. I did not run it for the whole stretch though but it should show you what you need.
The test set only contained those images but take a look at the validation.
Also switch to vgg16. resnet50 is not necessary here.
https://www.kaggle.com/subhaditya/naruto-hand-sign-detection-using-fastai?scriptVersionId=29471636

How to reduce a Core ML Model for an iOS app?

I have a model that's almost 500mb that a client wants to implement into their iOS app. HOW IN THE WORLD is a model like this implemented, with it being the size it is? It seems to be a fairly popular model, but there is no documentation or posts anywhere of people actually using the model in a mobile app. Is there such thing as hosting the model somewhere and pointing the client to the server hosting the model? Any options to compress the model? Would love to hear what you've done to solve this issue.
The model is found here: https://coreml.store/cnnemotions
People doing academic research on deep learning / computer vision often use VGG16 or VGG19 as their base model because it's simple and works well. Unfortunately it also has over 100 million parameters, making it unsuitable for use on mobile.
The solution here is to re-architect the model using a smaller feature extractor such as MobileNet or SqueezeNet, and train it again. Now you'll end up with a model that is much smaller, between 10 and 20 MB.
This does mean you can't just grab models off of the Internet and convert them to Core ML and expect them to work well. It requires a bit more work than that!

Does google prediction api work for image recogniton

I read the official documentation for the api, but I wanted to make sure that it's possible for it to perform object recognition in images. More specifically, my idea is to provide a lot of images of parking lots with the number of parking spots currently available. I wanna get a model to predict how many spots are available given an image of the parking lot.
Does anybody have previous experience with using the API for a similar goal?
No i don't think google prediction api will works for image recognition.
because prediction api knows only numeric and string.
for image recognition Google Vision Api is the best , i think it cant able to recognize humans or persons but it is recognize place like eiffel tower and all.
even it can able to read the image written strings.

iPhoto face recognition algorithm

I'm writing a project in which we need to be able to recognize faces using OpenCV. I'm training my base on photos, then give test photos to the program with people, which we attended. Recognition works good (80-90%). But! If I give the program a photo with person, which we didn't use in the teaching of our base, the program finds a man in our base with the terrible low distance. At the same time, Apple iPhoto works good with all photos. Can anyone know what algorithm they used to recognize faces ? or had my problem? Help please.
P.S. Tested algorithms: LBPHFaceRecognizer, FisherFaceRecognizer, EigenFaceRecognizer.
You mention iPhoto so I'm going to assume you're using OS X or iOS. If so, you may want to try Apple's built-in face detection.

Resources