Generating different dimension images while uploading image file from custom plugin page

Resized different dimension image sets are generated by using wp_generate_attachment_metadata and wp_update_attachment_metadata method.

$absFilename = $wp_upload_dir['path']."https://wordpress.stackexchange.com/".$filename;
$attach_data = wp_generate_attachment_metadata( $attach_id, $absFilename);
wp_update_attachment_metadata( $attach_id, $attach_data );

This will update the image details in the wp_postmeta table.

Thanks @DaveRomsey