'User Warning: Your Generator Is Empty' Fast.ai - generator

Working on a project using fast.ai and ImageNet. I am using Google Colab, and have a folder of images. The goal is to determine which images contain rubber plants. The folder has 8 images, and I am trying to see how well the model will work with a small number of images. I am having trouble though because my code is saying my generator is empty. Any help would be great! I attached an image of my code and the error.
enter image description here

The dataset you have is too small (too few images), maybe add more training images or use smaller batch size.

Related

Is it possible to pull an image URL from Google Images to Sheets?

I am building a simple web app for a teacher at my school that includes a word, a translation, and an image. The data will be used to generate the web app layout.
Col B already uses a formula =GOOGLETRANSLATE(A2,"en","ko") to generate the translation. Is it possible to do something like this to get the URL for an image based on a word? For example, get the URL for an image of "bread" in cell C2. This means all the teacher will need to do is add the English word and the translation and image will be added automatically.
I tried things like =("https://www.google.com/search?q="&A2&"&tbm=isch") in C2, but this gives me a search page. Is there either:
A way to pull the first image off Google Images?
OR
Another site that provides images based on a simplified URL? For example, a site where I could enter "www.madeupsite.com/bread" and get an image of bread?
TIA
I don't think this function exists as of now. I think a good idea if you are trying the alternative is to make an HTML repl on REPL.IT - there you can upload images and the file path will be made for you. For example: https://replname.replusername.repl.co/folder/word.jpg
Hope this helps

Why isn't my HTML page loading completely?

I recently started my first HTML project with the help of Youtube. I'm a beginner and only saw the basics of Javascript in college.
Just finished writing my HTML project and wanted to upload it for free using Google Drive and drv.tw.
The only problem is that certain images and icons do not load (irregularly) enter image description hereand/or the pages on the navigation bar take too long to switch.
My question would be, is it because of the free domain or did I do something wrong in HTML?
When I open the HTML file in Safari everything works fine.
Since I'm new to the community, I don't know exactly what and how much I have to upload to get help. So have mercy on me :'D.
To help troubleshoot, use your browsers "developer" (F12) mode. Look at the Network view to see why the images aren't displayed. For example: It might be "not found", "not authorized", or other reasons.
From your comment, it would appear that at times the page is rendering before the images are available to display or something else is limiting image files from being presented at all.
Once we know why the browser can't display the images, then the cause can be addressed.
Post the .html .js and .css code
Please update your question and show the folder structure. It should look something like:
-site-
|
-js
-css
-images
Copy and paste in the code below the folder structure and list the images and their size.
I am not familiar with google drive's capabilities.
It is important to use a web host. There are plenty of free or low cost sites available, so I won't go into it.

How to pull image from web using its source

I've just started learning how to code starting with HTML. I'm using Codepen and when I add any image it refuses to populate. I can see on the page where it shows my alt text and the image load fail icon, so I'm confident I've coded it correctly. Can you not just pull any image off the web using it's source? Is there some library of widely available images that I can use? Just a little confused.
In response to your doubts
Can you not just pull any image off the web using it's source?
If it is possible to locate images directly from the internet, but you have to be careful to have the consent for the use of it
Is there some library of widely available images that I can use?
There are several portals where to locate images of different categories, some images are paid, others are free, to mention one you have pexels.com,
Next I leave you an example of the code looking for an image in this portal
<img
src = "https://images.pexels.com/photos/374631/pexels-photo-374631.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500"
alt = "Image"
width = '250px'
>
I hope I have been able to help you
Best regards

Get a scaled image from drive.google.com/uc

An answer to a quesiton over here has worked perfectly for me to allow anonymous users to view pictures from my google drive.
The instructions are to form a url as so:
https://drive.google.com/uc?export=download&id={fileId}
Where fileId is the identifier of a publicly viewable file in one's google drive.
This works great! However the images I've uploaded are very large (megabytes). I'd like to get a link to lower resolution images so that users aren't downloading several megabytes upon loading pages I display these images on.
I've tried tacking on GET parameters "w" "width" "h" and "height", and using a little sizing trick I've seen elsewhere in google's interface. Nothing has worked thus far.
https://drive.google.com/uc?export=download&id={fileId}=w{widthpx}-h{heightpx}
I haven't been able to find google documentation for this endpoint nor any help for getting lower resolutions images by googling and searching stackoverflow.
Is there a way to specify resolution to this endpoint (or another that works for obtaining displayable images), or must I upload separate lower-res images for each image I upload?
I'm using the API as a solution for now. If anyone finds another solution I'd love to hear it.
https://github.com/joshterrell805/gDriveScaledImages

Fetch image from non direct HTML link

We have a couple SSIS jobs which nicely fetch images and various expected graphics on websites. Can't figure out how to fetch an image from the following site (sample).
http://tess2.uspto.gov/ImageAgent/ImageAgentProxy?getImage=77666637
Any thoughts on SSIS techniques? I'm hoping I don't have to do a screenscrape or something like that...
You can use the Script Task to fetch the image. The following article gives you a sample code that you can adjust to save an image file instead of text file.
Here is the link : http://www.sqlis.com/sqlis/post/Downloading-a-file-over-HTTP-the-SSIS-way.aspx