MCPcopy Create free account
hub / github.com/Gabesarch/ICAL / initialize_constants

Method initialize_constants

TEACh/models/expert_program_generation.py:422–528  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

420 return predicted_action, predicted_label
421
422 def initialize_constants(self):
423 self.include_classes = [
424 'ShowerDoor', 'Cabinet', 'CounterTop', 'Sink', 'Towel', 'HandTowel', 'TowelHolder', 'SoapBar',
425 'ToiletPaper', 'ToiletPaperHanger', 'HandTowelHolder', 'SoapBottle', 'GarbageCan', 'Candle', 'ScrubBrush',
426 'Plunger', 'SinkBasin', 'Cloth', 'SprayBottle', 'Toilet', 'Faucet', 'ShowerHead', 'Box', 'Bed', 'Book',
427 'DeskLamp', 'BasketBall', 'Pen', 'Pillow', 'Pencil', 'CellPhone', 'KeyChain', 'Painting', 'CreditCard',
428 'AlarmClock', 'CD', 'Laptop', 'Drawer', 'SideTable', 'Chair', 'Blinds', 'Desk', 'Curtains', 'Dresser',
429 'Watch', 'Television', 'WateringCan', 'Newspaper', 'FloorLamp', 'RemoteControl', 'HousePlant', 'Statue',
430 'Ottoman', 'ArmChair', 'Sofa', 'DogBed', 'BaseballBat', 'TennisRacket', 'VacuumCleaner', 'Mug', 'ShelvingUnit',
431 'Shelf', 'StoveBurner', 'Apple', 'Lettuce', 'Bottle', 'Egg', 'Microwave', 'CoffeeMachine', 'Fork', 'Fridge',
432 'WineBottle', 'Spatula', 'Bread', 'Tomato', 'Pan', 'Cup', 'Pot', 'SaltShaker', 'Potato', 'PepperShaker',
433 'ButterKnife', 'StoveKnob', 'Toaster', 'DishSponge', 'Spoon', 'Plate', 'Knife', 'DiningTable', 'Bowl',
434 'LaundryHamper', 'Vase', 'Stool', 'CoffeeTable', 'Poster', 'Bathtub', 'TissueBox', 'Footstool', 'BathtubBasin',
435 'ShowerCurtain', 'TVStand', 'Boots', 'RoomDecor', 'PaperTowelRoll', 'Ladle', 'Kettle', 'Safe', 'GarbageBag', 'TeddyBear',
436 'TableTopDecor', 'Dumbbell', 'Desktop', 'AluminumFoil', 'Window', 'LightSwitch']
437
438 alfred_objects, object_mapping = get_alfred_constants()
439
440 for obj in alfred_objects:
441 if obj not in self.include_classes:
442 self.include_classes.append(obj)
443
444 self.special_classes = ['AppleSliced', 'BreadSliced', 'EggCracked', 'LettuceSliced', 'PotatoSliced', 'TomatoSliced']
445 self.include_classes += self.special_classes
446
447 self.include_classes += ["no_object"]
448
449 actions = [
450 'MoveAhead',
451 'RotateRight',
452 'RotateLeft',
453 'LookDown',
454 'LookUp',
455 'PickupObject',
456 'PutObject',
457 'OpenObject',
458 'CloseObject',
459 'SliceObject',
460 'ToggleObjectOn',
461 'ToggleObjectOff',
462 # 'Done',
463 ]
464
465 actions = [
466 'Forward',
467 'Backward',
468 'Turn Right',
469 'Turn Left',
470 'Look Down',
471 'Look Up',
472 'Pan Left',
473 'Pan Right',
474 'Pickup',
475 'Place',
476 'Open',
477 'Close',
478 'Slice',
479 'ToggleOn',

Callers 1

init_idmMethod · 0.95

Calls 1

get_alfred_constantsFunction · 0.70

Tested by

no test coverage detected