Skip to content

Training NextCategory #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
KamranAlipour opened this issue Aug 19, 2020 · 5 comments
Open

Training NextCategory #1

KamranAlipour opened this issue Aug 19, 2020 · 5 comments

Comments

@KamranAlipour
Copy link

KamranAlipour commented Aug 19, 2020

Hi, When you train the NextCategory model, are you training only based on full rooms? I'm asking because when I follow the algorithm, seems like you are setting the cat_only flag to True, and that leads to:

scene, input_nodes, output_node = self.get_scene(index, stop_prob=0.1)

when then leads to output_node being None which leads to only full scenes with t_cat = <STOP> labels.

@LemonMi
Copy link

LemonMi commented Nov 20, 2020

Hi, When you train the NextCategory model, are you training only based on full rooms? I'm asking because when I follow the algorithm, seems like you are setting the cat_only flag to True, and that leads to:

scene, input_nodes, output_node = self.get_scene(index, stop_prob=0.1)

when then leads to output_node being None which leads to only full scenes with t_cat = labels.

Hi, I meet the same problem with you. How do you deal with this? Thank you!

@KamranAlipour
Copy link
Author

KamranAlipour commented Nov 20, 2020

Hi, I ended up replacing that line with
scene, input_nodes, output_node = self.get_scene_partial(index, stop_prob=0.1)

where I defined get_scene_partial as something like this:
def get_scene_partial(self, index, stop_prob=None): i = index+self.scene_indices[0] scene = RenderedScene(i, self.data_folder, self.data_root_dir) object_nodes = self.order_object_nodes(scene.object_nodes) if stop_prob is not None and random.random() < stop_prob: input_nodes = object_nodes output_node = None else: split_idx = random.choice(range(len(object_nodes))) output_node = object_nodes[split_idx] input_nodes = object_nodes[0:split_idx] return scene, input_nodes, output_node

@LemonMi
Copy link

LemonMi commented Nov 23, 2020

Hi, I ended up replacing that line with
scene, input_nodes, output_node = self.get_scene_partial(index, stop_prob=0.1)

where I defined get_scene_partial as something like this:
def get_scene_partial(self, index, stop_prob=None): i = index+self.scene_indices[0] scene = RenderedScene(i, self.data_folder, self.data_root_dir) object_nodes = self.order_object_nodes(scene.object_nodes) if stop_prob is not None and random.random() < stop_prob: input_nodes = object_nodes output_node = None else: split_idx = random.choice(range(len(object_nodes))) output_node = object_nodes[split_idx] input_nodes = object_nodes[0:split_idx] return scene, input_nodes, output_node

Thank you! And how you deal with the second-tier objects? It seems lack of the "relation" files..

@kwang-ether
Copy link
Collaborator

Hi, I ended up replacing that line with
scene, input_nodes, output_node = self.get_scene_partial(index, stop_prob=0.1)

where I defined get_scene_partial as something like this:
def get_scene_partial(self, index, stop_prob=None): i = index+self.scene_indices[0] scene = RenderedScene(i, self.data_folder, self.data_root_dir) object_nodes = self.order_object_nodes(scene.object_nodes) if stop_prob is not None and random.random() < stop_prob: input_nodes = object_nodes output_node = None else: split_idx = random.choice(range(len(object_nodes))) output_node = object_nodes[split_idx] input_nodes = object_nodes[0:split_idx] return scene, input_nodes, output_node

this is correct. somehow these lines were commented out for the version we used to prepare the code release and I simply removed those comments :)

@kwang-ether
Copy link
Collaborator

Hi, I ended up replacing that line with
scene, input_nodes, output_node = self.get_scene_partial(index, stop_prob=0.1)
where I defined get_scene_partial as something like this:
def get_scene_partial(self, index, stop_prob=None): i = index+self.scene_indices[0] scene = RenderedScene(i, self.data_folder, self.data_root_dir) object_nodes = self.order_object_nodes(scene.object_nodes) if stop_prob is not None and random.random() < stop_prob: input_nodes = object_nodes output_node = None else: split_idx = random.choice(range(len(object_nodes))) output_node = object_nodes[split_idx] input_nodes = object_nodes[0:split_idx] return scene, input_nodes, output_node

Thank you! And how you deal with the second-tier objects? It seems lack of the "relation" files..

Relation files were included in certain versions of the dataset release. If those are not available, they need to be manually computed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants