We’re sorry, but Freepik doesn’t work properly without JavaScript enabled. FAQ Contact

  • Notifications
  • Go back Remove
  • No notifications to show yet You’ll see useful information here soon. Stay tuned!
  • Downloads 0/60 What is this?
  • My collections
  • My subscription

Find out what’s new on Freepik and get notified about the latest content updates and feature releases.

Premium Access

Custom content, media manager.

Grow your brand authentically by sharing brand content with the internet’s creators.

stretch assignments

Grading assignments, online assignments, school assignments, weekly assignments, work assignments, assignments icon, 4,380,277 assignments stock photos & high-res pictures, browse 4,380,277  authentic assignments  stock photos, high-res images, and pictures, or explore additional stretch assignments  or  grading assignments  stock images to find the right photo at the right size and resolution for your project..

businessman and businesswoman smiling looking at phone - assignments stock pictures, royalty-free photos & images

10 Photo Assignments to Inspire and Challenge Your Skills

Liz Masoner is a professional photographer and she shares her tips and techniques on photo editing and how to photograph nature, portraits, and events with film and digital cameras. Liz has over 30 years of experience and she is the author of three books on photography.

The best way to learn photography is to practice, though sometimes you can get stuck in a rut and not know what to shoot. That is why photographers love assignments; they give us a purpose and an idea of what to photograph. 

Why Are Assignments Important?

Self-assignments are key to any photographer's growth. Even professionals with decades of experience will work on personal assignments that they may never get paid for. The goal of any self-assignment is to spur creativity, solve problems, learn new techniques, and challenge yourself.

As you start out in photography, you're probably filled with excitement and ready to shoot anything you can. That being said, sometimes a little direction and guidance are necessary.

Below, you will find ten photography assignments. Each covers a new topic, skill, or concept and they were chosen to help you learn how to see as a photographer. They are meant to be a personal challenge that you can complete at your own pace and with no outside judgment, simply as a means to practice and improve your photography. Hopefully, you will learn something new with each assignment and be able to use that in every photograph you take in the future.

Remember when composing your images to keep in mind the basics: the rule of thirds,  shutter speed , aperture,  depth of field , and  exposure .

Assignment #1: Up Close

This assignment encourages you to get close and personal with your subject. It is an exercise in viewing a common object in a new way and examining its finer details.

  • Choose an object that you see or interact with every day.
  • Focus on a small part of it, get as close as your camera will allow you to focus, and shoot away.
  • Try to capture different angles and unusual lighting to add to the mystery of this tiny world.

From the whiskers of your cat to a fragile Christmas ornament, and even common soap bubbles, there is an entire world that we often overlook because we don't get close enough.

Assignment #2: Motion

Photography is a static medium which means that it doesn't move. Conveying a sense of motion is often crucial to capturing a scene or emotion and it is an essential skill for photographers to practice.

The goal of this exercise is to understand how shutter speeds can be used to convey motion.

  • Choose a subject or series of subjects that will allow you to convey motion in your images.
  • It can be slow motions, like that of a turtle, or fast motion, like a speeding train.
  • Blur it, stop it, or simply suggest that there is motion in the photograph.

Challenge yourself to capture the same motion in different ways. For instance, you might go to a race track and stop the movement of the cars completely in one image, then leave the shutter open and allow them to blur out of the frame in the next. 

Assignment #3: Shadows

Shadows are everywhere and they are vital to photography because this is the art of capturing light. With light comes shadows and when you begin to look at shadows as a photographer, your world will open up.

  • Take a look around for shadows and record them with your camera.
  • You could show the shadow as the total focus of the image. Perhaps the shadow is incidental to the subject.
  • Is the shadow natural or created by flash?

Shadows are integral to creating depth in a two-dimensional medium such as photography. Take some time to seriously explore the "dark side" of the light.

Assignment #4: Water

Water is everywhere in photography and it presents many challenges. There are reflections and movements to work with and in this exercise, you will take a deeper look at water.

  • Find water anywhere: lakes, streams, puddles, even the glass on your kitchen table.
  • Pay attention to reflections and use them to your advantage in the photographs. Use this opportunity to get familiar with a polarizing filter (a very useful tool in your camera kit) so you can accentuate or eliminate reflections.
  • Play with the motion of a stream or the crashing waves. Notice the difference between stopping the flow of water and allowing it to blur to create a real sense of movement.

Be sure to make water the subject and not an accent to the image. Water alone is beautiful and mysterious and your challenge is to explore all of its potential as a subject.

Assignment #5: Leading Lines

A classic assignment in photography schools, 'leading lines ' is a popular and fun subject. The goal of this assignment is to learn how to direct the viewer to your subject using lines.

  • Choose a subject then look around for lines in the scene that you can use to 'lead' the viewer to the subject. 
  • Find an interesting line then determine what the subject of your photograph is.
  • Remember that lines can be man-made or natural. For instance, the yellow line down the middle of the road or a tree branch. Even a person's arm can be a leading line of their face.

Use this assignment as an excuse to take an afternoon photo excursion. Walk downtown or in the woods and look around you for interesting lines that lead the eye to a subject. There is an amazing assortment of lines out there in the world and once you begin to see them, you won't be able to stop. 

Assignment #6: Perspective

How do you normally stand when you shoot? If your answer is straight up like a 5-foot-something human being then this assignment is for you. The perspective assignment challenges you to view the world from an entirely new perspective, which in turn gives the viewer a new look at the ordinary.

  • Take another afternoon or evening for a photo excursion wherever you like.
  • This time, every time you find something to photograph, stop!
  • Ask yourself: How would a squirrel see that tree? How would a robin view that birdbath? How would a snake view that log?
  • Take your photographs from very high or very low angles. Get on your belly or stand on a chair, whatever you have to (safely) do to get the 'right' angle on your subject.

If you pay attention to professional photographs, many of the images that have the WOW factor are photographed from extreme angles. People enjoy these photos because they've never seen an object from that viewpoint. It is new and unique, and you can train yourself to shoot with this in mind.

Assignment #7: Texture

You may have captured a few textural details in the 'Up Close' assignment, but this assignment takes that to the next level. The goal in this one is to study textures and forget about the object itself: the texture becomes the subject. You will also begin to realize how light affects the appearance of texture.

  • Find a few objects that have very detailed textures like trees or rocks, even knit sweaters or woven rugs.
  • Photograph them as close as your lens will allow.
  • Use different angles and capture the same texture as the light changes. Notice how the different lighting directions and camera angles can change how much texture appears.

Textures are all around us and many of the best photographs in the world play up the textural element. This assignment should teach you how to recognize and accentuate those elements in your photos.

Assignment #8: Color Harmony

Color is important to photography because the world is full of color. This exercise requires a bit of study in color theory, which you will then put into practice in your photographs.

Do you remember art class in elementary school? You may have learned that yellow and blue make green, but color theory goes beyond that. There are cool and warm colors, complementary and contrasting colors, neutral colors, and bold colors.

It can get quite complicated, and photographers should have a basic understanding of color so you can use that when composing photographs. You don't have to study color like a painter would but can use tricks used by interior designers to influence your color decisions.

  • Once you have an idea of color theory, take another photo excursion and put what you've learned into practice.
  • Capture photographs with the primary or tertiary colors.
  • Look for complementary colors then contrasting colors to photograph.
  • Try finding a scene to photograph that is filled with neutral colors, then one that uses a bold color to 'pop' from the scene.

This is an advanced lesson, but one that any photographer working with color images will find useful. As you practice working with colors, it will become second nature and you will know how to work with color to change the feel of your images.

Assignment #9: Emotions

Take a photo of a person smiling or scowling, right? Not so. The intent of this assignment is to convey emotion in photographs  without  a face.

  • Take photographs that express each of the basic emotions: happy, sad, and mad.
  • How would you express the feeling of anger with no person? What about happiness? Sadness?

This is a purely conceptual assignment, but it is important to be able to relay emotion in your photographs and you might not always have a person available to do that with. Challenge yourself to think deeper about this one.

Assignment #10: Don't Look!

Are you ready to put your photography skills to the test? In today's world of digital cameras and the ability to see image captures right there on the LCD screen, photographers are losing some of the skills needed to visualize a photograph.

In this assignment, your challenge is to shoot as if you were using a film camera. That means that you will not look at the photographs you've taken until they are downloaded on your computer. Instead of relying on the camera's screen to see if you 'got the shot' you will rely on your instinct and knowledge, just like photographers did before digital photography. Can you do it?

  • Plan a photo excursion to a particular location and permit yourself to photograph only 36 images (a roll of 35mm film).
  • Turn off your camera's LCD screen so it does not show you the image after you have taken it.
  • If you cannot turn off the camera's screen, cut a piece of thick paper and tape it over the screen. Use masking or painter's tape so you don't leave a residue on the back of your camera.
  • Go out and shoot your 36 frames, thinking carefully about each image because you don't have an endless number of shots. Bonus points if you turn your camera to completely manual settings for focus and exposure.
  • Don't peek at your photos until you get home and download them.

How did you do? Were you able to get good exposures on your own? How did it feel to be 'blind' and not know how your image turned out right away? 

This is similar to what it is like to shoot with film and it does require you to think harder about every image you take. Next time you shoot, slow down and pay attention, pretend that the screen is not there and rely on your own skills to create a great image. You will be a better photographer in the end.

Hauntingly beautiful photos of Japan’s icy and fragile otherworlds

pics of assignment

Photographer James Whitlow Delano has long been a resident of Japan. His work often revolves around climate issues. His work has taken him around the world, but the images here hail from his adopted homeland.

Delano traveled to Japan’s Mount Zao, where he documented the haunting visages of what the Japanese call, “juhyo,” which translates to “ice trees.”

From mid-January to early March, conditions are created by the weather to form these unique looking trees, including icy west or northwest gales and dumping 6 to 9 feet of snow. According to Delano, temperatures can plummet to 5 to 14 degrees Fahrenheit.

Delano told In Sight:

“For much of winter, an icy cloud, driven by the gales, envelops Zao’s volcanic summit, plastering the stands of Maries’ fir (Abies mariesii) in cocoons of rime ice, that grow thicker and thicker. … The time window where the conditions come together to form ‘juhyo’ is narrowing, because average temperatures in Japan have risen more than 1.3 C (2.34F) in the past century.”

Along with climbing temperatures, the trees on the summit of Mount Zao are also facing beetle infestations, killing the trees.

But all hope is not lost. Delano says:

“Still, there is hope on this sky island. Forestry Agency experts have initiated a revival project where seedlings are collected in the autumn and germinated in spring, to be transplanted on the upper slopes of Zao. The saplings will be covered with bamboo leaves to protect them from deer and rodents until they are no longer appetizing to these foragers.”

Another phenomenon takes place along Hokkaido’s Sea of Okhotsk coast. In Japanese, this phenomenon is referred to as “ryuhyo,” masses of drifting sea ice.

Delano tells In Sight:

“Freshwater from the Amur and other Siberian rivers empty into the Sea of Okhotsk mixing with the surface water, making it less saline, allowing the waters to freeze at a higher temperature. This wind-driven pack ice is pushed by cold, Siberian winds from the northwest, herding them south until this huge mass of floating ice crashes into Hokkaido’s northern coast.”

As with the “juhyo,” rising temperatures are threatening the very existence of this natural phenomenon. According to Delano, “The waters of the Sea of Okhotsk have risen 3C (5.4F) above preindustrial times, one of the greatest temperature increases in the world. That means less drift ice and fewer nutrients for the marine environment. ”

Salmon catches have dropped drastically as well.

Delano leaves us with this thought about the two phenomenon: “‘Juhyo’ and ‘ryuhyo’ are two canaries in the global coal mine, warning about an intensifying climate crisis.

“For the visitor, standing in the presence of these otherworldly manifestations of cold, wind and water transports the mind to a place of wonder, beholding something far greater than oneself and yet, for all their power to awe, ‘juhyo’ and ‘ryuhyo’ represent the fragile balance being lost, that nurtured the rise, and flourishing, of our species.”

pics of assignment

pics of assignment

Select Region or Brand

  • Charleston, SC
  • Columbia, SC
  • Greenville, SC
  • Pennsylvania
  • Lehigh Valley, PA
  • Long Island, NY
  • Mecklenburg, NC
  • New Orleans, LA
  • Oklahoma City, OK
  • Rochester, NY
  • South Carolina
  • Color Magazine
  • Massachusetts
  • North Carolina
  • Rhode Island
  • Milwaukee, WI
  • Designers Today
  • Furniture Today
  • Gifts & Decorative Accessories
  • Home Accents Today
  • Home Furnishings News
  • Home Textiles Today
  • Manage Your Print or Online Subscription
  • Manage Your Email Subscriptions

Upcoming Event

NJBIZ Leaders in Finance 2024

  • Power List Methodology
  • Submit a Recommendation
  • 2024 NJBIZ Power 100
  • 2024 Health Care Power 50
  • 2023 Accounting Power 50
  • 2023 Law Power 50
  • 2023 Education Power 50
  • 2023 Commercial Real Estate Power 50
  • Add My Business
  • Contact Leads & Data Center
  • About Leads & Data Center

NJBIZ Conversations

  • Photo Galleries
  • Advertising & Marketing Tips
  • Free Growth Guide
  • Editorial and Special Products Calendar
  • Special Sections
  • Digital Edition
  • Food & Hospitality
  • Health Care
  • Manufacturing
  • Real Estate
  • Sports & Entertainment
  • Transportation
  • Reader Rankings
  • This Week’s Issue
  • Digital Editions
  • Movers & Shakers
  • Advertise With NJBIZ
  • Event Sponsorship
  • Leads & Data
  • 2023 NJBIZ Power 100

Monmouth County Courthouse makes dedication to late assignment judge (PHOTOS)

Lisa Thornton was the first Black woman to hold the position in NJ

Kimberly Redmond // March 25, 2024 //

A recently renovated entranceway at Monmouth County Courthouse in Freehold has been renamed in memory of late Assignment Judge Lisa Thornton.

A recently renovated entranceway at Monmouth County Courthouse in Freehold has been renamed in memory of late Assignment Judge Lisa Thornton. - PROVIDED BY MONMOUTH COUNTY GOVERNMENT

pics of assignment

Lowenstein Sandler names new chief operating officer

Michael Caplan joins the Newark law firm following a decade as COO of Goodwin Procter.

March 27, 2024

Located in West Orange, the new PEM Law LLP firm is led by well-known industry leaders Rajiv Parikh, Kathleen Barnett Einhorn and Charles Messina.

8 partners leave Genova Burns, launch boutique law firm

The latest in a string of exits from the Newark office marks the exit of well-known industry leaders Rajiv Par[...]

March 26, 2024

Apple debuted the iPhone 15 Pro and iPhone 15 Pro Max in September 2023.

New Jersey joins Apple antitrust suit

Filed in the U.S. District Court for the District of New Jersey, the complaint alleges the company is monopoli[...]

March 22, 2024

AI and the law

Hoagland Longo launches artificial intelligence practice group

The New Brunswick-based law firm's AI unit will provide businesses and employers of all sizes strategic guidan[...]

March 20, 2024

Gavel

Newly confirmed judges bring NJ vacancies below 40

In recent history, the state has, on average, posted more than 60 judicial openings, as a result, triggering t[...]

March 19, 2024

New Jersey State House in Trenton

NJ lobbying spend tops $96M in 2023 (updated)

Last year was just the fifth time spending has topped $95 million, according to the New Jersey Election Law En[...]

March 13, 2024

NJBIZ Daily Newsletter

Sign up for your daily digest of New Jersey News.

  • By signing up you agree to our
  • Privacy Policy

Latest Headlines

New Jersey Chamber of Commerce’s annual ReNew Jersey Business Summit and Expo brings together a who’s who of top Garden State business and governmental leaders – along with an expo of New Jersey products and services, ample networking opportunities, and much more.

NJCC ReNew Jersey Summit’s busy first day

The annual event opened with the CEO of Jersey Mike's, a fireside chat with Johnson & Johnson's leader and a keynote address [...]

Gov. Phil Murphy takes the stage for his keynote speech during the New Jersey Chamber of Commerce's ReNew Jersey Business Summit and Expo on March 26 at Harrah’s Atlantic City.

Murphy hitting the road for California AI, film production mission

The governor also announced plans for a film studio in Atlantic City during his address at the ReNew Jersey Summit.

The North Jersey Orthopaedic Specialists PA team has joined the Holy Name network. The specialists include (from left) Dr. John Ownes, Dr. Teja Karukonda, Dr. Reham Shamim, David Penn, physician assistant; Dr. Jen Lee, Dr. Nicholas Bevilacqua, Dr. Jonathan Archer and Dr. Jake Zarah.

Bergen County orthopedic specialists join Holy Name

The new team covers general surgery in the field; shoulder, hip, knee surgery and sports medicine; as well as spine, hand/upp[...]

Genmab was looking to have Gensler create a sense of transparency and connectivity between the lab and workplace.

Colliers arranges Genmab’s 135K-square-foot Princeton expansion

The growing footprint follows the awarding of up to $8.4 million in Emerge Program tax credits for the biotechnology company.

Lowenstein Sandler has named Michael Caplan as chief operating officer.

NJBIZ Conversations: Winter4Kids CEO Schone Malliet

The organization's founder talks about why it's so important, how he keeps it running and his plans for t[...]

Lawyers

Introducing the 2024 NJBIZ Leaders in Law honorees

Ed Guttenplan is the co-founder of East Brunswick-based accounting firm WilkinGuttenplan.

NJBIZ unveils 2024 Leaders in Finance Lifetime Achievement honoree

Financial professionals

NJBIZ unveils 2024 Leaders in Finance honorees (updated)

NJBIZ celebrated the 2023 Forty Under 40 awards Sept. 21 at the DoubleTree by Hilton in Somerset. The event marked the return of the in-person ceremony after a three-year virtual turn due to the pandemic.

NJBIZ introduces new honors for 2024 events

NJBIZ Leaders in Real Estate, Construction and Design 2023

Video Replay: NJBIZ Leaders in Real Estate, Construction and Design 2023

Privacy Overview

  • Images home
  • Editorial home
  • Editorial video
  • Premium collections
  • Entertainment
  • Premium images
  • AI generated images
  • Curated collections
  • Animals/Wildlife
  • Backgrounds/Textures
  • Beauty/Fashion
  • Buildings/Landmarks
  • Business/Finance
  • Celebrities
  • Food and Drink
  • Healthcare/Medical
  • Illustrations/Clip-Art
  • Miscellaneous
  • Parks/Outdoor
  • Signs/Symbols
  • Sports/Recreation
  • Transportation
  • All categories
  • Shutterstock Select
  • Shutterstock Elements
  • Health Care

Browse Content

  • Sound effects

PremiumBeat

  • PixelSquid 3D objects
  • Templates Home
  • Instagram all
  • Highlight covers
  • Facebook all
  • Carousel ads
  • Cover photos
  • Event covers
  • Youtube all
  • Channel Art
  • Etsy big banner
  • Etsy mini banner
  • Etsy shop icon
  • Pinterest all
  • Pinterest pins
  • Twitter All
  • Twitter Banner
  • Infographics
  • Zoom backgrounds
  • Announcements
  • Certificates
  • Gift Certificates
  • Real Estate Flyer
  • Travel Brochures
  • Anniversary
  • Baby Shower
  • Mother's Day
  • Thanksgiving
  • All Invitations
  • Party invitations
  • Wedding invitations
  • Book Covers
  • About Creative Flow
  • Start a design

AI image generator

  • Photo editor
  • Background remover
  • Collage maker
  • Resize image
  • Color palettes

Color palette generator

  • Image converter
  • Creative AI
  • Design tips
  • Custom plans
  • Request quote
  • Shutterstock Studios

0 Credits Available

You currently have 0 credits

See all plans

pics of assignment

Image plans

With access to 400M+ photos, vectors, illustrations, and more. Includes AI generated images!

pics of assignment

Video plans

A library of 28 million high quality video clips. Choose between packs and subscription.

pics of assignment

Music plans

Download tracks one at a time, or get a subscription with unlimited downloads.

Editorial plans

Instant access to over 50 million images and videos for news, sports, and entertainment.

Includes templates, design tools, AI-powered recommendations, and much more.

Search by image

Assignment Cover royalty-free images

1,427 assignment cover stock photos, vectors, and illustrations are available royalty-free for download., confused college student with formulas on the blackboard and covering her head by textbook. shot at class.

Confused college student with formulas on the blackboard and covering her head by textbook. shot at class Stock Photo

Young businessman hiding head, balancing between duties, juggling million things at once, ineffective employee management, supervising big company alone, preparing annual report, time to have vacation

Young businessman hiding head, balancing between duties, juggling million things at once, ineffective employee management, supervising big company alone, preparing annual report, time to have vacation Stock Photo

Red composition notebook isolated on white.

Red composition notebook isolated on white. Stock Photo

Assignment school books collage

Assignment school books collage Stock Photo

Young businessman, multitasking boss, paying attention to trivial details, poor time-management, driving crazy with a lot of duties, ineffective human relations, lack of skill

Young businessman, multitasking boss, paying attention to trivial details, poor time-management, driving crazy with a lot of duties, ineffective human relations, lack of skill  Stock Photo

Green composition notebook isolated on white.

Green composition notebook isolated on white. Stock Photo

Educational pattern decoration with test tubes and book icons. Study backdrop and book cover seamless pattern design. Science background and pattern texture vector on a blue background.

Educational pattern decoration with test tubes and book icons. Study backdrop and book cover seamless pattern design. Science background and pattern texture vector on a blue background. Stock Vector

Young woman carrying heavy box walking along gray wall covered with writing of math science life ideas formulas

Young woman carrying heavy box walking along gray wall covered with writing of math science life ideas formulas  Stock Photo

Closeup smart millennial african student wear glasses hold pen noting writing down information study use book preparing for university or college test exam, horizontal photo banner for website header

Closeup smart millennial african student wear glasses hold pen noting writing down information study use book preparing for university or college test exam, horizontal photo banner for website header Stock Photo

Books are strewd across a table, as somebody is doing research for an assignment paper.

Books are strewd across a table, as somebody is doing research for an assignment paper. Stock Photo

Assignment word concept. "Assignment" on white background. Use for cover, banner, blog.

Assignment word concept. "Assignment" on white background. Use for cover, banner, blog.  Stock Vector

Big set of white clean crumpled papers on a transparent background. Crumpled empty notebook sheets of paper with shadow for posters and banners. Vector illustration

Big set of white clean crumpled papers on a transparent background. Crumpled empty notebook sheets of paper with shadow for posters and banners. Vector illustration Stock Vector

Boy Reading a Book on Science or Nature Study. Modern Vector Illustration.

Boy Reading a Book on Science or Nature Study. Modern Vector Illustration. Stock Vector

puzzle background/cover/page with space for text

puzzle background/cover/page with space for text Stock Vector

Assignment word concept. "Assignment" on chalkboard. Use for cover, banner, blog.

Assignment word concept. "Assignment" on chalkboard. Use for cover, banner, blog.  Stock Vector

Side view of two tired overworked students studying hard with laptops sitting in a coffee shop with a window in the background and the sky outdoors

Side view of two tired overworked students studying hard with laptops sitting in a coffee shop with a window in the background and the sky outdoors Stock Photo

Illustration of a girl at the desk

Illustration of a girl at the desk Stock Vector

Boy Reading a Book against Library Bookshelves. Vector EPS 10

Boy Reading a Book against Library Bookshelves. Vector EPS 10 Stock Vector

Set of notebook sheets

Set of notebook sheets Stock Vector

2 notebooks with blank cover for personalized title, isolated on a wooden desk

2 notebooks with blank cover for personalized title, isolated on a wooden desk Stock Photo

Copybook stack isolated on white background.

Copybook stack isolated on white background. Stock Photo

Portrait of young blonde woman posing in front of camera at book store while holding book with grey covers. Young girl is book lover.

Portrait of young blonde woman posing in front of camera at book store while holding book with grey covers. Young girl is book lover. Stock Photo

Sad student woman with red laptop complaining covering her face sitting on a desk at home

Sad student woman with red laptop complaining covering her face sitting on a desk at home Stock Photo

Exam preparation concept, school exam, exam concept, checklist and hourglass, choose answer, questionnaire form, education, school exam, vector flat illustration

Exam preparation concept, school exam, exam concept, checklist and hourglass, choose answer, questionnaire form, education, school exam, vector flat illustration Stock Vector

Studio image of overjoyed emotional ten year old dark skinned boy grimacing doesn't want to do homework, holding copybook, covering face. Funny naughty black schoolboy doing home assignment

Studio image of overjoyed emotional ten year old dark skinned boy grimacing doesn't want to do homework, holding copybook, covering face. Funny naughty black schoolboy doing home assignment Stock Photo

Logos back to school

Logos back to school Stock Vector

A blank notebook and a used pencil

A blank notebook and a used pencil Stock Photo

office space with a computer, coffee and note blocks

office space with a computer, coffee and note blocks Stock Photo

Brochure, book, magazine template. Realistic ruled notebook for cover design. Stock image. EPS 10.

Brochure, book, magazine template. Realistic ruled notebook for cover design. Stock image. EPS 10. Stock Vector

Girl Reading a Book against Library Bookshelves. Vector EPS 10

Girl Reading a Book against Library Bookshelves. Vector EPS 10 Stock Vector

An assignment homework tower

An assignment homework tower Stock Photo

Stack of colorful copybooks isolated on white background.

Stack of colorful copybooks isolated on white background. Stock Photo

An old book lies open with a pen on top of a hand written document in calligraphy.

An old book lies open with a pen on top of a hand written document in calligraphy. Stock Photo

Format template

Format template Stock Vector

plane drops fire retardant and water on a forest fire

plane drops fire retardant and water on a forest fire Stock Photo

Online Digital Library Display Screen on PC Accessible Education Material for Distance Learning, Study or Lesson from Home during Pandemic Isolation or Quarantine School University College Closure.

Online Digital Library Display Screen on PC Accessible Education Material for Distance Learning, Study or Lesson from Home during Pandemic Isolation or Quarantine School University College Closure. Stock Vector

Modern background and wallpapers. Abstract Colorful Groovy background design. Nameplate for online assignment cover. Illustration of circle pattern frame. Abstract background. Seamless.

Modern background and wallpapers. Abstract Colorful Groovy background design. Nameplate for online assignment cover. Illustration of circle pattern frame. Abstract background. Seamless. Stock Vector

Santiago de los Caballeros, Dominican Republic; Sept. 22, 2022: To Kill a Mockingbird by Harper Lee.

pics of assignment

Transgender identities concept - woman / man sex is hidden and covered under male /female gender. Coming out and revealing of real identity . Vector illustration

Transgender identities concept - woman / man sex is hidden and covered under male /female gender. Coming out and revealing of real identity . Vector illustration Stock Vector

Teacher is searching for homework assignment documents with colourful sliding bar report cover of student on the teacher's desk. Paperwork pile print document organized put on the table.

Teacher is searching for homework assignment documents with colourful sliding bar report cover of student on the teacher's desk. Paperwork pile print document organized put on the table. Stock Photo

Set of homework collection

Set of homework collection Stock Photo

Creative writing and storytelling, education concept. Writing education concept. Flat design vector illustration

Creative writing and storytelling, education concept. Writing education concept. Flat design vector illustration Stock Vector

Frustrated girl unable to complete her homework

Frustrated girl unable to complete her homework Stock Photo

Covered thesis book. Simple flat illustration

Covered thesis book. Simple flat illustration Stock Vector

Collection of various white papers for your text. Blank pages of a notebook with margins isolated on gray background. Realistic square vector illustration.

Collection of various white papers for your text. Blank pages of a notebook with margins isolated on gray background. Realistic square vector illustration. Stock Vector

Composition notebook for school with black and white abstract cover and yellow pencil

Composition notebook for school with black and white abstract cover and yellow pencil Stock Photo

Internet technology education guide book globe academic knowledge notebook for notes realistic 3d icon vector illustration. Global geography encyclopedia library schoolbook literature cover front view

Internet technology education guide book globe academic knowledge notebook for notes realistic 3d icon vector illustration. Global geography encyclopedia library schoolbook literature cover front view Stock Vector

Multiethinc friends sitting at table in library African-American young man regretful covered face with hand and woman supporting him

Multiethinc friends sitting at table in library African-American young man regretful covered face with hand and woman supporting him Stock Photo

Learning's textbook pile

Learning's textbook pile Stock Photo

Entomology Assignment Cover page design

Entomology Assignment Cover page design  Stock Illustration

Colorful spiral notebooks isolated on white background.

Colorful spiral notebooks isolated on white background. Stock Photo

Set of different old styled writing papers

Set of different old styled writing papers Stock Vector

Assignments on stacking books

Assignments on stacking books Stock Photo

pleasant career woman with baby is talking business with smartphone and standing at gate. korean lady smiling is thanking her colleague on phone for covering her letting her picking up her child.

pleasant career woman with baby is talking business with smartphone and standing at gate. korean lady smiling is thanking her colleague on phone for covering her letting her picking up her child. Stock Photo

Hand drawn lettering composition about Grammar. Funny slogan. Isolated calligraphy quote. Great design for book cover, postcard, t shirt print or poster. Vector illustration

Hand drawn lettering composition about Grammar. Funny slogan. Isolated calligraphy quote. Great design for book cover, postcard, t shirt print or poster. Vector illustration Stock Vector

Young strict nanny hands on hips looking dissatisfied at little girl sitting at table doing homework education at home covering face crying upset failing exam

Young strict nanny hands on hips looking dissatisfied at little girl sitting at table doing homework education at home covering face crying upset failing exam Stock Photo

Russian passport close-up. national id of the Russian Federation. inscription in Russian PASSPORT.

Russian passport close-up. national id of the Russian Federation. inscription in Russian PASSPORT. Stock Photo

Set with hand drawn lettering compositions about Grammar. Funny slogans. Isolated calligraphy quotes. Great design for book cover, postcard, t shirt print or poster. Vector illustration

Set with hand drawn lettering compositions about Grammar. Funny slogans. Isolated calligraphy quotes. Great design for book cover, postcard, t shirt print or poster. Vector illustration Stock Vector

Young White Woman Using a Laptop and Covered in a Fleece blanket as She Sits on by her Window. Female Student Studying in University Abroad is Connecting to Family and Friends Through the Web

Young White Woman Using a Laptop and Covered in a Fleece blanket as She Sits on by her Window. Female Student Studying in University Abroad is Connecting to Family and Friends Through the Web Stock Photo

Pile of unfinished homework assignment documents with colourful sliding bar report cover of student on the teacher's desk.

Pile of unfinished homework assignment documents with colourful sliding bar report cover of student on the teacher's desk. Stock Photo

Composition notebook for school with black and white abstract cover

Composition notebook for school with black and white abstract cover Stock Photo

A school homework pile

A school homework pile Stock Photo

working on assignment

working on assignment Stock Photo

Male student Submit homework assignments for teachers to check.

Male student Submit homework assignments for teachers to check. Stock Photo

modern cover design template with colorful marble texture element

modern cover design template with colorful marble texture element Stock Vector

Mathematical pattern decoration with pen and leaf icons on a white background. Abstract education pattern design for assignment cover page. Endless study pattern vector for wallpapers and book covers.

Mathematical pattern decoration with pen and leaf icons on a white background. Abstract education pattern design for assignment cover page. Endless study pattern vector for wallpapers and book covers. Stock Vector

Covered thesis book. Top view. Simple flat illustration

Covered thesis book. Top view. Simple flat illustration Stock Vector

Three young college student holding books walking and talking in the garden, image panorama for cover design.

Three young college student holding books walking and talking in the garden, image panorama for cover design. Stock Photo

Happy hispanic teacher and children put hands on each other and celebrate excellent completion of assignments. Hand on hand Like a game and a gesture of unity and solidarity. Fun creative learning

Happy hispanic teacher and children put hands on each other and celebrate excellent completion of assignments. Hand on hand Like a game and a gesture of unity and solidarity. Fun creative learning Stock Photo

Vector Valentine Day greeting card. Moon, hearts, rose flower silhouette. Adults coloring book square page. Hand drawn love couple contour thin line. Black and white sketch. T-shirt print. Batik

Vector Valentine Day greeting card. Moon, hearts, rose flower silhouette. Adults coloring book square page. Hand drawn love couple contour thin line. Black and white sketch. T-shirt print. Batik Stock Vector

Holly Jolly vector graphic design typography lettering quotes illustration. Great design for book cover, postcard, cut file, t shirt print or poster.

Holly Jolly vector graphic design typography lettering quotes illustration. Great design for book cover, postcard, cut file, t shirt print or poster. Stock Vector

Flipped Classroom Concept On Blackboard With Stacked Book And Apple On Wooden Table

Flipped Classroom Concept On Blackboard With Stacked Book And Apple On Wooden Table Stock Photo

Realistic ruled notebook for cover design. Brochure, book, magazine template. Stock image.

Realistic ruled notebook for cover design. Brochure, book, magazine template. Stock image. Stock Vector

happy smiling teenager girl on desk doing studying and homework

happy smiling teenager girl on desk doing studying and homework Stock Photo

It is a cover/front page design used fro assignment or other purposes.

It is a cover/front page design used fro assignment or other purposes.  Stock Illustration

Assigned reading

Assigned reading Stock Photo

modern colorful cover design template with dynamic halftone gradient

modern colorful cover design template with dynamic halftone gradient Stock Vector

Private Room

Private Room Stock Vector

modern cover design with line art element

modern cover design with line art element Stock Vector

Teenager schoolboy with laptop books on white background

Teenager schoolboy with laptop books on white background Stock Photo

Roommate Problem In Student Hostel Room Black Line Pencil Drawing Vector. Girl Sitting On Sofa With Laptop And Cover Ears Because Boy Playing On Guitar, Lady Prepare Dish, Roommate Problem.

Roommate Problem In Student Hostel Room Black Line Pencil Drawing Vector. Girl Sitting On Sofa With Laptop And Cover Ears Because Boy Playing On Guitar, Lady Prepare Dish, Roommate Problem.  Stock Vector

Young woman top view isolated on grey covering face with hands

Young woman top view isolated on grey covering face with hands Stock Photo

Cover page templates editable cover pages for businees document, academic assignments, and books in the profesional.

Cover page templates editable cover pages for businees document, academic assignments, and books in the profesional. Stock Vector

Group of students working on their home assignment. Four young people sitting on couch together covered with plaid and using gadgets. Student community concept

Group of students working on their home assignment. Four young people sitting on couch together covered with plaid and using gadgets. Student community concept Stock Photo

3 books next to a black and white composition notebook with blank cover for personalized title, all on a wooden desk

3 books next to a black and white composition notebook with blank cover for personalized title, all on a wooden desk Stock Photo

Books with bookmarks of flowers, pencils, notepads on the table, on a background of colored paper of pastel colors, the concept of learning, education, back to school

Books with bookmarks of flowers, pencils, notepads on the table, on a background of colored paper of pastel colors, the concept of learning, education, back to school  Stock Photo

Assignment word concept. "Assignment" . Use for cover, banner, blog.

Assignment word concept. "Assignment" . Use for cover, banner, blog.  Stock Vector

puzzle background cover with space for text

puzzle background cover with space for text Stock Vector

Stack of book isolated on white background, notebook and textbook, heap of stationery and note, learning and study, heap diary or literature, education and business collection concept.

Stack of book isolated on white background, notebook and textbook, heap of stationery and note, learning and study, heap diary or literature, education and business collection concept. Stock Photo

Doubtful woman making research and taking notes while holding a book outdoors - Casually dressed girl wearing eyeglasses studying in nature while holding a pencil

Doubtful woman making research and taking notes while holding a book outdoors - Casually dressed girl wearing eyeglasses studying in nature while holding a pencil Stock Photo

Our company

Press/Media

Investor relations

Shutterstock Blog

Popular searches

Stock Photos and Videos

Stock photos

Stock videos

Stock vectors

Editorial images

Featured photo collections

Sell your content

Affiliate/Reseller

International reseller

Live assignments

Rights and clearance

Website Terms of Use

Terms of Service

Privacy policy

Modern Slavery Statement

Cookie Preferences

Shutterstock.AI

AI style types

Shutterstock mobile app

Android app

© 2003-2024 Shutterstock, Inc.

6. Image Classifier

Download Project Zip | Submit to TigerFile

  • To learn about object-oriented programming concepts.
  • To learn about machine learning (ML).
  • To implement the perceptron algorithm - a simple and beautiful example of ML in action.
  • To write a client program that classifies images.

Getting Started

Read/scan this entire project description before starting to code. This will provide a big picture before diving into the assignment!

Download and expand the project zip file for this assignment, which contains the files you will need for this assignment.

Read Sections 3.2 and 3.3 of the textbook on creating data types and designing data types.

Review the Picture and Color data types.

This is a partner assignment. Instructions for help finding a partner and creating a TigerFile group can be found on Ed.

The rules for partnering are specified on the course syllabus . Make sure you read and understand these rules, and please post on Ed if you have questions. In your readme.txt file, you must indicate that you adhered to the COS 126 partnering rules.

ML algorithms like this are widely used to classify handwritten digits (e.g., to recognize postal ZIP codes, process bank checks, and parse income tax forms). The full power of ML derives from its amazing versatility. ML algorithms rely upon data to learn to make predictions, without being explicitly programmed for the task. For example, the same code you will write to classify handwritten digits extends to classifying other types of images, simply by training the algorithm with different data.

Moreover, ML techniques apply not only to images but also to numerical, text, audio, and video data. Modern applications of ML span science, engineering, and commerce: from autonomous vehicles, medical diagnostics, and video surveillance to product recommendations, voice recognition, and language translation.

Implementation Tasks

  • Perceptron.java
  • MultiPerceptron.java
  • ImageClassifier.java - a template is provided.
  • Submit a completed readme.txt file.
  • Submit a completed acknowledgments.txt file.

Supervised learning. To classify images, we will use a supervised learning algorithm. Supervised learning is divided into two phases — training and testing .

Training. In the training phase , the algorithm learns a function that maps an input to an output (or a label) using training data consisting of known input–output pairs. For the handwritten digit application, the training data comprise 60,000 grayscale images (inputs) and associated digits (labels). Here is a small subset:

In the binary classification problem , we seek to classify images into one of two classes (e.g., either the digit 6 or some digit other than 6). By convention, we use the binary labels : \(+1\) ( positive ) and \(-1\) ( negative ) to denote the two classes. In the multiclass classification problem , we allow for \( m \) classes and label them \( 0, 1, …, m-1 \). For our handwritten digit application, there are \( m = 10 \) classes, with class \( i \) corresponding to digit \( i \).

Testing. In the testing phase , the algorithm uses the learned function to predict class labels for unseen inputs.

Typically, the algorithm makes some prediction errors (e.g., predicts 9 when the handwritten digit is 6). An important quality metric is the test error rate — the fraction of testing inputs that the algorithm misclassifies. It measures how well the learning algorithm generalizes from the training data to new data.

Perceptrons . A perceptron is a simplified model of a biological neuron. It is a function that takes a vector \( x = x_0, x_1, \ldots, x_{n-1} \) of \( n \) real numbers as input and outputs (or predicts) either a \(+1\) or \(−1\) binary label . A perceptron is characterized by a vector \( w = w_0, w_1, \ldots, w_{n-1} \) of \( n \) real numbers known as the weight vector . The perceptron computes the weighted sum

$$ S = w_0 \times x_0 +w_1 \times x_1 + \ldots + w_{n-1} \times x_{n-1} $$

and outputs the sign of the sum.

For the handwritten digit application, a perceptron will be trained to predict the binary label \(+1\) for images that correspond to a target digit and the binary label \(−1\) otherwise; the input vector \( x \) holds the grayscale values of each pixel in an image; and the weight vector \( w \) is pre-computed by a process described in the next paragraph.

Perceptron algorithm. How do we determine the values of the weight vector \( w \) so that the perceptron makes accurate predictions? The core idea is to use the training data of known input–output pairs to incrementally refine the weights. Specifically, we initialize all the weights to 0 and then process the labeled inputs one at a time. When we process a labeled input, there are three possibilities:

Correct prediction : The perceptron predicts the correct binary label (\(+1\) or \(-1\)) for the given input vector \( x \). In this case, we leave \( w \) unchanged.

False positive : The given input vector \( x \) is labeled \(-1\) but the perceptron predicts \(+1\). In this case, we adjust \( w \) as follows - for each \(j\): $$ w^\prime_j=w_j-x_j $$

False negative : The given input vector \( x \) is labeled \(+1\) but the perceptron predicts \(-1\). In this case, we adjust \( w \) as follows - for each \(j\): $$ w^\prime_j=w_j+ x_j $$

Example. Here is an example trace of the perceptron algorithm using four (4) labeled inputs, each of length \( n=3 \). In this example, an input \( x \) has a positive label \(+1\) if and only if the following is true: \( x_0 \le x_1 \le x_2 \) ; otherwise it has a negative label \(-1\).

Perceptron data type

Create a data type that represents a perceptron by implementing the following API:

Corner cases. You may assume that the arguments to the constructor and instance methods are valid. For example, you may assume that any binary label is either \(+1\) or \(-1\), any input vector \( x \) is of length \( n \), and \( n \ge 1 \).

Multiclass classification

In the previous section, we used a single perceptron for the binary classification problem. For a multiclass classification problem with \( m \) classes, we create an array of \( m \) perceptrons, each solving its own binary classification problem. For our handwritten digit application, each perceptron \( i \) solves a binary classification problem: does the image correspond to the digit \( i \)

We train each perceptron independently and make predictions by distilling the results from the \( m \) perceptrons.

Multiclass training. Initialize the weight vector of each of the \( m \) perceptrons to be zero and process the labeled training inputs one at a time. To train the perceptrons on an input vector \( x \) with multiclass label \( i \) (0 to \( m-1 \)):

  • Train perceptron \( i \) on input vector \( x \) with the binary label \(+1\)
  • Train the other \( m-1 \) perceptrons on input vector \( x \) with the binary label \(-1\)

That is, when training perceptron \( i \), we treat an input vector labeled \( i \) as a positive example and an input vector with any other label as a negative example.

Multiclass prediction. To make a prediction for an input vector \( x \), compute the weighted sum for each of the \( m \) perceptrons on that input. The multiclass prediction is the index of the perceptron with the largest weighted sum. Intuitively, each perceptron with a positive weighted sum predicts that x is a positive example for its class, but we need to pick only one. Note that the perceptron with the largest weighted sum makes that prediction with the most intensity, so we assign the class label associated with that perceptron, even if the largest weighted sum is negative.

This one-vs-all strategy decomposes a multiclass classification task into \(m\) binary classification tasks. In computer science, this decomposition is known as a reduction ; this particular kind of reduction is used all over ML.

Example . Here is an example of a multi-perceptron with \(m\) = 2 classes and \(n =\) 3 inputs.

MultiPerceptron data type

Create a data type that represents a multi-perceptron by implementing the following API:

Ties . If two (or more) perceptrons tie for the largest weighted sum in predictMulti() , return the index of any such perceptron (between 0 and \( m-1 \)).

Corner cases . You may assume that the arguments to the constructor and instance methods are valid. For example, you may assume that any class label is an integer between 0 and \( m-1 \), any input vector \( x \) is of length \( n \), and \( m \ge 1 \) and \( n \ge 1 \).

ImageClassifier data type

Your final task is to write a data type ImageClassifier.java that classifies images using the MultiPerceptron data type described in the previous section by:

  • Training it using the input–output pairs specified in a training data file.
  • Testing the predictions using the input–output pairs specified in a testing data file .
  • Printing a list of misclassified images and the test error rate.

Organize your client according to the following API:

Here are some details about the API:

Configuration file format. A configuration file consists of a sequence of lines:

  • the first line contains the width and height, respectively, of the images in the training and testing data files;
  • the second line contains the number of classes \(m\);
  • the remaining \(m\) lines contain the names of each class.

Training and testing file format. A training data file and testing data file have the format - a sequence of lines where:

  • each line contains the name of an image file (e.g., corresponding to a handwritten digit) followed by an integer label (e.g., identifying the correct digit), separated by whitespace.

For testing data files you will use the integer labels only to check the accuracy of your predictions.

Input files. We provide a variety of datasets in the specified format, including handwritten digits, fashion articles from Zalando, Hirigana characters, and doodles of fruit, animals, and musical instruments. The handwritten digits and fashion articles are provided in your project folder. You can download the other datasets from here .

Constructor . The ImageClassifier constructor takes a single argument - the file name for a configuration file. The constructor reads the data from configuration file and creates a MultiPerceptron object with \( m \) classes and \( n = width \times height \) inputs. It also stores the class names provided in the cofiguration file.

Feature extraction . The extractFeatures() method converts a grayscale image into a one-dimensional array suitable for use with the MultiPerceptron data type. In one pass over the pixels of the image:

  • extract the grayscale values from each pixel and
  • rearrange them into a single 1D array (vector).

extractFeatures() must throw an IllegalArgumentException when the image’s dimensions are not equals the dimensions provided in the configation file.

Recall that a shade of gray has its red, green, and blue components all equal

The one-dimensional array must be of length width x height

In one pass, you must iterate over the image RGB pixel values in row-major order , extracting the grayscale value and setting the appropriate element in the 1D array (vector).

Training a classifier . The trainClassifier() method takes the name of the training data file, and trains the image classifier using the images and labels provided in the file.

classNameOf() . The classNameOf(int prediction) method must thrown an IllegalArgumentException( when prediction less than \(0\) or greater than \(m - 1\), where \(m\) is the number of class names.

classifyImage() . The classifyImage(Picture picture) returns the predicted class \(i\), where \(0 \leq i \leq m - 1\) and \(m\) is the number of classes.

Testing a classifier . The testClassifier() method takes the name of the testing data file, and tests the image classifier using the images and labels provided in the file. For each misclassified image , it must also output the following information:

  • the misclassified image’s filename,
  • its correct class name, and
  • the incorrectly predicted class name

in the format shown below. For example:

The testClassifier() method returns the test error rate (the fraction of test images that the algorithm misclassified).

Main. The main() method takes three command-line arguments:

  • The name of a file that contains the configuration data.
  • The name of a file that contains the training data.
  • The name of a file that contains the testing data.

It then creates an ImageClassifier object, trains the classifier, tests the classifer and prints the error rate.

A template for the main() test client is provided in ImageClassifier.java in the project folder.

Here are some sample executions:

Possible Progress Steps

We provide some additional instructions below. Click on the ► icon to expand some possible progress steps or you may try to solve Classifier without them. It is up to you!

Implementing Perceptron.java

  • Test: In the main() method, instantiate a few Perceptron objects and print the number of inputs for each object.
  • Test: In the main() method, print the various Perceptron objects. What should the output be for a newly instantiated Perceptron object?
  • Test: In the main() method, print the result of invoking the weightedSum() method on the various Perceptron objects (using, of course, appropriately sized arrays).
  • Implement the predict() method.
  • Implement the train() method. Note: train() should call predict() .
  • You can test your implementation by using the code in the Testing section (below) and then submitting to TigerFile. Do not move onto MultiPerceptron until Perceptron is working properly.

Testing Your Perceptron.java Implementation

Here is Java code that trains a Perceptron on four input vectors (of length 3) from the assignment specification:

And the desired output:

Implementing MultiPerceptron.java

  • Test: In the main() method, instantiate a few MultiPerceptron objects and print the number of classes and inputs for each object.
  • Test: In the main() method, print the various MultiPerceptron objects. What should the output be for a newly instantiated MultiPerceptron object?
  • Implement the predictMulti() method.
  • Implement the trainMulti() method.
  • You can test by using the code in the Testing section (below) and then submitting to TigerFile.

Testing Your MultiPerceptron.java Implementation

Here is Java code that trains a MultiPerceptron on four input vectors (of length 3) from the assignment specification:

Here is Java code that tests a MultiPerceptron on two input vectors (of length 3) from the assignment specification, based on the trained Multiperceptron object:

Implementing ImageClassifier.java

Part I. Constructor .

  • Implement the ImageClassifier() constructor.
  • Read the configuration file data, and store the configuration data in your instance variables.
  • Review the In data type from Section 3.1, which is an object-oriented version of StdIn .
  • We recommend using the instance variables: integers width , height , a String array classNames[] and a MultiPerceptron with \( m \) classes and \( n = width \times height \) inputs.
  • Print the instances variables to standard output.
  • Test your constructor in main() by creating various ImageClassifier objects using some different configuration files ( image3x3.txt , digits.txt , fashion.txt , etc.)
  • Printing is solely for checking progress; comment out the print statements once you have confidence your constructor is working properly.

Part II. Feature extraction .

  • Review Section 3.1 of the textbook, especially Program 3.1.4 ( Grayscale.java ) for using the Picture and Color data types. Note that the images are already grayscale, so you don’t need to use Luminance.java . In particular, the red, green, and blue components are equal, so you can use any of getRed() , getGreen() , or getBlue() to get the grayscale value.
  • Comment out the test client code provided in ImageClassifier.main() .
  • Create a Picture object for the image 49785.png (in the project folder) and display it in a window. (Remove this code after you have successfully displayed the image.)

Grayscale Values Matrix

  • Extract its width and height and print the values to standard output. Then, extract the grayscale values of the pixels and print. If it’s not already in row-major order, adjust your code so that it prints the values in the specified order.
  • If you are using IntelliJ, do not type the import java.awt.Color; statement that is normally needed to access Java’s Color data type. IntelliJ is pre-configured to automatically add import statements when needed (and remove them when not needed).
  • Create a one-dimensional array of length width x height and copy the grayscale values to the array. Print the values of this array to confirm you can create a vector (row-major order) of values from a Picture object.
  • Using the code from steps (4) and (5) as a guide, implement the method extractFeatures() that takes a Picture as an argument and returns the grayscale values as a double[] in row-major order .
  • Write a main() method that tests extractFeatures() . Using image3-by-3.png , your main() method should print the values returned by extractFeatures() as shown in the above figure: ImageClassifier test = new ImageClassifier("image3x3.txt"); // create a small test Picture image3x3 = new Picture("image3x3.png"); double[] values = test.extractFeatures(image3x3); // print the array values
  • Once you are confident that extractFeatures() works, remove your testing code before submitting the assignment to TigerFile.

Part III. Classifying images.

  • Implement the classifyImage() method. For the given image, extract its features and use the multi-perceptron to predict its class label.
  • Implement the classNameOf() method. For the given class label, return the class name associated with it.
  • Test these two methods by creating an ImageClassifier object using the digits.txt configuration file.
  • Implement the trainClassifier() method. Read the training file data just as you read the configuration file. For each training image, extract its corresponding features and train the classifier using the corresponding label.
  • Implement the testClassifier() method. Read the test file data just as you read the configuration file. For each testing image, predict its class. Print each misclassified image to standard output and compute the error rate on these images.

Training and Testing ImageClassifier Using Large Datasets

Now, the fun part. Use large training and testing input files. Be prepared to wait for one (1) minute (or more) while your program processes 60,000 images.

Don’t worry about the odd looking filenames. It’s just a verbose way to specify the location to a specific image file in a JAR ( Java ARchive ) file. Modern operating systems are not so adept at manipulating hundreds of thousands of individual image files, so this makes training more efficient. In this case, jar:file:digits.jar identifies the JAR file digits.jar , and /training/7/4545.png identifies a file named 4545.png , which is located in the subdirectory /training/7/ of the JAR file.

Analysis - readme.txt

Provide your answers to Parts 1, 2 and 3 (below) in your readme.txt file.

Part 1 : Run the following experiment (you may want to redirect standard output to a file):

  • What digit is misclassified the most frequently?
  • For this digit, what are the top two digits that your MultiPerceptron incorrectly predicts?
  • Examine some of these misclassified images. Provide an explanation of what might have caused these misclassifications.

Part 2 : Compute the following quantities using the experiments:

  • The error rate on the images specified in digits-testing1K.txt before training your classifier.
To do this, you will need to modify the main in ImageClassifier . Comment out the line: // classifier.trainClassifier(args[1]);
  • The error rate on the images specified in digits-testing1K.txt after training your classifier.
To do this, you will need to modify the main in ImageClassifier . Uncomment the line: classifier.trainClassifier(args[1]);
  • Can we conclude that the classifier is actually learning?

Part 3 : Some people (especially in Europe and Latin America) write a 7 with a line through the middle, while others (especially in Japan and Korea) make the top line crooked.

  • Suppose that the training data consists solely of samples that do not use any of these conventions. How well do you think the algorithm will perform when you test it on different populations? What are the possible consequences?
  • Now suppose that you are using a supervised learning algorithm to diagnose cancer. Suppose the training data consists of examples solely on individuals from population X but you use it on individuals from population Y. What are the possible consequences?

Submit to TigerFile : Perceptron.java , MultiPerceptron.java , ImageClassifier.java , and completed readme.txt and acknowledgments.txt files.

It is a really simple, beautiful algorithm that, nevertheless, can do something interesting.

  • The perceptron algorithm is one of the most fundamental algorithms in an area of ML called online learning (learning from samples one at a time).
  • The perceptron algorithm is closely related to the support-vector machine algorithm, another fundamental ML algorithm.
  • The perceptron algorithm has some beautiful theoretical properties. For example, if the training data set is linearly separable (i.e., there exists some weight vector that correctly classifies all of the training examples), and if we cycle through the training data repeatedly, the perceptron algorithm will eventually (and provably) find such a weight vector.
  • Perceptrons are a building block in neural networks. In neural networks, many perceptrons (or other artificial neurons) are connected in a network architecture, in which the outputs of some neurons are used as the inputs to other neurons. Training multi-layer neural networks requires a more sophisticated algorithm to adjust the weights, such as gradient descent.

Geometrically, you can view each input vector \( x \) as a point in \( R^n \) and the weight vector \( w \) as a hyperplane through the origin. The goal of the perceptron algorithm is to find a hyperplane that separates the positive examples from the negative examples. Using vector terminology, the weighted sum is known as the dot product ; its sign determines on which side of the hyperplane the point lies.

Dot product

During training, when we encounter a point \( x \) that is on the wrong side of the hyperplane (i.e., a false positive or negative), we update the weight vector, thereby rotating the hyperplane slightly. After the rotation, x is either on the correct side of the hyperplane or, if not, at least a bit closer to the hyperplane (in terms of Euclidean distance).

Here are three simple ideas:

  • Multiclass perceptron . Instead of training all m perceptrons on each input vector, when there is a prediction error (multiclass perceptron predicts \( i \) but correct label is \( k \)), train only two perceptrons: train perceptron \( i \) (with label −1) and perceptron \( k \) (with label \(+1\)).
  • Adjust the weights with a fraction of \(+1\) or \(-1\) for correct or incorrect predictions (this helps with a smoother convergence) and iterate over the training step multiple times, each time training the perceptron with the same set of training data (randomized in order).
  • Normalize the Features array data to have values between 0 and 1 (divide the values with 255) and initialize the perceptron weights to random values (with uniform random or Gaussian random to be less than 1 and on average 0).
  • Averaged perceptron . Instead of using the last weight vector, take the average of the weight vectors that are computed along the way.
  • Incorporate more features . Instead of using the feature vector \( x_0, x_1,\ldots, x_{n-1} \), create additional features. In particular, for each pair of features \( x_i \) and \( x_k \), create a new feature \(x_{ik} = x_i * x_k \). You could also keep going, adding not just pairs of features, but also triples, etc. This can significantly improve accuracy, but it becomes prohibitively expensive in terms of computation.

See this paper for additional ideas, including the kernel trick and the voted-perceptron algorithm.

The current champion uses convolution neural networks and achieves a 99.79% accuracy rate on the MNIST testing database consisting of 10,000 images. Here are the 21 incorrect predictions:

Incorrect Predictions

There is not much room for improvement; indeed, some of the errors appear to be due to incorrectly labeled (or ambiguous) inputs.

This assignment was developed by Sebastian Caldas, Robert DeLuca, Ruth Fong, Maia Ginsburg, Alan Kaplan, Kevin Jeon, and Kevin Wayne.

pics of assignment

  • Investigates
  • Houston Life
  • Newsletters

WEATHER ALERT

A river flood warning in effect for Houston County

Photos, video reveal devastation caused by baltimore bridge collapse, as of tuesday afternoon, 6 people were still missing as a result of the collapse.

Keith Dunlap , Digital Content Team, Graham Media Group

Six people remained missing as of Tuesday afternoon and multiple cars plunged into Patapsco River on Tuesday after a container ship smashed into the Francis Scott Key Bridge in Baltimore, destroying the bridge and sending it crumbling.

The incident happened in the dark early morning hours, so when daylight came later in the day, it vividly showed the extent of the damage.

Above is a video of when the collapse happened, Toby Gutermuth via Storyful. Below are photos of the collapse, courtesy of the Associated Press.

Graham Media Group 2024

About the Author:

Keith dunlap.

Keith is a member of Graham Media Group's Digital Content Team, which produces content for all the company's news websites.

Applications open for free program helping small businesses

What to know ahead of texas children's houston open, expert shares tax scams circulating in houston, kprc 2 investigates: how to determine responsibility for property damage left by contractor crews, “koda the fluff”: therapy dog turned viral sensation puts smiles on faces around the world through social media.

pics of assignment

Walker Buehler nearing rehab assignment after sim game

L OS ANGELES — Walker Buehler faced Dodgers hitters in a simulated game before Monday night’s game at Dodger Stadium, taking the next step in his long road back from a second Tommy John surgery and flexor tendon repair in his right elbow.

The Dodgers slow-played Buehler during spring training, and he started the season on the injured list because he’s on an innings limit in 2024 after pitching only 67 professional innings in 2022-23 combined. At Camelback Ranch in Arizona, Buehler threw bullpen sessions and faced hitters at times, but did not appear in any Cactus League game.

On Monday, Buehler pitched four simulated innings, facing Dodgers hitters.

“He’s been through the rehab process, facing his own hitters, the simulated games quite a bit over the last year,” manager Dave Roberts said Monday. “I think he’s sort of over it.”

The Dodgers haven’t set a timetable for when Buehler might return to the major league rotation, but a minor league rehab assignment could happen relatively soon.

“He’s close,” Roberts said. “Whether it’s, he throws his bullpen in a couple of days and then goes out, or throws a bullpen and another live [session], I think we’ll know more once he throws that bullpen in two or three days.”

Triple-A Oklahoma City opens its season this Friday, while Double-A Tulsa, High-A Great Lakes, and Low-A Rancho Cucamonga don’t begin play until Friday, April 5.

Walker Buehler nearing rehab assignment after sim game

VIDEO

  1. NPTEL IOT WEEK 7 ASSIGNMENT ANSWERS

  2. Accepted OCAD Illustration Portfolio

  3. DEC 2023 Assignment Online Submit होगा या Offline?

  4. Creating an assignment using the Assignment Template

  5. IGNOU Assignment Front Page Kaise Fill Kare 2024

  6. Student View -Brightspace Assignments

COMMENTS

  1. 1,829,300+ Assignment Stock Photos, Pictures & Royalty-Free Images

    Organization and planning assignment stock pictures, royalty-free photos & images. agenda organize with color-coding sticky for time management. Close-up of agenda organize with color-coding sticky notes for time management. Productive schedule for appointments and reminders. Hand holding a yellow highlighter marker.

  2. 101,680 Assignment Images, Stock Photos, 3D objects, & Vectors

    101,680 assignment stock photos, 3D objects, vectors, and illustrations are available royalty-free. Teamwork and cooperation concept - top view of six people - men and women - drawing or writing on a large white blank sheet of paper. Female student taking notes from a book at library.

  3. Assignment Photos, Download The BEST Free Assignment Stock Photos & HD

    Download. Previous123456Next. Download and use 1,000+ Assignment stock photos for free. Thousands of new images every day Completely Free to Use High-quality videos and images from Pexels.

  4. Assignment Photos and Premium High Res Pictures

    Browse 590,498 authentic assignment stock photos, high-res images, and pictures, or explore additional assignment icon or work assignment stock images to find the right photo at the right size and resolution for your project. Focused young woman. Student working in library at night. Young lady using a laptop to do research on the internet.

  5. Assignment Images

    Find & Download Free Graphic Resources for Assignment. 246,000+ Vectors, Stock Photos & PSD files. Free for commercial use High Quality Images

  6. Assignment Images

    1,085,647 results for assignment in all. View assignment in videos (108585) 00:06. 4K HD. Search from thousands of royalty-free Assignment stock images and video for your next project. Download royalty-free stock photos, vectors, HD footage and more on Adobe Stock.

  7. Assignment Pictures Pictures, Images and Stock Photos

    Portrait of smiling woman wearing spectacles and holding pencil while sitting at desk. Business woman taking notes in diary and looking at camera. University girl with eyeglasses sitting on table at library. Search from 1,361,098 Assignment Pictures stock photos, pictures and royalty-free images from iStock.

  8. 1,928 Complete Assignment Stock Photos & High-Res Pictures

    Infant And Primary School Students Finish The 2019-2020 Year. Browse Getty Images' premium collection of high-quality, authentic Complete Assignment stock photos, royalty-free images, and pictures. Complete Assignment stock photos are available in a variety of sizes and formats to fit your needs.

  9. College Assignment Photos and Premium High Res Pictures

    Browse 123,107 college assignment photos and images available, or start a new search to explore more photos and images. Young lady using a laptop to do research on the internet. Woman working on a project. Mixed race woman sending emails. Young university student with book indoors in librabry, reading.

  10. Pics Of Assignment Pictures, Images and Stock Photos

    Search from Pics Of Assignment stock photos, pictures and royalty-free images from iStock. Find high-quality stock photos that you won't find anywhere else.

  11. Homework Assignment Photos and Images

    Find Homework Assignment stock images in HD and millions of other royalty-free stock photos, 3D objects, illustrations and vectors in the Shutterstock collection. Thousands of new, high-quality pictures added every day.

  12. 50+ Free Assignment & Plastic Bag Images

    54 Free images of Assignment. Find your perfect assignment image. Free pictures to download and use in your next project. Royalty-free images. / 1. Find images of Assignment Royalty-free No attribution required High quality images.

  13. 40+ Free Assign & Assignment Images

    47 Free images of Assign. Related Images: assignment plastic bag homework study ipad copyright read education reading. Find your perfect assign image. Free pictures to download and use in your next project. 47 Free images of Assign.

  14. Explore 28+ Free Assignments Illustrations: Download Now

    28+ Free Assignments Illustrations. Hundreds of stock assignments illustrations to choose from. Free illustration graphics to download. Royalty-free illustrations. / 1. Download stunning royalty-free images about Assignments. Royalty-free No attribution required .

  15. Graded Assignment Stock Photos and Pictures

    Graded Assignment royalty-free images. 2,212 graded assignment stock photos, 3D objects, vectors, and illustrations are available royalty-free. See graded assignment stock video clips. A graded paper assignment. Pixel perfect, editable stroke line art icon.

  16. Assignment Stock Photos, Royalty Free Assignment Images

    Overall, our assignment images stock collection offers thousands of high-quality images in different categories, styles, and formats perfect for any project. Whether you are designing for print or digital, our stock collection is a valuable resource designed to ease the process of finding and using the right visuals effectively. You can use our ...

  17. Assignments Photos and Premium High Res Pictures

    Business people working at a modern office. Browse Getty Images' premium collection of high-quality, authentic Assignments stock photos, royalty-free images, and pictures. Assignments stock photos are available in a variety of sizes and formats to fit your needs.

  18. 10 Photo Assignments to Inspire and Challenge

    Assignment #3: Shadows. Shadows are everywhere and they are vital to photography because this is the art of capturing light. With light comes shadows and when you begin to look at shadows as a photographer, your world will open up. Take a look around for shadows and record them with your camera.

  19. 40 Practical Photography Assignments to Reinspire You

    Then you will push your creative boundaries, and be more likely to make a good photo. #9. Limit yourself to only 36 photos in a day. For this assignment, you're only allowed to take 36 photos in ...

  20. Class Assignment Pictures, Images and Stock Photos

    Browse 1,308,500+ class assignment stock photos and images available, or start a new search to explore more stock photos and images. Sort by: Most popular. Focused cute stylish african american female student with afro... Classmates are learning through laptop. Young curly hair woman discussing with man in classroom.

  21. Haunting photos of ice trees in Japan

    Photo assignment editor March 25, 2024 at 8:00 a.m. EDT Rime ice combines with snow on a forest of Maries' fir (Abies mariesii) down the slopes of Mt. Zao in Yamagata, Japan.

  22. Assignment Photos Photos, Download The BEST Free Assignment Photos

    Free Assignment Photos Photos. Photos 33.9K Videos 4K Users 1.4K. Filters. All Orientations. All Sizes. Previous123456Next. Download and use 30,000+ Assignment Photos stock photos for free. Thousands of new images every day Completely Free to Use High-quality videos and images from Pexels.

  23. Monmouth County Courthouse makes dedication to late assignment judge

    A recently renovated entranceway at Monmouth County Courthouse in Freehold has been renamed in memory of late Assignment Judge Lisa Thornton. The Monmouth County Board of County Commissioners, in ...

  24. Assignment Cover royalty-free images

    1,416 assignment cover stock photos, 3D objects, vectors, and illustrations are available royalty-free. See assignment cover stock video clips. Educational pattern decoration with test tubes and book icons. Study backdrop and book cover seamless pattern design. Science background and pattern texture vector on a blue background.

  25. 6. Image Classifier

    To write a client program that classifies images. Getting Started. Read/scan this entire project description before starting to code. This will provide a big picture before diving into the assignment! Download and expand the project zip file for this assignment, which contains the files you will need for this assignment.

  26. Introducing Surface Pro 10 & Surface Laptop 6: AI PCs built for

    Designed with zero-trust, from chip to cloud. The new Surface Pro 10 and Surface Laptop 6 have Zero Trust security built-in from chip to cloud. As Secured-core PCs, they use the best from Windows 11 Pro and advanced hardware features to help protect the device, your identity and data.

  27. Photos, video reveal devastation caused by Baltimore ...

    Photos, video reveal devastation caused by Baltimore bridge collapse As of Tuesday afternoon, 6 people were still missing as a result of the collapse Keith Dunlap , Digital Content Team, Graham ...

  28. Assignment Writing Photos, Download The BEST Free Assignment Writing

    Popular. All Orientations. All Sizes. Previous123456Next. Download and use 10,000+ Assignment Writing stock photos for free. Thousands of new images every day Completely Free to Use High-quality videos and images from Pexels.

  29. Walker Buehler nearing rehab assignment after sim game

    LOS ANGELES — Walker Buehler faced Dodgers hitters in a simulated game before Monday night's game at Dodger Stadium, taking the next step in his long road back from a second Tommy John surgery ...