|
|
|
@@ -35,102 +35,176 @@ using mindspore::dataset::LPixelType; |
|
|
|
using mindspore::dataset::LDataType; |
|
|
|
#define MS_PRINT(format, ...) __android_log_print(ANDROID_LOG_INFO, "MSJNI", format, ##__VA_ARGS__) |
|
|
|
|
|
|
|
static const int RET_CATEGORY_SUM = 601; |
|
|
|
|
|
|
|
static const int RET_CATEGORY_SUM = 410; |
|
|
|
static const char *labels_name_map[RET_CATEGORY_SUM] = { |
|
|
|
{"Tortoise"}, {"Container"}, {"Magpie"}, {"Seaturtle"}, {"Football"}, {"Ambulance"}, {"Ladder"}, |
|
|
|
{"Toothbrush"}, {"Syringe"}, {"Sink"}, {"Toy"}, {"Organ(MusicalInstrument) "}, {"Cassettedeck"}, |
|
|
|
{"Apple"}, {"Humaneye"}, {"Cosmetics"}, {"Paddle"}, {"Snowman"}, {"Beer"}, {"Chopsticks"}, |
|
|
|
{"Humanbeard"}, {"Bird"}, {"Parkingmeter"}, {"Trafficlight"}, {"Croissant"}, {"Cucumber"}, |
|
|
|
{"Radish"}, {"Towel"}, {"Doll"}, {"Skull"}, {"Washingmachine"}, {"Glove"}, {"Tick"}, {"Belt"}, |
|
|
|
{"Sunglasses"}, {"Banjo"}, {"Cart"}, {"Ball"}, {"Backpack"}, {"Bicycle"}, {"Homeappliance"}, |
|
|
|
{"Centipede"}, {"Boat"}, {"Surfboard"}, {"Boot"}, {"Headphones"}, {"Hotdog"}, {"Shorts"}, |
|
|
|
{"Fastfood"}, {"Bus"}, {"Boy "}, {"Screwdriver"}, {"Bicyclewheel"}, {"Barge"}, {"Laptop"}, |
|
|
|
{"Miniskirt"}, {"Drill(Tool)"}, {"Dress"}, {"Bear"}, {"Waffle"}, {"Pancake"}, {"Brownbear"}, |
|
|
|
{"Woodpecker"}, {"Bluejay"}, {"Pretzel"}, {"Bagel"}, {"Tower"}, {"Teapot"}, {"Person"}, |
|
|
|
{"Bowandarrow"}, {"Swimwear"}, {"Beehive"}, {"Brassiere"}, {"Bee"}, {"Bat(Animal)"}, |
|
|
|
{"Starfish"}, {"Popcorn"}, {"Burrito"}, {"Chainsaw"}, {"Balloon"}, {"Wrench"}, {"Tent"}, |
|
|
|
{"Vehicleregistrationplate"}, {"Lantern"}, {"Toaster"}, {"Flashlight"}, {"Billboard"}, |
|
|
|
{"Tiara"}, {"Limousine"}, {"Necklace"}, {"Carnivore"}, {"Scissors"}, {"Stairs"}, |
|
|
|
{"Computerkeyboard"}, {"Printer"}, {"Trafficsign"}, {"Chair"}, {"Shirt"}, {"Poster"}, |
|
|
|
{"Cheese"}, {"Sock"}, {"Firehydrant"}, {"Landvehicle"}, {"Earrings"}, {"Tie"}, {"Watercraft"}, |
|
|
|
{"Cabinetry"}, {"Suitcase"}, {"Muffin"}, {"Bidet"}, {"Snack"}, {"Snowmobile"}, {"Clock"}, |
|
|
|
{"Medicalequipment"}, {"Cattle"}, {"Cello"}, {"Jetski"}, {"Camel"}, {"Coat"}, {"Suit"}, |
|
|
|
{"Desk"}, {"Cat"}, {"Bronzesculpture"}, {"Juice"}, {"Gondola"}, {"Beetle"}, {"Cannon"}, |
|
|
|
{"Computermouse"}, {"Cookie"}, {"Officebuilding"}, {"Fountain"}, {"Coin"}, {"Calculator"}, |
|
|
|
{"Cocktail"}, {"Computermonitor"}, {"Box"}, {"Stapler"}, {"Christmastree"}, {"Cowboyhat"}, |
|
|
|
{"Hikingequipment"}, {"Studiocouch"}, {"Drum"}, {"Dessert"}, {"Winerack"}, {"Drink"}, |
|
|
|
{"Zucchini"}, {"Ladle"}, {"Humanmouth"}, {"DairyProduct"}, {"Dice"}, {"Oven"}, {"Dinosaur"}, |
|
|
|
{"Ratchet(Device)"}, {"Couch"}, {"Cricketball"}, {"Wintermelon"}, {"Spatula"}, {"Whiteboard"}, |
|
|
|
{"Pencilsharpener"}, {"Door"}, {"Hat"}, {"Shower"}, {"Eraser"}, {"Fedora"}, {"Guacamole"}, |
|
|
|
{"Dagger"}, {"Scarf"}, {"Dolphin"}, {"Sombrero"}, {"Tincan"}, {"Mug"}, {"Tap"}, {"Harborseal"}, |
|
|
|
{"Stretcher"}, {"Canopener"}, {"Goggles"}, {"Humanbody"}, {"Rollerskates"}, {"Coffeecup"}, |
|
|
|
{"Cuttingboard"}, {"Blender"}, {"Plumbingfixture"}, {"Stopsign"}, {"Officesupplies"}, |
|
|
|
{"Volleyball(Ball)"}, {"Vase"}, {"Slowcooker"}, {"Wardrobe"}, {"Coffee"}, {"Whisk"}, |
|
|
|
{"Papertowel"}, {"Personalcare"}, {"Food"}, {"Sunhat"}, {"Treehouse"}, {"Flyingdisc"}, |
|
|
|
{"Skirt"}, {"Gasstove"}, {"Saltandpeppershakers"}, {"Mechanicalfan"}, {"Facepowder"}, {"Fax"}, |
|
|
|
{"Fruit"}, {"Frenchfries"}, {"Nightstand"}, {"Barrel"}, {"Kite"}, {"Tart"}, {"Treadmill"}, |
|
|
|
{"Fox"}, {"Flag"}, {"Frenchhorn"}, {"Windowblind"}, {"Humanfoot"}, {"Golfcart"}, {"Jacket"}, |
|
|
|
{"Egg(Food)"}, {"Streetlight"}, {"Guitar"}, {"Pillow"}, {"Humanleg"}, {"Isopod"}, {"Grape"}, |
|
|
|
{"Humanear"}, {"Powerplugsandsockets"}, {"Panda"}, {"Giraffe"}, {"Woman"}, {"Doorhandle"}, |
|
|
|
{"Rhinoceros"}, {"Bathtub"}, {"Goldfish"}, {"Houseplant"}, {"Goat"}, {"Baseballbat"}, |
|
|
|
{"Baseballglove"}, {"Mixingbowl"}, {"Marineinvertebrates"}, {"Kitchenutensil"}, {"Lightswitch"}, |
|
|
|
{"House"}, {"Horse"}, {"Stationarybicycle"}, {"Hammer"}, {"Ceilingfan"}, {"Sofabed"}, |
|
|
|
{"Adhesivetape "}, {"Harp"}, {"Sandal"}, {"Bicyclehelmet"}, {"Saucer"}, {"Harpsichord"}, |
|
|
|
{"Humanhair"}, {"Heater"}, {"Harmonica"}, {"Hamster"}, {"Curtain"}, {"Bed"}, {"Kettle"}, |
|
|
|
{"Fireplace"}, {"Scale"}, {"Drinkingstraw"}, {"Insect"}, {"Hairdryer"}, {"Kitchenware"}, |
|
|
|
{"Indoorrower"}, {"Invertebrate"}, {"Foodprocessor"}, {"Bookcase"}, {"Refrigerator"}, |
|
|
|
{"Wood-burningstove"}, {"Punchingbag"}, {"Commonfig"}, {"Cocktailshaker"}, {"Jaguar(Animal)"}, |
|
|
|
{"Golfball"}, {"Fashionaccessory"}, {"Alarmclock"}, {"Filingcabinet"}, {"Artichoke"}, {"Table"}, |
|
|
|
{"Tableware"}, {"Kangaroo"}, {"Koala"}, {"Knife"}, {"Bottle"}, {"Bottleopener"}, {"Lynx"}, |
|
|
|
{"Lavender(Plant)"}, {"Lighthouse"}, {"Dumbbell"}, {"Humanhead"}, {"Bowl"}, {"Humidifier"}, |
|
|
|
{"Porch"}, {"Lizard"}, {"Billiardtable"}, {"Mammal"}, {"Mouse"}, {"Motorcycle"}, |
|
|
|
{"Musicalinstrument"}, {"Swimcap"}, {"Fryingpan"}, {"Snowplow"}, {"Bathroomcabinet"}, |
|
|
|
{"Missile"}, {"Bust"}, {"Man"}, {"Waffleiron"}, {"Milk"}, {"Ringbinder"}, {"Plate"}, |
|
|
|
{"Mobilephone"}, {"Bakedgoods"}, {"Mushroom"}, {"Crutch"}, {"Pitcher(Container)"}, {"Mirror"}, |
|
|
|
{"Personalflotationdevice"}, {"Tabletennisracket"}, {"Pencilcase"}, {"Musicalkeyboard"}, |
|
|
|
{"Scoreboard"}, {"Briefcase"}, {"Kitchenknife"}, {"Nail(Construction)"}, {"Tennisball"}, |
|
|
|
{"Plasticbag"}, {"Oboe"}, {"Chestofdrawers"}, {"Ostrich"}, {"Piano"}, {"Girl"}, {"Plant"}, |
|
|
|
{"Potato"}, {"Hairspray"}, {"Sportsequipment"}, {"Pasta"}, {"Penguin"}, {"Pumpkin"}, {"Pear"}, |
|
|
|
{"Infantbed"}, {"Polarbear"}, {"Mixer"}, {"Cupboard"}, {"Jacuzzi"}, {"Pizza"}, {"Digitalclock"}, |
|
|
|
{"Pig"}, {"Reptile"}, {"Rifle"}, {"Lipstick"}, {"Skateboard"}, {"Raven"}, {"Highheels"}, |
|
|
|
{"Redpanda"}, {"Rose"}, {"Rabbit"}, {"Sculpture"}, {"Saxophone"}, {"Shotgun"}, {"Seafood"}, |
|
|
|
{"Submarinesandwich"}, {"Snowboard"}, {"Sword"}, {"Pictureframe"}, {"Sushi"}, {"Loveseat"}, |
|
|
|
{"Ski"}, {"Squirrel"}, {"Tripod"}, {"Stethoscope"}, {"Submarine"}, {"Scorpion"}, {"Segway"}, |
|
|
|
{"Trainingbench"}, {"Snake"}, {"Coffeetable"}, {"Skyscraper"}, {"Sheep"}, {"Television"}, |
|
|
|
{"Trombone"}, {"Tea"}, {"Tank"}, {"Taco"}, {"Telephone"}, {"Torch"}, {"Tiger"}, {"Strawberry"}, |
|
|
|
{"Trumpet"}, {"Tree"}, {"Tomato"}, {"Train"}, {"Tool"}, {"Picnicbasket"}, {"Cookingspray"}, |
|
|
|
{"Trousers"}, {"Bowlingequipment"}, {"Footballhelmet"}, {"Truck"}, {"Measuringcup"}, |
|
|
|
{"Coffeemaker"}, {"Violin"}, {"Vehicle"}, {"Handbag"}, {"Papercutter"}, {"Wine"}, {"Weapon"}, |
|
|
|
{"Wheel"}, {"Worm"}, {"Wok"}, {"Whale"}, {"Zebra"}, {"Autopart"}, {"Jug"}, {"Pizzacutter"}, |
|
|
|
{"Cream"}, {"Monkey"}, {"Lion"}, {"Bread"}, {"Platter"}, {"Chicken"}, {"Eagle"}, {"Helicopter"}, |
|
|
|
{"Owl"}, {"Duck"}, {"Turtle"}, {"Hippopotamus"}, {"Crocodile"}, {"Toilet"}, {"Toiletpaper"}, |
|
|
|
{"Squid"}, {"Clothing"}, {"Footwear"}, {"Lemon"}, {"Spider"}, {"Deer"}, {"Frog"}, {"Banana"}, |
|
|
|
{"Rocket"}, {"Wineglass"}, {"Countertop"}, {"Tabletcomputer"}, {"Wastecontainer"}, |
|
|
|
{"Swimmingpool"}, {"Dog"}, {"Book"}, {"Elephant"}, {"Shark"}, {"Candle"}, {"Leopard"}, {"Axe"}, |
|
|
|
{"Handdryer"}, {"Soapdispenser"}, {"Porcupine"}, {"Flower"}, {"Canary"}, {"Cheetah"}, |
|
|
|
{"Palmtree"}, {"Hamburger"}, {"Maple"}, {"Building"}, {"Fish"}, {"Lobster"}, |
|
|
|
{"GardenAsparagus"}, {"Furniture"}, {"Hedgehog"}, {"Airplane"}, {"Spoon"}, {"Otter"}, {"Bull"}, |
|
|
|
{"Oyster"}, {"Horizontalbar"}, {"Conveniencestore"}, {"Bomb"}, {"Bench"}, {"Icecream"}, |
|
|
|
{"Caterpillar"}, {"Butterfly"}, {"Parachute"}, {"Orange"}, {"Antelope"}, {"Beaker"}, |
|
|
|
{"Mothsandbutterflies"}, {"Window"}, {"Closet"}, {"Castle"}, {"Jellyfish"}, {"Goose"}, {"Mule"}, |
|
|
|
{"Swan"}, {"Peach"}, {"Coconut"}, {"Seatbelt"}, {"Raccoon"}, {"Chisel"}, {"Fork"}, {"Lamp"}, |
|
|
|
{"Camera"}, {"Squash(Plant)"}, {"Racket"}, {"Humanface"}, {"Humanarm"}, {"Vegetable"}, |
|
|
|
{"Diaper"}, {"Unicycle"}, {"Falcon"}, {"Chime"}, {"Snail"}, {"Shellfish"}, {"Cabbage"}, |
|
|
|
{"Carrot"}, {"Mango"}, {"Jeans"}, {"Flowerpot"}, {"Pineapple"}, {"Drawer"}, {"Stool"}, |
|
|
|
{"Envelope"}, {"Cake"}, {"Dragonfly"}, {"Commonsunflower"}, {"Microwaveoven"}, {"Honeycomb"}, |
|
|
|
{"Marinemammal"}, {"Sealion"}, {"Ladybug"}, {"Shelf"}, {"Watch"}, {"Candy"}, {"Salad"}, |
|
|
|
{"Parrot"}, {"Handgun"}, {"Sparrow"}, {"Van"}, {"Grinder"}, {"Spicerack"}, {"Lightbulb"}, |
|
|
|
{"Cordedphone"}, {"Sportsuniform"}, {"Tennisracket"}, {"Wallclock"}, {"Servingtray"}, |
|
|
|
{"Kitchen&diningroomtable"}, {"Dogbed"}, {"Cakestand"}, {"Catfurniture"}, {"Bathroomaccessory"}, |
|
|
|
{"Facialtissueholder"}, {"Pressurecooker"}, {"Kitchenappliance"}, {"Tire"}, {"Ruler"}, |
|
|
|
{"Luggageandbags"}, {"Microphone"}, {"Broccoli"}, {"Umbrella"}, {"Pastry"}, {"Grapefruit"}, |
|
|
|
{"Band-aid"}, {"Animal"}, {"Bellpepper"}, {"Turkey"}, {"Lily"}, {"Pomegranate"}, {"Doughnut"}, |
|
|
|
{"Glasses"}, {"Humannose"}, {"Pen"}, {"Ant"}, {"Car"}, {"Aircraft"}, {"Humanhand"}, {"Skunk"}, |
|
|
|
{"Teddybear"}, {"Watermelon"}, {"Cantaloupe"}, {"Dishwasher"}, {"Flute"}, {"Balancebeam"}, |
|
|
|
{"Sandwich"}, {"Shrimp"}, {"Sewingmachine"}, {"Binoculars"}, {"Raysandskates"}, {"Ipod"}, |
|
|
|
{"Accordion"}, {"Willow"}, {"Crab"}, {"Crown"}, {"Seahorse"}, {"Perfume"}, {"Alpaca"}, {"Taxi"}, |
|
|
|
{"Canoe"}, {"Remotecontrol"}, {"Wheelchair"}, {"Rugbyball"}, {"Armadillo"}, {"Maracas"}, |
|
|
|
{"Helmet"}}; |
|
|
|
{"Herd"}, {"Safari"}, {"Bangle"}, {"Cushion"}, {"Countertop"}, |
|
|
|
{"Prom"}, {"Branch"}, {"Sports"}, {"Sky"}, {"Community"}, |
|
|
|
{"Wheel"}, {"Cola"}, {"Tuxedo"}, {"Flowerpot"}, {"Team"}, |
|
|
|
{"Computer"}, {"Unicycle"}, {"Brig"}, {"Aerospace engineering"}, {"Scuba diving"}, |
|
|
|
{"Goggles"}, {"Fruit"}, {"Badminton"}, {"Horse"}, {"Sunglasses"}, |
|
|
|
{"Fun"}, {"Prairie"}, {"Poster"}, {"Flag"}, {"Speedboat"}, |
|
|
|
{"Eyelash"}, {"Veil"}, {"Mobile phone"}, {"Wheelbarrow"}, {"Saucer"}, |
|
|
|
{"Leather"}, {"Drawer"}, {"Paper"}, {"Pier"}, {"Waterfowl"}, |
|
|
|
{"Tights"}, {"Rickshaw"}, {"Vegetable"}, {"Handrail"}, {"Ice"}, |
|
|
|
{"Metal"}, {"Flower"}, {"Wing"}, {"Silverware"}, {"Event"}, |
|
|
|
{"Skyline"}, {"Money"}, {"Comics"}, {"Handbag"}, {"Porcelain"}, |
|
|
|
{"Rodeo"}, {"Curtain"}, {"Tile"}, {"Human mouth"}, {"Army"}, |
|
|
|
{"Menu"}, {"Boat"}, {"Snowboarding"}, {"Cairn terrier"}, {"Net"}, |
|
|
|
{"Pasteles"}, {"Cup"}, {"Rugby"}, {"Pho"}, {"Cap"}, |
|
|
|
{"Human hair"}, {"Surfing"}, {"Loveseat"}, {"Museum"}, {"Shipwreck"}, |
|
|
|
{"Trunk (Tree)"}, {"Plush"}, {"Monochrome"}, {"Volcano"}, {"Rock"}, |
|
|
|
{"Pillow"}, {"Presentation"}, {"Nebula"}, {"Subwoofer"}, {"Lake"}, |
|
|
|
{"Sledding"}, {"Bangs"}, {"Tablecloth"}, {"Necklace"}, {"Swimwear"}, |
|
|
|
{"Standing"}, {"Jeans"}, {"Carnival"}, {"Softball"}, {"Centrepiece"}, |
|
|
|
{"Skateboarder"}, {"Cake"}, {"Dragon"}, {"Aurora"}, {"Skiing"}, |
|
|
|
{"Bathroom"}, {"Dog"}, {"Needlework"}, {"Umbrella"}, {"Church"}, |
|
|
|
{"Fire"}, {"Piano"}, {"Denim"}, {"Bridle"}, {"Cabinetry"}, |
|
|
|
{"Lipstick"}, {"Ring"}, {"Television"}, {"Roller"}, {"Seal"}, |
|
|
|
{"Concert"}, {"Product"}, {"News"}, {"Fast food"}, {"Horn (Animal)"}, |
|
|
|
{"Tattoo"}, {"Bird"}, {"Bridegroom"}, {"Love"}, {"Helmet"}, |
|
|
|
{"Dinosaur"}, {"Icing"}, {"Miniature"}, {"Tire"}, {"Toy"}, |
|
|
|
{"Icicle"}, {"Jacket"}, {"Coffee"}, {"Mosque"}, {"Rowing"}, |
|
|
|
{"Wetsuit"}, {"Camping"}, {"Underwater"}, {"Christmas"}, {"Gelato"}, |
|
|
|
{"Whiteboard"}, {"Field"}, {"Ragdoll"}, {"Construction"}, {"Lampshade"}, |
|
|
|
{"Palace"}, {"Meal"}, {"Factory"}, {"Cage"}, {"Clipper (Boat)"}, |
|
|
|
{"Gymnastics"}, {"Turtle"}, {"Human foot"}, {"Marriage"}, {"Web page"}, |
|
|
|
{"Human beard"}, {"Fog"}, {"Wool"}, {"Cappuccino"}, {"Lighthouse"}, |
|
|
|
{"Lego"}, {"Sparkler"}, {"Sari"}, {"Model"}, {"Temple"}, |
|
|
|
{"Beanie"}, {"Building"}, {"Waterfall"}, {"Penguin"}, {"Cave"}, |
|
|
|
{"Stadium"}, {"Smile"}, {"Human hand"}, {"Park"}, {"Desk"}, |
|
|
|
{"Shetland sheepdog"}, {"Bar"}, {"Eating"}, {"Neon"}, {"Dalmatian"}, |
|
|
|
{"Crocodile"}, {"Wakeboarding"}, {"Longboard"}, {"Road"}, {"Race"}, |
|
|
|
{"Kitchen"}, {"Odometer"}, {"Cliff"}, {"Fiction"}, {"School"}, |
|
|
|
{"Interaction"}, {"Bullfighting"}, {"Boxer"}, {"Gown"}, {"Aquarium"}, |
|
|
|
{"Superhero"}, {"Pie"}, {"Asphalt"}, {"Surfboard"}, {"Cheeseburger"}, |
|
|
|
{"Screenshot"}, {"Supper"}, {"Laugh"}, {"Lunch"}, {"Party "}, |
|
|
|
{"Glacier"}, {"Bench"}, {"Grandparent"}, {"Sink"}, {"Pomacentridae"}, |
|
|
|
{"Blazer"}, {"Brick"}, {"Space"}, {"Backpacking"}, {"Stuffed toy"}, |
|
|
|
{"Sushi"}, {"Glitter"}, {"Bonfire"}, {"Castle"}, {"Marathon"}, |
|
|
|
{"Pizza"}, {"Beach"}, {"Human ear"}, {"Racing"}, {"Sitting"}, |
|
|
|
{"Iceberg"}, {"Shelf"}, {"Vehicle"}, {"Pop music"}, {"Playground"}, |
|
|
|
{"Clown"}, {"Car"}, {"Rein"}, {"Fur"}, {"Musician"}, |
|
|
|
{"Casino"}, {"Baby"}, {"Alcohol"}, {"Strap"}, {"Reef"}, |
|
|
|
{"Balloon"}, {"Outerwear"}, {"Cathedral"}, {"Competition"}, {"Joker"}, |
|
|
|
{"Blackboard"}, {"Bunk bed"}, {"Bear"}, {"Moon"}, {"Archery"}, |
|
|
|
{"Polo"}, {"River"}, {"Fishing"}, {"Ferris wheel"}, {"Mortarboard"}, |
|
|
|
{"Bracelet"}, {"Flesh"}, {"Statue"}, {"Farm"}, {"Desert"}, |
|
|
|
{"Chain"}, {"Aircraft"}, {"Textile"}, {"Hot dog"}, {"Knitting"}, |
|
|
|
{"Singer"}, {"Juice"}, {"Circus"}, {"Chair"}, {"Musical instrument"}, |
|
|
|
{"Room"}, {"Crochet"}, {"Sailboat"}, {"Newspaper"}, {"Santa claus"}, |
|
|
|
{"Swamp"}, {"Skyscraper"}, {"Skin"}, {"Rocket"}, {"Aviation"}, |
|
|
|
{"Airliner"}, {"Garden"}, {"Ruins"}, {"Storm"}, {"Glasses"}, |
|
|
|
{"Balance"}, {"Nail (Body part)"}, {"Rainbow"}, {"Soil "}, {"Vacation "}, |
|
|
|
{"Moustache"}, {"Doily"}, {"Food"}, {"Bride "}, {"Cattle"}, |
|
|
|
{"Pocket"}, {"Infrastructure"}, {"Train"}, {"Gerbil"}, {"Fireworks"}, |
|
|
|
{"Pet"}, {"Dam"}, {"Crew"}, {"Couch"}, {"Bathing"}, |
|
|
|
{"Quilting"}, {"Motorcycle"}, {"Butterfly"}, {"Sled"}, {"Watercolor paint"}, |
|
|
|
{"Rafting"}, {"Monument"}, {"Lightning"}, {"Sunset"}, {"Bumper"}, |
|
|
|
{"Shoe"}, {"Waterskiing"}, {"Sneakers"}, {"Tower"}, {"Insect"}, |
|
|
|
{"Pool"}, {"Placemat"}, {"Airplane"}, {"Plant"}, {"Jungle"}, |
|
|
|
{"Armrest"}, {"Duck"}, {"Dress"}, {"Tableware"}, {"Petal"}, |
|
|
|
{"Bus"}, {"Hanukkah"}, {"Forest"}, {"Hat"}, {"Barn"}, |
|
|
|
{"Tubing"}, {"Snorkeling"}, {"Cool"}, {"Cookware and bakeware"}, {"Cycling"}, |
|
|
|
{"Swing (Seat)"}, {"Muscle"}, {"Cat"}, {"Skateboard"}, {"Star"}, |
|
|
|
{"Toe"}, {"Junk"}, {"Bicycle"}, {"Bedroom"}, {"Person"}, |
|
|
|
{"Sand"}, {"Canyon"}, {"Tie"}, {"Twig"}, {"Sphynx"}, |
|
|
|
{"Supervillain"}, {"Nightclub"}, {"Ranch"}, {"Pattern"}, {"Shorts"}, |
|
|
|
{"Himalayan"}, {"Wall"}, {"Leggings"}, {"Windsurfing"}, {"Deejay"}, |
|
|
|
{"Dance"}, {"Van"}, {"Bento"}, {"Sleep"}, {"Wine"}, |
|
|
|
{"Picnic"}, {"Leisure"}, {"Dune"}, {"Crowd"}, {"Kayak"}, |
|
|
|
{"Ballroom"}, {"Selfie"}, {"Graduation"}, {"Frigate"}, {"Mountain"}, |
|
|
|
{"Dude"}, {"Windshield"}, {"Skiff"}, {"Class"}, {"Scarf"}, |
|
|
|
{"Bull"}, {"Soccer"}, {"Bag"}, {"Basset hound"}, {"Tractor"}, |
|
|
|
{"Swimming"}, {"Running"}, {"Track"}, {"Helicopter"}, {"Pitch"}, |
|
|
|
{"Clock"}, {"Song"}, {"Jersey"}, {"Stairs"}, {"Flap"}, |
|
|
|
{"Jewellery"}, {"Bridge"}, {"Cuisine"}, {"Bread"}, {"Caving"}, |
|
|
|
{"Shell"}, {"Wreath"}, {"Roof"}, {"Cookie"}, {"Canoe"}}; |
|
|
|
|
|
|
|
static float g_thres_map[RET_CATEGORY_SUM] = { |
|
|
|
0.23, 0.03, 0.10, 0.13, 0.03, |
|
|
|
0.10, 0.06, 0.09, 0.09, 0.05, |
|
|
|
0.01, 0.04, 0.01, 0.27, 0.05, |
|
|
|
0.16, 0.01, 0.16, 0.04, 0.13, |
|
|
|
0.09, 0.18, 0.10, 0.65, 0.08, |
|
|
|
0.04, 0.08, 0.01, 0.05, 0.20, |
|
|
|
0.01, 0.16, 0.10, 0.10, 0.10, |
|
|
|
0.02, 0.24, 0.08, 0.10, 0.53, |
|
|
|
0.07, 0.05, 0.07, 0.27, 0.02, |
|
|
|
0.01, 0.71, 0.01, 0.06, 0.06, |
|
|
|
0.03, 0.96, 0.03, 0.94, 0.05, |
|
|
|
0.03, 0.14, 0.09, 0.03, 0.11, |
|
|
|
0.50, 0.16, 0.07, 0.07, 0.06, |
|
|
|
0.07, 0.08, 0.10, 0.29, 0.03, |
|
|
|
0.05, 0.11, 0.03, 0.03, 0.03, |
|
|
|
0.01, 0.11, 0.07, 0.03, 0.49, |
|
|
|
0.12, 0.30, 0.10, 0.15, 0.02, |
|
|
|
0.06, 0.17, 0.01, 0.04, 0.07, |
|
|
|
0.06, 0.02, 0.19, 0.20, 0.14, |
|
|
|
0.35, 0.15, 0.01, 0.10, 0.13, |
|
|
|
0.43, 0.11, 0.12, 0.32, 0.01, |
|
|
|
0.22, 0.51, 0.02, 0.04, 0.14, |
|
|
|
0.04, 0.35, 0.35, 0.01, 0.54, |
|
|
|
0.04, 0.02, 0.03, 0.02, 0.38, |
|
|
|
0.13, 0.19, 0.06, 0.01, 0.02, |
|
|
|
0.06, 0.03, 0.04, 0.01, 0.10, |
|
|
|
0.01, 0.07, 0.07, 0.07, 0.33, |
|
|
|
0.08, 0.04, 0.06, 0.07, 0.07, |
|
|
|
0.11, 0.02, 0.32, 0.48, 0.14, |
|
|
|
0.01, 0.01, 0.04, 0.05, 0.04, |
|
|
|
0.16, 0.50, 0.11, 0.03, 0.04, |
|
|
|
0.02, 0.55, 0.17, 0.13, 0.84, |
|
|
|
0.18, 0.03, 0.16, 0.02, 0.06, |
|
|
|
0.03, 0.11, 0.96, 0.36, 0.68, |
|
|
|
0.02, 0.08, 0.02, 0.01, 0.03, |
|
|
|
0.05, 0.14, 0.09, 0.06, 0.03, |
|
|
|
0.20, 0.15, 0.62, 0.03, 0.10, |
|
|
|
0.08, 0.02, 0.02, 0.06, 0.03, |
|
|
|
0.04, 0.01, 0.10, 0.05, 0.04, |
|
|
|
0.02, 0.07, 0.03, 0.32, 0.11, |
|
|
|
0.03, 0.02, 0.03, 0.01, 0.03, |
|
|
|
0.03, 0.25, 0.20, 0.19, 0.03, |
|
|
|
0.11, 0.03, 0.02, 0.03, 0.15, |
|
|
|
0.14, 0.06, 0.11, 0.03, 0.02, |
|
|
|
0.02, 0.52, 0.03, 0.02, 0.02, |
|
|
|
0.02, 0.09, 0.56, 0.01, 0.22, |
|
|
|
0.01, 0.48, 0.14, 0.10, 0.08, |
|
|
|
0.73, 0.39, 0.09, 0.10, 0.85, |
|
|
|
0.31, 0.03, 0.05, 0.01, 0.01, |
|
|
|
0.01, 0.10, 0.28, 0.02, 0.03, |
|
|
|
0.04, 0.03, 0.07, 0.14, 0.20, |
|
|
|
0.10, 0.01, 0.05, 0.37, 0.12, |
|
|
|
0.04, 0.44, 0.04, 0.26, 0.08, |
|
|
|
0.07, 0.27, 0.10, 0.03, 0.01, |
|
|
|
0.03, 0.16, 0.41, 0.16, 0.34, |
|
|
|
0.04, 0.30, 0.04, 0.05, 0.18, |
|
|
|
0.33, 0.03, 0.21, 0.03, 0.04, |
|
|
|
0.22, 0.01, 0.04, 0.02, 0.01, |
|
|
|
0.06, 0.02, 0.08, 0.87, 0.11, |
|
|
|
0.15, 0.05, 0.14, 0.09, 0.08, |
|
|
|
0.22, 0.09, 0.07, 0.06, 0.06, |
|
|
|
0.05, 0.43, 0.70, 0.03, 0.07, |
|
|
|
0.06, 0.07, 0.14, 0.04, 0.01, |
|
|
|
0.03, 0.05, 0.65, 0.06, 0.04, |
|
|
|
0.23, 0.06, 0.75, 0.10, 0.01, |
|
|
|
0.63, 0.41, 0.09, 0.01, 0.01, |
|
|
|
0.18, 0.10, 0.03, 0.01, 0.05, |
|
|
|
0.13, 0.18, 0.03, 0.23, 0.01, |
|
|
|
0.04, 0.03, 0.38, 0.90, 0.21, |
|
|
|
0.18, 0.10, 0.48, 0.08, 0.46, |
|
|
|
0.03, 0.01, 0.02, 0.03, 0.10, |
|
|
|
0.01, 0.09, 0.01, 0.01, 0.01, |
|
|
|
0.10, 0.41, 0.01, 0.06, 0.75, |
|
|
|
0.08, 0.01, 0.01, 0.08, 0.21, |
|
|
|
0.06, 0.02, 0.05, 0.02, 0.05, |
|
|
|
0.09, 0.12, 0.03, 0.06, 0.11, |
|
|
|
0.03, 0.01, 0.01, 0.06, 0.84, |
|
|
|
0.04, 0.81, 0.39, 0.02, 0.29, |
|
|
|
0.77, 0.07, 0.06, 0.22, 0.23, |
|
|
|
0.23, 0.01, 0.02, 0.13, 0.04, |
|
|
|
0.19, 0.04, 0.08, 0.27, 0.09, |
|
|
|
0.06, 0.01, 0.03, 0.21, 0.04, |
|
|
|
}; |
|
|
|
|
|
|
|
char *CreateLocalModelBuffer(JNIEnv *env, jobject modelBuffer) { |
|
|
|
jbyte *modelAddr = static_cast<jbyte *>(env->GetDirectBufferAddress(modelBuffer)); |
|
|
|
@@ -160,15 +234,30 @@ std::string ProcessRunnetResult(const int RET_CATEGORY_SUM, const char *const la |
|
|
|
|
|
|
|
// Get a pointer to the first score. |
|
|
|
float *temp_scores = static_cast<float *>(outputTensor->MutableData()); |
|
|
|
|
|
|
|
float scores[RET_CATEGORY_SUM]; |
|
|
|
for (int i = 0; i < RET_CATEGORY_SUM; ++i) { |
|
|
|
if (temp_scores[i] > 0.5) { |
|
|
|
MS_PRINT("MindSpore scores[%d] : [%f]", i, temp_scores[i]); |
|
|
|
} |
|
|
|
scores[i] = temp_scores[i]; |
|
|
|
scores[i] = temp_scores[i]; |
|
|
|
} |
|
|
|
|
|
|
|
float unifiedThre = 0.5; |
|
|
|
float probMax = 1.0; |
|
|
|
for (size_t i = 0; i < RET_CATEGORY_SUM; ++i) { |
|
|
|
float threshold = g_thres_map[i]; |
|
|
|
float tmpProb = scores[i]; |
|
|
|
if (tmpProb < threshold) { |
|
|
|
tmpProb = tmpProb / threshold * unifiedThre; |
|
|
|
} else { |
|
|
|
tmpProb = (tmpProb - threshold) / (probMax - threshold) * unifiedThre + unifiedThre; |
|
|
|
} |
|
|
|
scores[i] = tmpProb; |
|
|
|
} |
|
|
|
|
|
|
|
for (int i = 0; i < RET_CATEGORY_SUM; ++i) { |
|
|
|
if (scores[i] > 0.5) { |
|
|
|
MS_PRINT("MindSpore scores[%d] : [%f]", i, scores[i]); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// Score for each category. |
|
|
|
// Converted to text information that needs to be displayed in the APP. |
|
|
|
std::string categoryScore = ""; |
|
|
|
|